Richard Smits wrote:
Hello,

I have a puzzle which I hope someone can help me with. I want to do a header check with postfix, and if the subject, contains a word, call a script or program to put the mail message in a quarantaine.

I also want to make an exception for some email recipients.

I know we can do this with amavis and spamassassin, but I don't want to use spamassassin. The reason for this construction is that our isp will implement a spamfilter, and i don't want to check the emails twice.

If the message has a spamtag in the subject, i want to put it in a quarantainedir. But some people want to receive their spam, so those are the exceptions.

So, is this possible with postfix alone, and without spamassassin ?
No.  You need some sort of content filter daemon to do this.
Reasoning:

  1. header_checks can only REDIRECT to another address (which of
     course can then be piped) or FILTER to a content filter
  2. header_checks CANNOT exempt certain recipients for a given
     transport (assuming you put it in master.cf and not main.cf)

If you remove the exemption requirement, then it IS possible for postfix alone if and only if a previous filter applied such a header. Then, the REDIRECT option becomes available.

Brian

Reply via email to