Re: Macros for reporting spam...
On Tue, Aug 23, 2005 at 08:55:07PM -0400, Forrest Aldrich wrote:
> I have a setup from a while ago that will forward spam to Spamcop
> (mime_forward = yes).
>
> I am trying to figure out how to whip up a more clever macro that will:
>
> - do spamcop reports
> - report to Razor2
> - report to my bluesecurity.com reports account (requires a forward)
> - submit to sa-learn (spamassassin) - not sure sa-learn will accept a
> pipe, though
>
> etc.
>
> I figure someone here must have a similar (or better) approach.
>
> Bascially, I'm trying to streamline the reporting process so it's not
> such a chore.
I use an email alias to do all the heavy lifting:
"|/usr/local/bin/spamassassin -r 2>&1 > /dev/null || exit 75"
I use postfix, but I think that should work with sendmail and qmail. If
you need to report to more things than spamassassin -r does you should
be able to just add more lines. Or, if you want to be more accurate
about the error reporting (the || exit 75 will bounce the email back to
the queue if the program fails) you could setup one alias for each thing
you want to report to and let your MTA figure it all out. That way if
one service fails you could still report to the others (and not send
duplicate reports).
The integration with mutt is:
macro pager < "<bounce-message>spamreport@domain<enter><enter><delete-message>"
"Learns and reports mail as SPAM"
macro index < "<bounce-message>spamreport@domain<enter><enter><delete-message>"
"Learns and reports mail as SPAM"
> The only manual effort I'll have to retain is getting the IPs of the
> senders so I can place them into my firewall filters.
Unless you get a *LOT* of spam (or have a slow connection), I wouldn't
bother. At least spamassassan does fine for me.
--
Jim C. Nasby, Database Architect decibel@xxxxxxxxxxx
Give your computer some brain candy! www.distributed.net Team #1828
Windows: "Where do you want to go today?"
Linux: "Where do you want to go tomorrow?"
FreeBSD: "Are you guys coming, or what?"