How to reject SMTP send if From header doesn't match SMTP user?
Good morning,
As the title says, How to reject SMTP send if From header doesn't match SMTP user?
Concretely, I want to disallow user1@domain.com to send emails with "From: user2@domain.com" in the header.
Thanks in advance.
-
Hello, After a lot of searching, I decided to filter these email using Exim filter. So, I added /usr/local/cpanel/etc/exim/sysfilter/options/fail_from_dont_match_sender
with the following content:if $header_from: does not matches "" and $header_from: does not contains $sender_address then fail text "From header doesn't match authenticated sender" seen finish endif
I applied changes by enabling this filter on WHM > Service Configuration > Exim Configuration Manager but it doesn't work. I did something wrong?0 -
Hello. Does adjusting this line make any changes to the way that your filter works?: if $header_from: does not matches "" and
Specifically changing "matches" to "match". We must note that our assistance on this matter is quite limited, though you may be able to get this to work through testing various changes in the custom filter.0
Please sign in to leave a comment.
Comments
4 comments