How to reject/detect emails claiming to be from my own domain?

Philip Parsons pparsons at techeez.com
Thu Dec 29 21:28:27 UTC 2016


Kind of weird issue if I add the mydomain.com          REJECT rule to access and reload it does reject it but all good mail throws this error Mailbox disabled for this recipient?

It seems to try and deliver direct to the server instead of using the generated mailhost file that normally works.

-----Original Message-----
From: MailScanner [mailto:mailscanner-bounces+pparsons=techeez.com at lists.mailscanner.info] On Behalf Of Philip Parsons
Sent: December 29, 2016 12:33 PM
To: MailScanner Discussion <mailscanner at lists.mailscanner.info>
Subject: RE: How to reject/detect emails claiming to be from my own domain?

I thought about the access file but did not know it looked at envelope sender.  This might work for me, like you no inbound SMTP should be from someone at mydomain.com I will run some tests.

-----Original Message-----
From: MailScanner [mailto:mailscanner-bounces+pparsons=techeez.com at lists.mailscanner.info] On Behalf Of Peter H. Lemieux
Sent: December 29, 2016 12:01 PM
To: MailScanner Discussion <mailscanner at lists.mailscanner.info>
Subject: Re: How to reject/detect emails claiming to be from my own domain?

The access database in sendmail uses the envelope sender.  On my systems no legitimate inbound mail comes to my SMTP listener from someone at mydomain.com so I can block mydomain.com in /etc/mail/access with

mydomain.com          REJECT

However that may not be possible for you if you must support inbound mail from senders on the Internet.  Depending on who they are and where they are located, you can add them to /etc/mail/access with

From:goodguy at mydomain.com     RELAY

then block the residual as in the first example.  You can also permit certain IP addresses or subnets with

Connect:10.10.10.     RELAY

That matches the 10.10.10.0/24 subnet.  For more details, read http://www.sendmail.com/sm/open_source/docs/m4/anti_spam.html#access_db

Sendmail is not as flexible as Postfix in this regard.  The latter can use regular expressions, but sendmail's access database only matches text strings.

Peter


On 12/29/2016 12:50 PM, Philip Parsons wrote:
> I am trying to get one that does the envelope-from header so at the MTA side of things.  I am hoping someone has done this with sendmail as changing the MTA is not possible at the moment.


-- 
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



-- 
MailScanner mailing list
mailscanner at lists.mailscanner.info
http://lists.mailscanner.info/mailman/listinfo/mailscanner


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



More information about the MailScanner mailing list