auth icon indicating copy to clipboard operation
auth copied to clipboard

feat: Block specific outgoing mail servers

Open doublethink opened this issue 9 months ago • 2 comments

What kind of change does this PR introduce?

Feature that gives configuration option to block an email address event if the mx server of the domain is on a blocklist

What is the current behavior?

Existing behavior only checks for syntax issues and single email addresses against a message stream.

What is the new behavior?

This is called on every sent email event, the mx server of the email addresses domain is queried and checked against a hard-coded blocklist

Additional context

Functionality to allow for the long term blocking of bot and spam behavior.

Resolves SEC-245

doublethink avatar Mar 27 '25 02:03 doublethink

Pull Request Test Coverage Report for Build 14163310705

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 29 of 35 (82.86%) changed or added relevant lines in 2 files are covered.
  • 883 unchanged lines in 34 files lost coverage.
  • Overall coverage increased (+0.05%) to 67.541%

Changes Missing Coverage Covered Lines Changed/Added Lines %
internal/conf/configuration.go 15 17 88.24%
internal/mailer/validate.go 14 18 77.78%
<!-- Total: 29 35
Files with Coverage Reduction New Missed Lines %
internal/reloader/reloader.go 1 99.28%
internal/api/password.go 2 65.85%
internal/api/audit.go 3 77.78%
internal/api/helpers.go 4 80.49%
internal/api/logout.go 4 81.58%
internal/api/anonymous.go 6 70.0%
internal/api/reauthenticate.go 6 48.57%
internal/api/api.go 7 83.56%
internal/api/pkce.go 7 80.33%
internal/api/recover.go 8 67.39%
<!-- Total: 883
Totals Coverage Status
Change from base Build 14063281414: 0.05%
Covered Lines: 10246
Relevant Lines: 15170

💛 - Coveralls

coveralls avatar Mar 28 '25 01:03 coveralls