Can SpamAssassin rule check sender's domain?

Forum for getting help with Project Gamera, Spamassassin, Clamav, qmail-scanner and other anti-spam tools.
coolemail
Forum Regular
Forum Regular
Posts: 369
Joined: Tue Dec 16, 2008 8:01 am
Location: United Kingdom

Can SpamAssassin rule check sender's domain?

Unread post by coolemail »

We have CentOS 5, ASL, Plesk 10 with qmail-scanner.
We have a spate of Spam which are a picture with some random rubbish wording at the bottom. In almost all cases, the sender's domain does not exist, e.g. New-Car-Now@poserldfnizey.net
I've noticed with one client who forwards mail to a tiscali email address that their system blocks them:
Remote host said: 553 #5.1.8 Domain of sender address <staggeringq@natpaymail.org> does not exist
Can we do this on Spamassassin? I've looked quite carefully at all their rules but cannot see something like this on the rule list. Can it be written like tiscali obviously do?
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: Can SpamAssassin rule check sender's domain?

Unread post by faris »

qmail-scanner can be set to reject if there's an SA score of X + Y, where X is the normal score, and Y is what you set in qmail-scanner.ini

All you need to do is create a rule that looks for the offending domains, and give it a +100 score.
Note that spamdyke can also effectively check for non-existent domains via MX record checking (checks the FROM: address, I think, so will work), so you don't have to even write a rule.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: Can SpamAssassin rule check sender's domain?

Unread post by faris »

oh, you can also just add blacklist_from *@domain.tld so you don't have to write a rule if you don't want to.

(EDIT: correct syntax is *@domain.tld not @domain.tld)
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
coolemail
Forum Regular
Forum Regular
Posts: 369
Joined: Tue Dec 16, 2008 8:01 am
Location: United Kingdom

Re: Can SpamAssassin rule check sender's domain?

Unread post by coolemail »

Thanks faris,
The problem is that every email has a ottally different, totally random domain. So I was hoping that SA could do it. Time, I think for spamdyke to be added to the arsenal!
Post Reply