Aus crazylinux.de
Zur Navigation springen Zur Suche springen

Mimedefang ist ein Framework für Filter in Sendmail.

Dazu gibts diese Konfig-Files:

1 /etc/mail/sendmail.mc

INPUT_MAIL_FILTER(`mimedefang', `S=unix:/var/spool/MIMEDefang/mimedefang.sock, F=T, T=S:1m;R:1m')dnl

2 /etc/mail/mimedefang.conf

# Run the multiplexor and filters as this user, not root.  RECOMMENDED

# Set to yes if you want the multiplexor to log stats in
# /var/log/mimedefang/stats  The /var/log/mimedefang directory must
# exist and be writable by the user you're running MIMEDefang as.

# The contents of the "X-Scanned-By" header added to each mail.  Do
# not use the quote mark (') in this setting.  Setting it to "-"
# prevents the header from getting added at all.
X_SCANNED_BY="mygretchen.de SecurityScanner"

die Datei /var/log/mimedefang/stats muss existieren und user defang gehören!

3 /etc/mail/mimedefang.pl.conf

gretchen:/etc/mail# more mimedefang.pl.conf
# Mimedefang configuration file
# This file is a perl file which gets 'require'd from mimedefang
# You can set the virus-scanner paths etc.
# See mimedefang.pl

#$Features{'Virus:NAI'}      = '/usr/local/bin/uvscan';
$Features{'Virus:CLAMAV'}      = '/usr/bin/clamscan';

# DO NOT delete the next line, or Perl will complain.

4 /etc/mail/mimedefang-filter

$AdminAddress = 'postmaster@mygretchen.de';
$AdminName = "Mail Administrator";
$GeneralWarning = "ACHTUNG: Hier ist der Mailserver von mygretchen.de";
$DaemonAddress = 'postmaster@mygretchen.de';

  if ($hits >= $req) {
                 action_change_header("X-Spam-Score", "$hits ($score) $names");
                 action_change_header('Subject', "***SPAM*** $Subject");            #<---- Änderung!!