Hi, Procmail, it can move messages around based on many rules. Use something like this in postfix main.cf: mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME And something like this in /etc/procmailrc or $HOME/.procmailrc SPAMDIR=$HOME/Maildir/.Spam/ :0fw | /usr/bin/spamc :0 * ^X-Spam-Status: Yes $SPAMDIR DEFAULT=$HOME/Maildir/ ORGMAIL=$HOME/Maildir/ DROPPRIVS=yes HTH -- Sent from the Delta quadrant using Borg technology! Nux! www.nux.ro ----- Original Message ----- > From: "Nicolas Kovacs" <info@xxxxxxxxxxxxx> > To: "CentOS mailing list" <centos@xxxxxxxxxx> > Cc: "scholae >> AA Tous les salariés" <scholae@xxxxxxxxxxxxxxxxxxx> > Sent: Tuesday, 18 December, 2018 07:08:55 > Subject: Spamassassin + Postfix : delete spam mail on the server ? > Hi, > > My mail server is running on CentOS 7 with Postfix, Dovecot and > Spamassassin. I get quite a lot of spam on a few accounts, and > Spamassassin does its job fine. Spam mail is identified correctly, and > it looks like there are no false positives, e. g. valid mail is never > identified as spam. > > When a message is flagged as spam, the subject line is rewritten to > begin with [SPAM]. Then, a filter in Mozilla Thunderbird is setup, and > when a subject line begins with [SPAM] the message is directly sent to > Trash. > > I've documented the whole configuration here: > > * https://blog.microlinux.fr/spamassassin-centos/ > > The problem with this setup is that spam mail is still delivered, and I > need Thunderbird's filters to weed out incoming mail. And when I'm using > my webmail (running SquirrelMail), my inbox is a tsunami of unread > [SPAM] messages. > > So I'd like to go a step further and delete all messages flagged [SPAM] > directly on the server. It doesn't look like Spamassassin provides this > functionality. > > Did any of you guys succeed in doing this anyway? > > Cheers, > > Niki > > > -- > Microlinux - Solutions informatiques durables > 7, place de l'église - 30730 Montpezat > Site : https://www.microlinux.fr > Blog : https://blog.microlinux.fr > Mail : info@xxxxxxxxxxxxx > Tél. : 04 66 63 10 32 > _______________________________________________ > CentOS mailing list > CentOS@xxxxxxxxxx > https://lists.centos.org/mailman/listinfo/centos _______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx https://lists.centos.org/mailman/listinfo/centos