Re: [SLUG] Spamassassin redirect mail?

From: Dylan William Hardison (dylanwh@tampabay.rr.com)
Date: Mon May 12 2003 - 01:39:45 EDT


On Sunday, May 11, 2003 at 10:48PM -0400, Doug Koobs wrote:
> I'm using Postfix/SpamAssassin to act as a spam blocker for a single
> domain (let's call it domain.tld). This server has no local recipients,
> but just forwards all mail (after checking a few RBL's) to the internal
> Notes server. Spamassassin is tagging the spam correctly, and changing the
> subject line, and then Postfix forwards it on, and everyhting works great.
> What I would like to do, though, is get it to redirect all mail tagged as
> Spam to an alternate email address, where it can be reviewed and manually
> deleted by one person (hopefully not me!!!). What I mean by this is that
> all incoming mail that gets tagged as Spam, regardless of who it was
> originally sent to, would get redirected to another recipient (say,
> spam@domain.tld).
>
> I assume that if SpamAssassin can alter the subject line, it can also
> alter the recipient, but I can't seem to find any documentation on how to
> do this... Any hints?

No, you don't want SpamAssassin doing that. You want to use procmail.
After you get procmail set up, you'll want a procmailrc file something
like the following:

--- begin ~/.procmailrc ---
:0
* ^X-Spam-Flag:.*YES
!billgates@microsoft.com
--- end ~/.procmailrc ---

wait a sec... Are you using SpamAssassin and Postfix without procmail? I
thought you had to use procmail in order to use SpamAssassin. hehe.

Anyway, procmail is what you want for stuff like that.

I'm not sure how to do a 'global' procmailrc file, but I'm sure it is
possible.

(I've got a fetchmail + postfix + procmail + spamassassin running on my
box, and I've got all SLUG mails going to a SLUG folder, and all
Spam going to a Spam folder, using Maildir-style storage, and I even
have a MegaHAL-style bot answering email with a certain Subject: line.
Quite handy, really. :-)

-- 
Bad men live that they may eat and drink, whereas good men eat and drink
that they may live.
                -- Socrates
GPG Fingerprint=D67D 2B75 53C6 9769 30E4  D390 239F C833 F32C F6F6
GPG KeyID=F32CF6F6




This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:44:09 EDT