[Mailman-Users] Filtering with procmail.

Mark Sapiro msapiro at value.net
Thu May 26 06:29:56 CEST 2005


Niels Richter wrote:
>
>I'm running a mailman-installation at a seperat server. It only gets
>the mails, an spread them to the users. The SPAM-filtering is running
>at another machine but also the SPAM-marked mails are send to the
>mailman-server.
>
>So my problem is to get procmail in contact with the incoming mails to
>filter this mails.

The way we do it is we don't use MTA aliases for mailman at all. We
tell the MTA to send all mail for the domain to procmail. Then, rules
in .procmailrc use envelope to in order to decide to what address to
forward the mail or in what mailbox to store the mail or if it's a
mailman list, the command to pipe it to mailman. Here's an excerpt
from .procmailrc

EnvelopeTo = $1


:E
* EnvelopeTo ?? ^mailman$
|sudo -u mailman /var/mailman/mail/mailman post mailman
:E
* EnvelopeTo ?? ^mailman-admin$
|sudo -u mailman /var/mailman/mail/mailman admin mailman
:E
* EnvelopeTo ?? ^mailman-bounces$
|sudo -u mailman /var/mailman/mail/mailman bounces mailman
:E
* EnvelopeTo ?? ^mailman-confirm$
|sudo -u mailman /var/mailman/mail/mailman confirm mailman
:E
* EnvelopeTo ?? ^mailman-join$
|sudo -u mailman /var/mailman/mail/mailman join mailman
:E
* EnvelopeTo ?? ^mailman-leave$
|sudo -u mailman /var/mailman/mail/mailman leave mailman
:E
* EnvelopeTo ?? ^mailman-owner$
|sudo -u mailman /var/mailman/mail/mailman owner mailman
:E
* EnvelopeTo ?? ^mailman-request$
|sudo -u mailman /var/mailman/mail/mailman request mailman
:E
* EnvelopeTo ?? ^mailman-subscribe$
|sudo -u mailman /var/mailman/mail/mailman subscribe mailman
:E
* EnvelopeTo ?? ^mailman-unsubscribe$
|sudo -u mailman /var/mailman/mail/mailman unsubscribe mailman


>
>My question is: does someone have a solution for this problem or is
>there a better method to filter already marked SPAM-Mails?

Another way is to use header_filter_rules (in Privacy options...->Spam
filters) to recognize your spam markings and discard the spam, but the
earlier in the process that you can dump it, the better.

--
Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan




More information about the Mailman-Users mailing list