Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for confirming unsafe addresses #26

Merged
merged 1 commit into from
May 29, 2024

Conversation

HashidaTKS
Copy link
Contributor

@HashidaTKS HashidaTKS commented May 28, 2024

Add support to specify unsafe addresses.

If a unsafe domain entry contains "@", we regard it as address, not domain.

When an address matches an unsafe addresses rule, a warning "[警告] 注意が必要なアドレス({0})が宛先に含まれています。" is displayed as below.

image

For the domains case, a warning is "[警告] 注意が必要なドメイン({0})が宛先に含まれています。" as below.

image

Note that warnings are displayed for each addresses, so if rules match a lot of addresses, a lot of warnings are displayed.
In case of domains, warnings are displayed per domain, so there are not so many warnings usually.

Test

  • Remove files in %APPDATA%\FlexConfirmMail if exist.
  • Open Outlook and open setting dialog for FlexConfirmMail
  • Open the "注意が必要なドメイン" tab of the setting dialog.
    • Confirm that the comment have description for how to specify addresses like below ...OK
      # (5) ドメインだけでなくアドレス全体を指定することもできます。
      #     * @を含む場合はアドレスが指定されたとみなします。
      #     * @を含まない場合はドメインが指定されたとみなします。
      #
      
  • Add entries as following to the "注意が必要なドメイン" setting
    test@a.co.jp
    *test@b.co.jp
    -*test@c.co.jp
    test2@*
    test.co.jp
    
  • Try to send mail to test@a.co.jp and test3@a.co.jp (test for test@a.co.jp
    • Confirm that test@a.co.jp is in "添付ファイル/その他の警告" ...OK
    • Confirm that test3@a.co.jp is not in "添付ファイル/その他の警告" ...OK
  • Try to send mail to test-test@a.co.jp and test-test@b.co.jp (test for *test@b.co.jp)
    • Confirm that test-test@b.co.jp is in "添付ファイル/その他の警告" ...OK
    • Confirm that test-test@a.co.jp is not in "添付ファイル/その他の警告" ...OK
  • Try to send mail to test-test@a.co.jp and test-test@c.co.jp (test for -*test@c.co.jp)
    • Confirm that test-test@a.co.jp and test-test@c.co.jp are not in "添付ファイル/その他の警告" ...OK
  • Try to send mail to test2@a.co.jp and test2@c.co.jp (test for test2@*)
    • Confirm that test2@a.co.jp and test2@c.co.jp are in "添付ファイル/その他の警告" ...OK
  • Try to send mail to test-test@test.co.jp and test-test@a.co.jp (test for test.co.jp, domain case)
    • Confirm that test.co.jp is in "添付ファイル/その他の警告" ...OK
      • The message shoud be "[警告] 注意が必要なドメイン(test.co.jp)が宛先に含まれています。"
    • Confirm that test-test@a.co.jp is in not "添付ファイル/その他の警告" ...OK

@HashidaTKS HashidaTKS requested a review from piroor May 28, 2024 09:21
@HashidaTKS HashidaTKS marked this pull request as ready for review May 28, 2024 09:21
Copy link
Member

@piroor piroor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen codes and its actual behavior and confirmed it works as expected. This looks good to merge.

@piroor piroor merged commit 7eb4a76 into master May 29, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants