The following is NOT recommended. It presumes all email from you to you is spoofed, under these conditions:
Depending on where you put it, it will accept such mail which comes in on port 587; that means everyone who's an authenticated sender on the server. But otherwise it may deny such messages even if they originate on the server. Which means if you want to get email which the server sends from your address (which it may do depending on your setup) you'll need to be careful to accept those emails before this deny.
Note also that it depends on the
sender address which may or may not be the same as the
From address, and the
recipient address which may not be the same as the
To address.
I'm not going to suggest where you should put it because frankly I don't think you should put it anywhere, but if you want to know in which section of the file it would go to be effective, it needs to be in the
acl_check_recipient section.
WARNING: This code is NOT tested; it may break everything. Try it at your own risk. Or hire me (I wrote the default SpamBlocker exim.conf file used by DirectAdmin and the SpamBlocker-powered exim.conf file for DirectAdmin I give away
here [nobaloney.net]) or someone else from these forums to create, test and install a solution for you.
Code:
#deny spoofed email from me
deny message = Spoofed sender says it's me
senders = [email protected]
local parts = me
domains = example.com
Jeff