1

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?

Caleb
  • 11,583
  • 4
  • 35
  • 49
Halfgaar
  • 7,921
  • 5
  • 42
  • 81

2 Answers2

1

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.

Mike Scott
  • 7,903
  • 29
  • 26
  • 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
1

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.

Halfgaar
  • 7,921
  • 5
  • 42
  • 81