Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I created a blacklist rule to filter out messages:

From: *@job.com yes

It works, partly, except that part of those messages are sent with a return-path other than job.com. I Googled a bit and Mailscanner actually check the return-path field when you specify "From:". I can't seem to find a why to actually match the From header.

Is there a way to make a rule that matches the From header?

share|improve this question

2 Answers 2

You'll find that this kind of filter is a lot easier to set up in procmail than in Spamassassin, and procmail will co-exist happily with Spamassassin.

share|improve this answer
    
I typed Spamassasin, but I meant Mailscanner... I don't know if procmail and mailscanner are inter operable, but I'll look into it. I do have procmail experience, so writing filter rules in there would be simple. –  Halfgaar Apr 15 '11 at 11:25
up vote 0 down vote accepted

Just for the record: I used /etc/Mailscanner/spam.assassin.prefs.conf and put this in it:

blacklist_from *@job.com
blacklist_from *@experteer.com

The file wasn't loaded by Mailscanner initially, but all I had to do was include a symlink to it in /etc/spamassassin/ (named mailscanner.cf in my case). Newer Debian (based) distro's don't require this symlink anymore, but this is an old deprecated server.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.