blacklisting local domain?

Kevin Miller Kevin_Miller at
Tue Jan 13 18:19:46 GMT 2009

Publish SPF records.  See Should help a bunch...

Kevin Miller                Registered Linux User No: 307357
CBJ MIS Dept.               Network Systems Admin., Mail Admin.
155 South Seward Street     ph: (907) 586-0242
Juneau, Alaska 99801        fax: (907 586-4500 
-----Original Message-----
From: mailscanner-bounces at
[mailto:mailscanner-bounces at] On Behalf Of Michael
Sent: Tuesday, January 13, 2009 8:58 AM
To: <MailScanner discussion
Subject: blacklisting local domain?

Is there any way MailScanner can blacklist email that says it's from my
domain, but comes from an IP outside of my ipspace?   We force all of
our clients to use our specific smtp server. 

We've been getting hit very hard with these self addressed spams lately
and MailScanner has been doing a fantastic job of tagging these as spam,
but the problem is that even though our commercial email system accepts
spamassassin header tags to put them in the appropriate junk folder
automatically, it ignores the headers if it thinks the sender is oneself
and then I get complaints about these spams getting through.

The real solution is obviously for the commercial vendor to fix this
problem and trust spamassassin all the time, but this has been going on
for years and they aren't going to change it any time soon, so I'm stuck
with getting rid of these messages at the SMTP/Mailscanner stage before
they get passed on to the rest of the mail system.    I've implemented
mailfromd which allows me to automatically reject any email that uses
our domain as a sending domain and doesn't come from within our ip space
at the SMTP negotiation envelope level and this is blocking 99% of them,
but there are a few that are still sneaking through because they use
some other domain at the smtp "mail from:" envelope stage which allows
them to bypass mailfromd, but then in the data portion of the email they
use our domain in the  from: address in the header which then confuses
our email system into ignoring the spamassassin header tag again.

As I said, MailScanner/Spamassassin is properly tagging these emails as
spam, but the tags get ignored by an oversight on our mail system.  We
force all of our clients to use our own smtp server, so there should
never be a case of an email with a sender address of our domain coming
from outside of our domain.    Is it possible for MailScanner to
blacklist these?


MailScanner mailing list
mailscanner at

Before posting, read

Support MailScanner development - buy the book off the website! 

More information about the MailScanner mailing list