From: mouss (no email)
Date: Wed Nov 01 2006 - 11:16:21 EST
wrote:
> The postfix server in question simply passes inbound valid mail to our exchange server
> and passes outbound mail to an external mail service run by messagelabs, messagelabs
> then passes it on to the outside world.
>
> It's the messagelabs server that puts in the X-SpamReason header. I need to catch
> this X-SpamReason value and if it's >0 & <= 4 do nothing with it, just pass it
> onto exchange.
>
> If the X-SpamReason header value is > 4 & < 7 prepend the subject with [SPAM] and
> pass it to exchange as normal, letting the user set a rule in outlook for this if
> they wish.
>
> X-SpamReason > 7 will result in the mail getting redirected to a quarantine address
> in exchange.
>
> I've tried to google software that will let me do this, but I'm not having much luck.
> I had thought about setting up my own content_filter but like yourself I considered it
> overkill.
>
> Would procmail/maildrop work with the situation I described above ? I don't have any
> experience of procmail or maildrop.
>
>
yes. Here is a summary (with maildrop)
- use transports to deliver mail for @domain.example to maildrop
- maildrop
* checks the spam header.
* maildrop gets the subject
* if spam, maildrop runs reformail to change the subject
* maildrop forwards mail to .example
- use transports to forward @done.domain.example to your exchange server
- use generic to rewrite @done.domain.example to @domain.example
but this sounds like "trying to avoid a content_filter at all expenses"!
see below.
> If anyone knows any software which will do what I'd appreciate a heads up. We aren't doing
> our own spam/virus scanning so I can't rewrite the subject with spamassassin.
>
>
you could run SA with just one rule: match the X-SpamReason header and
score it enough to trigger sbject rewrite. but there is no need to use
SA just for this.
Instead,
- write a script to check the spam header and modify the subject accordinly
- use smtpprox to run the script
If you are not confortable writing scripts or maildrop/procmail recipes,
here is a postfix-only way. Convoluted but...
- add an smtpd (let's say on 127.0.0.1:10099) and a corresponding
cleanup to your master.cf. This cleanup has a header check that always
tags the subject:
/^Subject: (.*)/ REPLACE Subject: [Spam] $1
- In the "standard" header_checks, use
/X-SpamReason: Yes, hits=([1..4]\.[0-9]*).*required/ FILTER
scan:[127.0.0.1]:10099
where scan is defined as a filtering transport in master.cf
- the smtpd on 10099 has no content_filter, does no unknown recipient
validation, ... (see the FILTER_README for examples of configuration.
copy options of the smtpd on 10025 from there).
|
|
|