Confixx: Postfix Spam Mails automatisch in einen Ordner verschieben

Home/Allgemein, Confixx, Debian, Linux/Confixx: Postfix Spam Mails automatisch in einen Ordner verschieben

Confixx: Postfix Spam Mails automatisch in einen Ordner verschieben

Bei Confixx gibt es derzeit leider keine integrierte Möglichkeit Spam E-Mails in einen dafür vorgesehenen Ordner abzulegen, daher hier eine kleine Anleitung wie Ihr dies in wenigen Schritten selbst bewerkstelligen könnt.

System: Debian 6.0 mit Confixx 3.x und Postfix + Procmail

File: /etc/procmailrc sucht hier nach:

# Mails with a score of 15 or higher are almost certainly spam (with 0.05%
# false positives according to rules/STATISTICS.txt). Let's put them in a
# different mbox. (This one is optional.)
:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
almost-certainly-spam

File: /etc/procmailrc Snippet zum einfügen:

# All mail tagged as spam (eg. with a score higher than the set threshold)
# is moved to "SPAM".
:0:
* ^X-Spam-Status: Yes
$DEFAULT.SPAM/

Komplett sollte das ganze dann ca. so aussehen:

# SpamAssassin sample procmailrc
# ==============================

# The following line is only used if you use a system-wide /etc/procmailrc.
# See procmailrc(5) for infos on what it exactly does, the short version:
# * It ensures that the correct user is passed to spamd if spamc is used
# * The folders the mail is filed to later on is owned by the user, not
# root.
DEFAULT=$HOME/Maildir/
DROPPRIVS=yes
LOGFILE=$HOME/procmail.log
SHELL=/bin/sh

# Pipe the mail through spamassassin (replace 'spamassassin' with 'spamc'
# if you use the spamc/spamd combination)
#
# The condition line ensures that only messages smaller than 250 kB
# (250 * 1024 = 256000 bytes) are processed by SpamAssassin. Most spam
# isn't bigger than a few k and working with big messages can bring
# SpamAssassin to its knees.
#
# The lock file ensures that only 1 spamassassin invocation happens
# at 1 time, to keep the load down.
#
:0fw: spamassassin.lock
* < 256000
| /usr/bin/spamc
#| spamassassin

# Mails with a score of 15 or higher are almost certainly spam (with 0.05%
# false positives according to rules/STATISTICS.txt). Let's put them in a
# different mbox. (This one is optional.)
:0:
* ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*
almost-certainly-spam

# All mail tagged as spam (eg. with a score higher than the set threshold)
# is moved to "YOUR-DIRECTORY".
:0:
* ^X-Spam-Status: Yes
$DEFAULT.SPAM/

.....
By | 2013-11-14T13:58:19+00:00 August 23rd, 2012|Allgemein, Confixx, Debian, Linux|Comments Off on Confixx: Postfix Spam Mails automatisch in einen Ordner verschieben