Re: Looking for a simple `Filter_classifier` program

Martin Gregorie <[email protected]> Sun, 06 Nov 2022 20:48:45 +0000
Newsgroups gmane.mail.getmail.user
Organization Martin Gregorie
Message-ID <[email protected]>
On Sun, 2022-11-06 at 20:46 +0100, Francesco Ariis wrote:
> Hello list,
> =C2=A0=C2=A0=C2=A0 tl;dr: what Filter_classifier do you use, if any?
>=20
I feed messages retrieved by getmail into a pipeline which can be
summarised as:

  getmail | spamc | spamkiller | fixfetch | sendmail

where:

- spamc sends the message to the spamassassin daemon and accepts the
  processed and annotated message from it

- spamkiller writes spam to a quarantine storage directory. A daily cron
  job discards messages that are over a week old and passes ham to
  fixfetch=C2=A0

- fixfetch  cleans up the argument set to keep sendmail happy and passes
  the message and delivery details before passing the message to
  sendmail=20

- sendmail passes the message to postfix for delivery to destinations on
  my lan
  =20
Postfix is configured to output two copies of each message that reaches
it. One copy is passed to Dovecot for delivery on my LAN and the other
is blind-copied to a Java front end for loading into my PostgreSQL-based
mail archive.

This setup should be easy to adapt to your requirements because I use a
number of site-specific Spamassassin rules to control downstream message
handling:

- spamkiller is straight forward: it simply dumps all messages with a
  spam score exceeding a configured value (6.0) into the quarantine
  store. A cron job reports new quarantine arrivals each day. I also
  have a PHP page on my local Apache server which lets me inspect and
  retrieve quarantined messages.=20

- there are a number of locally defined SA rules whose only purpose is
  to control the handling of mail that isn't spam but which should be
  excluded from the mail archive. These rules all have low or negative
  SA scores and are skipped by the mail archive loader.

This setup covers all my needs, but could be easily extended to handle
your requirements because Spamassassin rules are all defined as Perl
regexes.

HTH
Martin