Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I created a blacklist rule to filter out messages:

From: * yes

It works, partly, except that part of those messages are sent with a return-path other than 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

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 1 down vote accepted

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

blacklist_from *
blacklist_from *

The file wasn't loaded by Mailscanner initially, but all I had to do was include a symlink to it in /etc/spamassassin/ (named 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


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.