PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Postfix als Relay / Spam-Virenfilter



rkelly_2
11.05.05, 17:42
Hallo,

auf einer SuSe 9.1-Maschine soll ein Antispam-Virenfilter laufen.
Zum Einsatz kommt Suse 9.1, Postfix 2.1.1, amavis 2.04, clamav 0.83 und dspam 3.4.5

Alle Programme sind installiert (RPM´s bis auf dspam) und konfiguriert.
Hier die Config-Dateien:

amavisd.conf:
use strict;
$mydomain = 'local';
$MYHOME = '/var/spool/amavis';
$TEMPBASE = "$MYHOME/tmp";
@bypass_spam_checks_maps = (1); # uncomment to DISABLE anti-spam code
$max_servers = 2; # number of pre-forked children
$daemon_user = 'vscan';
$daemon_group = 'vscan';
@local_domains_maps = ( [".$mydomain"] );
$log_level = 2;
$log_templ = '[? %#V |[? %#F |[?%#D|Not-Delivered|Passed]|BANNED name/type (%F)]|INFECTED (%V)], #
[?%o|(?)|<%o>] -> [<%R>|,][? %i ||, quarantine %i], Message-ID: %m, Hits: %c';
$DO_SYSLOG = 1;
$SYSLOG_LEVEL = 'mail.info';
$ENV{TMPDIR} = $TEMPBASE;
$QUARANTINEDIR = '/var/spool/amavis/virusmails';
$LOGFILE ="/var/log/amavis.log";
$inet_socket_port = 10024; # accept SMTP on this local TCP port(s) (Postfix)
$unix_socketname = "$MYHOME/amavisd.sock"; # when using sendmail milter
@inet_acl = qw( 127.0.0.1 );
$sa_mail_body_size_limit = 200*1024; # don't waste time on SA if mail is larger
$sa_auto_whitelist = 1; # turn on AWL in SA (default: false)
$sa_tag_level_deflt = 2.0; # add spam info headers if at, or above that level
$sa_tag2_level_deflt = 5.0;
$sa_kill_level_deflt = 6.31; # triggers spam evasive actions
$sa_dsn_cutoff_level = 10; # spam level beyond which a DSN is not sent,
$virus_admin = "virusalert\@$mydomain";
$mailfrom_notify_admin = "virusalert\@$mydomain";
$mailfrom_notify_recip = "virusalert\@$mydomain";
$mailfrom_notify_spamadmin = "spam.police\@$mydomain";
$mailfrom_to_quarantine = ''; # override sender address with null return path
$QUARANTINEDIR = '/var/lib/amavis/virusmails';
$virus_quarantine_to = 'virus-quarantine'; # traditional local quarantine
@addr_extension_virus_maps = ('virus');
@addr_extension_spam_maps = ('spam');
@addr_extension_banned_maps = ('banned');
@addr_extension_bad_header_maps = ('badh');
$path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin';
$file = 'file'; # file(1) utility; use 3.41 or later to avoid vulnerability
$gzip = 'gzip';
$bzip2 = 'bzip2';
$lzop = 'lzop';
$rpm2cpio = ['rpm2cpio.pl','rpm2cpio'];
$cabextract = 'cabextract';
$uncompress = ['uncompress', 'gzip -d', 'zcat'];
$unfreeze = ['unfreeze', 'freeze -d', 'melt', 'fcat'];
$arc = ['nomarch', 'arc'];
$unarj = ['arj', 'unarj'];
$unrar = ['rar', 'unrar'];
$zoo = 'zoo';
$lha = 'lha';
$cpio = ['gcpio','cpio'];
$dspam = 'dspam';
$MAXLEVELS = 14;
$MAXFILES = 1500;
$MIN_EXPANSION_QUOTA = 100*1024; # bytes (default undef, not enforced)
$MAX_EXPANSION_QUOTA = 300*1024*1024; # bytes (default undef, not enforced)
$MIN_EXPANSION_FACTOR = 5; # times original mail size
$MAX_EXPANSION_FACTOR = 500; # times original mail size
$sa_spam_subject_tag = '***SPAM*** ';
$X_HEADER_TAG = 'X-Virus-Scanned';
$X_HEADER_LINE = "by amavisd-new at $mydomain";
$defang_virus = 1;
$defang_banned = 1;
$undecipherable_subject_tag = '***UNCHECKED*** '; # undef disables it
$remove_existing_x_scanned_headers = 0; # leave existing X-Virus-Scanned alone
$remove_existing_spam_headers = 1; # remove existing spam headers if
# spam scanning is enabled (default)
$notify_method = 'smtp:[127.0.0.1]:10026'; # set to undef with milter!
$forward_method = 'smtp:[127.0.0.1]:10025';
$final_virus_destiny = D_DISCARD;
$final_banned_destiny = D_BOUNCE;
$final_spam_destiny = D_BOUNCE;
$final_bad_header_destiny = D_PASS;
$warnvirusrecip = 1; # (defaults to false (undef))
$warnbannedrecip = 1; # (defaults to false (undef))
@keep_decoded_original_maps = (new_RE(
qr'^MAIL-UNDECIPHERABLE$', # retain full mail if it contains undecipherables
qr'^(ASCII(?! cpio)|text|uuencoded|xxencoded|binhex)'i,
));
$banned_filename_re = new_RE(
# block certain double extensions anywhere in the base name
qr'\.[^./]*\.(exe|vbs|pif|scr|bat|cmd|com|dll)$'i,
qr'^application/x-msdownload$'i, # block these MIME types
qr'^application/x-msdos-program$'i,
[ qr'^\.(rpm|cpio|tar)$' => 0 ], # allow anything in Unix archives
qr'.\.(exe|vbs|pif|scr|bat|cmd|com)$'i, # banned extension - basic
qr'^\.(exe-ms)$', # banned file(1) types
);
$banned_namepath_re = new_RE(
# block these MIME types
qr'(?#NO X-MSDOWNLOAD) ^(.*\t)? M=application/x-msdownload (\t.*)? $'xmi,
qr'(?#NO X-MSDOS-PROGRAM)^(.*\t)? M=application/x-msdos-program(\t.*)? $'xmi,
# within traditional Unix archives allow any name and type
[ qr'(?#rule-4) ^ (.*\t)? T=(tar|rpm|cpio) (\t.*)? $'xmi => 0 ], # allow
# block certain double extensions in filenames
qr'(?# BLOCK DOUBLE-EXTENSIONS )
^ (.*\t)? N= [^\t\n]* \. [^./\t\n]* \.
(exe|vbs|pif|scr|bat|cmd|com|dll) (\t.*)? $'xmi,
# banned filename extensions (in declared names) anywhere - basic
qr'(?# BLOCK COMMON NAME EXENSIONS )
^ (.*\t)? N= [^\t\n]* \. (exe|vbs|pif|scr|bat|com) (\t.*)? $'xmi,
qr'(?# BLOCK Microsoft EXECUTABLES )
^ (.*\t)? T=(exe-ms) (\t.*)? $'xm, # banned file(1) type
);
$banned_namepath_re = undef; # disable the new one
$sql_select_white_black_list = undef; # undef disables SQL white/blacklisting
$recipient_delimiter = '+'; # (default is '+')
$replace_existing_extension = 1; # (default is false)
$localpart_is_case_sensitive = 0; # (default is false)
@score_sender_maps = ({ # a by-recipient hash lookup table
## site-wide opinions about senders (the '.' matches any recipient)
'.' => [ # the _first_ matching sender determines the score boost
new_RE( # regexp-type lookup table, just happens to be all soft-blacklist
[qr'^(bulkmail|offers|cheapbenefits|earnmoney|foryo u)@'i => 5.0],
[qr'^(greatcasino|investments|lose_weight_today|mar ket\.alert)@'i=> 5.0],
[qr'^(money2you|MyGreenCard|new\.tld\.registry|opt-out|opt-in)@'i=> 5.0],
[qr'^(optin|saveonlsmoking2002k|specialoffer|specia loffers)@'i => 5.0],
[qr'^(stockalert|stopsnoring|wantsome|workathome|ye sitsfree)@'i => 5.0],
[qr'^(your_friend|greatoffers)@'i => 5.0],
[qr'^(inkjetplanet|marketopt|MakeMoney)\d*@'i => 5.0],
),
{ # a hash-type lookup table (associative array)
'nobody@cert.org' => -3.0,
'cert-advisory@us-cert.gov' => -3.0,
'owner-alert@iss.net' => -3.0,
'slashdot@slashdot.org' => -3.0,
'bugtraq@securityfocus.com' => -3.0,
'ntbugtraq@listserv.ntbugtraq.com' => -3.0,
'security-alerts@linuxsecurity.com' => -3.0,
'mailman-announce-admin@python.org' => -3.0,
'amavis-user-admin@lists.sourceforge.net'=> -3.0,
'notification-return@lists.sophos.com' => -3.0,
'owner-postfix-users@postfix.org' => -3.0,
'owner-postfix-announce@postfix.org' => -3.0,
'owner-sendmail-announce@lists.sendmail.org' => -3.0,
'sendmail-announce-request@lists.sendmail.org' => -3.0,
'donotreply@sendmail.org' => -3.0,
'ca+envelope@sendmail.org' => -3.0,
'noreply@freshmeat.net' => -3.0,
'owner-technews@postel.acm.org' => -3.0,
'ietf-123-owner@loki.ietf.org' => -3.0,
'cvs-commits-list-admin@gnome.org' => -3.0,
'rt-users-admin@lists.fsck.com' => -3.0,
'clp-request@comp.nus.edu.sg' => -3.0,
'surveys-errors@lists.nua.ie' => -3.0,
'emailnews@genomeweb.com' => -5.0,
'yahoo-dev-null@yahoo-inc.com' => -3.0,
'returns.groups.yahoo.com' => -3.0,
'clusternews@linuxnetworx.com' => -3.0,
lc('lvs-users-admin@LinuxVirtualServer.org') => -3.0,
lc('owner-textbreakingnews@CNNIMAIL12.CNN.COM') => -5.0,
# soft-blacklisting (positive score)
'sender@example.net' => 3.0,
'.example.net' => 1.0,
},
], # end of site-wide tables
});
@av_scanners = (
['ClamAV-clamd',
\&ask_daemon, ["CONTSCAN {}\n", "/var/lib/clamav/clamd-socket"],
qr/\bOK$/, qr/\bFOUND$/,
qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
['KasperskyLab AVP - aveclient',
['/usr/local/kav/bin/aveclient','/usr/local/share/kav/bin/aveclient',
'/opt/kav/bin/aveclient','aveclient'],
'-p /var/run/aveserver -s {}/*', [0,3,6,8], qr/\b(INFECTED|SUSPICION)\b/,
qr/(?:INFECTED|SUSPICION) (.+)/,
],
['KasperskyLab AntiViral Toolkit Pro (AVP)', ['avp'],
'-* -P -B -Y -O- {}', [0,3,6,8], [2,4], # any use for -A -K ?
qr/infected: (.+)/,
sub {chdir('/opt/AVP') or die "Can't chdir to AVP: $!"},
sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"},
],
### The kavdaemon and AVPDaemonClient have been removed from Kasperky
### products and replaced by aveserver and aveclient
['KasperskyLab AVPDaemonClient',
[ '/opt/AVP/kavdaemon', 'kavdaemon',
'/opt/AVP/AvpDaemonClient', 'AvpDaemonClient',
'/opt/AVP/AvpTeamDream', 'AvpTeamDream',
'/opt/AVP/avpdc', 'avpdc' ],
"-f=$TEMPBASE {}", [0,8], [3,4,5,6], qr/infected: ([^\r\n]+)/ ],
# change the startup-script in /etc/init.d/kavd to:
# DPARMS="-* -Y -dl -f=/var/amavis /var/amavis"
# (or perhaps: DPARMS="-I0 -Y -* /var/amavis" )
# adjusting /var/amavis above to match your $TEMPBASE.
# The '-f=/var/amavis' is needed if not running it as root, so it
# can find, read, and write its pid file, etc., see 'man kavdaemon'.
# defUnix.prf: there must be an entry "*/var/amavis" (or whatever
# directory $TEMPBASE specifies) in the 'Names=' section.
# cd /opt/AVP/DaemonClients; configure; cd Sample; make
# cp AvpDaemonClient /opt/AVP/
# su - vscan -c "${PREFIX}/kavdaemon ${DPARMS}"
### http://www.hbedv.com/ or http://www.centralcommand.com/
['H+BEDV AntiVir or CentralCommand Vexira Antivirus',
['antivir','vexira'],
'--allfiles -noboot -nombr -rs -s -z {}', [0], qr/ALERT:|VIRUS:/,
qr/(?x)^\s* (?: ALERT: \s* (?: \[ | [^']* ' ) |
(?i) VIRUS:\ .*?\ virus\ '?) ( [^\]\s']+ )/ ],
# NOTE: if you only have a demo version, remove -z and add 214, as in:
# '--allfiles -noboot -nombr -rs -s {}', [0,214], qr/ALERT:|VIRUS:/,
### http://www.commandsoftware.com/
['Command AntiVirus for Linux', 'csav',
'-all -archive -packed {}', [50], [51,52,53],
qr/Infection: (.+)/ ],
### http://www.symantec.com/
['Symantec CarrierScan via Symantec CommandLineScanner',
'cscmdline', '-a scan -i 1 -v -s 127.0.0.1:7777 {}',
qr/^Files Infected:\s+0$/, qr/^Infected\b/,
qr/^(?:Info|Virus Name):\s+(.+)/ ],
### http://www.symantec.com/
['Symantec AntiVirus Scan Engine',
'savsecls', '-server 127.0.0.1:7777 -mode scanrepair -details -verbose {}',
[0], qr/^Infected\b/,
qr/^(?:Info|Virus Name):\s+(.+)/ ],
# NOTE: check options and patterns to see which entry better applies
### http://www.sald.com/, http://drweb.imshop.de/
['drweb - DrWeb Antivirus',
['/usr/local/drweb/drweb', '/opt/drweb/drweb', 'drweb'],
'-path={} -al -go -ot -cn -upn -ok-',
[0,32], [1,33], qr' infected (?:with|by)(?: virus)? (.*)$'],
### http://www.f-secure.com/products/anti-virus/
['F-Secure Antivirus', 'fsav',
'--dumb --mime --archive {}', [0], [3,8],
qr/(?:infection|Infected|Suspected): (.+)/ ],
['CAI InoculateIT', 'inocucmd',
'-sec -nex {}', [0], [100],
qr/was infected by virus (.+)/ ],
['MkS_Vir for Linux (beta)', ['mks32','mks'],
'-s {}/*', [0], [1,2],
qr/--[ \t]*(.+)/ ],
['MkS_Vir daemon',
'mksscan', '-s -q {}', [0], [1..7],
qr/^... (\S+)/ ],
### http://www.nod32.com/
['ESET Software NOD32', 'nod32',
'-all -subdir+ {}', [0], [1,2],
qr/^.+? - (.+?)\s*(?:backdoor|joke|trojan|virus|worm)/ ],
### http://www.nod32.com/
['ESET Software NOD32 - Client/Server Version', 'nod32cli',
'-a -r -d recurse --heur standard {}', [0], [10,11],
qr/^\S+\s+infected:\s+(.+)/ ],
### http://www.norman.com/products_nvc.shtml
['Norman Virus Control v5 / Linux', 'nvcc',
'-c -l:0 -s -u {}', [0], [1],
qr/(?i).* virus in .* -> \'(.+)\'/ ],
### http://www.pandasoftware.com/
['Panda Antivirus for Linux', ['pavcl'],
'-aut -aex -heu -cmp -nbr -nor -nso -eng {}',
qr/Number of files infected[ .]*: 0(?!\d)/,
qr/Number of files infected[ .]*: 0*[1-9]/,
qr/Found virus :\s*(\S+)/ ],
### http://www.nai.com/
['NAI McAfee AntiVirus (uvscan)', 'uvscan',
'--secure -rv --mime --summary --noboot - {}', [0], [13],
qr/(?x) Found (?:
\ the\ (.+)\ (?:virus|trojan) |
\ (?:virus|trojan)\ or\ variant\ ([^ ]+) |
:\ (.+)\ NOT\ a\ virus)/,
# sub {$ENV{LD_PRELOAD}='/lib/libc.so.6'},
# sub {delete $ENV{LD_PRELOAD}},
],
# NOTE1: with RH9: force the dynamic linker to look at /lib/libc.so.6 before
# anything else by setting environment variable LD_PRELOAD=/lib/libc.so.6
# and then clear it when finished to avoid confusing anything else.
# NOTE2: to treat encrypted files as viruses replace the [13] with:
# qr/^\s{5,}(Found|is password-protected|.*(virus|trojan))/
### http://www.virusbuster.hu/en/
['VirusBuster', ['vbuster', 'vbengcl'],
# VirusBuster Ltd. does not support the daemon version for the workstation
# engine (vbuster-eng-1.12-linux-i386-libc6.tgz) any longer. The names of
# binaries, some parameters AND return codes (from 3 to 1) changed.
"{} -ss -i '*' -log=$MYHOME/vbuster.log", [0], [1],
qr/: '(.*)' - Virus/ ],
### http://www.cyber.com/
['CyberSoft VFind', 'vfind',
'--vexit {}/*', [0], [23], qr/##==>>>> VIRUS ID: CVDL (.+)/,
# sub {$ENV{VSTK_HOME}='/usr/lib/vstk'},
],
### http://www.ikarus-software.com/
['Ikarus AntiVirus for Linux', 'ikarus',
'{}', [0], [40], qr/Signature (.+) found/ ],
### http://www.bitdefender.com/
['BitDefender', 'bdc',
'--all --arc --mail {}', qr/^Infected files *:0(?!\d)/,
qr/^(?:Infected files|Identified viruses|Suspect files) *:0*[1-9]/,
qr/(?:suspected|infected): (.*)(?:\033|$)/ ],
);
@av_scanners_backup = (
### http://www.clamav.net/
['ClamAV-clamscan', 'clamscan',
"--stdout --disable-summary -r --tempdir=$TEMPBASE {}", [0], [1],
qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
### http://www.f-prot.com/
['FRISK F-Prot Antivirus', ['f-prot','f-prot.sh'],
'-dumb -archive -packed {}', [0,8], [3,6],
qr/Infection: (.+)/ ],
### http://www.trendmicro.com/
['Trend Micro FileScanner', ['/etc/iscan/vscan','vscan'],
'-za -a {}', [0], qr/Found virus/, qr/Found virus (.+) in/ ],
['KasperskyLab kavscanner', ['/opt/kav/bin/kavscanner','kavscanner'],
'-i1 -xp {}', [0,10,15], [5,20,21,25],
qr/(?:CURED|INFECTED|CUREFAILED|WARNING|SUSPICION) (.*)/ ,
sub {chdir('/opt/kav/bin') or die "Can't chdir to kav: $!"},
sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"},
],
);
1; # insure a defined return


clamd.conf:

LogFile /var/log/clamd
LogFileMaxSize 2M
LogTime
LogSyslog
LogFacility LOG_MAIL
PidFile /var/lib/clamav/clamd.pid
LocalSocket /var/lib/clamav/clamd-socket
FixStaleSocket
TCPAddr 127.0.0.1
StreamMaxLength 20M
MaxThreads 20
ReadTimeout 300
IdleTimeout 60
SelfCheck 600
User vscan
AllowSupplementaryGroups
Foreground
ScanPE
DetectBrokenExecutables
ScanOLE2
ScanMail
ScanArchive
ArchiveMaxFiles 1500
ArchiveBlockMax

main.cf

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
unknown_local_recipient_reject_code = 450
mynetworks = 192.168.111.0/24, 127.0.0.0/8
relay_domains = $mydestination dom1.de dom.2.com dom3.de


smtpd_banner = $myhostname ESMTP ex2005
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = maildrop
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/packages/postfix/samples
readme_directory = /usr/share/doc/packages/postfix/README_FILES
mail_spool_directory = /var/mail
canonical_maps = hash:/etc/postfix/canonical
virtual_maps = hash:/etc/postfix/virtual
relocated_maps = hash:/etc/postfix/relocated
transport_maps = hash:/etc/postfix/transport
sender_canonical_maps = hash:/etc/postfix/sender_canonical
masquerade_exceptions = root
masquerade_classes = envelope_sender, header_sender, header_recipient
myhostname = mx01.local
program_directory = /usr/lib/postfix
inet_interfaces = 127.0.0.1 ::1
masquerade_domains =
mydestination = $myhostname, localhost.$mydomain
defer_transports =
disable_dns_lookups = no
relayhost =
content_filter = vscan:
mailbox_command =
mailbox_transport =
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
strict_rfc821_envelopes = no
smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination
smtp_sasl_auth_enable = no
smtpd_sasl_auth_enable = no
smtpd_use_tls = no
smtp_use_tls = no
alias_maps = hash:/etc/aliases
mailbox_size_limit = 0
message_size_limit = 10240000
html_directory = /usr/share/doc/packages/postfix/html
transport_maps = regexp:etc/postfix/transport_regexp,
hash:/etc/postfix/transport.domain
dspam_destination_recipient_limit = 1
dspam_add_destination_recipient_limit = 1
dspam-fp_destination_recipient_limit = 1

master.cf

smtp inet n - n - - smtpd
-o content_filter=smtp-amavis:[127.0.0.1]:10024
smtp-amavis unix - - n - 2 lmtp
-o smtp_send_xforward_command=yes

127.0.0.1:10025 inet n - n - - smtpd
-o cleanup_service_name=pre-cleanup
-o content_filter=dspam:dummy
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,rej ect
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000

127.0.0.1:10026 inet n - n - - smtpd
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,rej ect
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000

dspam unix - n n - 10 pipe
-o flags=Rhq user=dspam argv=/usr/local/bin/dspam --mode=teft --deliver=innocent,spam --feature=chained,noise -i -f ${sender} -- %u --user ${recipient}


cleanup unix n - n - 0 cleanup
-o header_checks=
-o mime_header_checks=
-o nested_header_checks=
-o body_checks=

pre-cleanup unix n - n - 0 cleanup
-o canonical_maps=
-o sender_canonical_maps=
-o recipient_canonical_maps=
-o masquerade_domains=
-o virtual_alias_maps=
-o always_bcc=
-o sender_bcc_maps=
-o recipient_bcc_maps=

local unix - n n - - local
-o content_filter=
-o myhostname=localhost
-o local_recipient_maps=
-o relay_recipient_maps=
-o mynetworks=127.0.0.0/8
-o mynetworks_style=host
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,rej ect

dspam-add unix - n n - - pipe
-o flags=Rhq user=dspam argv=/usr/local/bin/dspam --mode=teft --user ${user}@${nexthop} --class=spam --source=error
dspam-del unix - n n - - pipe
-o flags=Rhq user=dspam argv=/usr/local/bin/dspam --mode=teft --user ${user}@${nexthop} --class=innocent --source=error
proxymap unix - - n - - proxymap

transport.domain

dom1.de smtp:192.168.111.6
dom2.com smtp:192.168.111.6
dom3.de smtp:192.168.111.6

transport_regexp

/^.*@spam.(.*)$/ dspam-add:${1}
/^.*@ham.(.*)$/ dspam-del:${1}


Letzteres bewirkt (Sollte bewirken), dass user Spam melden können (zurückschicken an Postfix(dspam) mit user@spam.dom1.de, bzw. ham (also, falls erkannten Spam) an user@hamn.dom1.de.

Wenn ich nun Postfix starte, läuft alles perfekt, bsi einige Sekunden nach dem Start folgende Meldung im log auftaucht:
May 11 14:24:57 mx01 postfix/postqueue[2782]: fatal: Cannot flush mail queue - mail system is down

Hier die mail.log:

May 11 16:23:55 mx01 postfix/postfix-script: starting the Postfix mail system
May 11 16:23:55 mx01 postfix/master[2092]: daemon started -- version 2.1.1
May 11 16:23:57 mx01 freshclam[2224]: Daemon started.
May 11 16:23:57 mx01 freshclam[2251]: freshclam daemon 0.83 (OS: linux-gnu, ARCH: i386, CPU: i686)
May 11 16:23:57 mx01 freshclam[2251]: ClamAV update process started at Wed May 11 16:23:57 2005
May 11 16:23:57 mx01 freshclam[2251]: WARNING: Your ClamAV installation is OUTDATED - please update immediately!
May 11 16:23:57 mx01 freshclam[2251]: WARNING: Local version: 0.83 Recommended version: 0.84
May 11 16:23:57 mx01 freshclam[2251]: main.cvd is up to date (version: 31, sigs: 33079, f-level: 4, builder: tkojm)
May 11 16:23:57 mx01 clamd[2255]: Daemon started.
May 11 16:23:57 mx01 clamd[2255]: clamd daemon 0.83 (OS: linux-gnu, ARCH: i386, CPU: i686)
May 11 16:23:57 mx01 clamd[2255]: Log file size limited to 2097152 bytes.
May 11 16:23:57 mx01 clamd[2255]: Running as user vscan (UID 65, GID 101)
May 11 16:23:57 mx01 clamd[2255]: Reading databases from /var/lib/clamav
May 11 16:23:57 mx01 freshclam[2251]: daily.cvd is up to date (version: 875, sigs: 1218, f-level: 4, builder: diego)
May 11 16:23:57 mx01 freshclam[2251]: --------------------------------------
May 11 16:23:59 mx01 clamd[2255]: Protecting against 34344 viruses.
May 11 16:23:59 mx01 clamd[2255]: Unix socket file /var/lib/clamav/clamd-socket
May 11 16:23:59 mx01 clamd[2255]: Setting connection queue length to 15
May 11 16:23:59 mx01 clamd[2255]: Archive: Archived file size limit set to 10485760 bytes.
May 11 16:23:59 mx01 clamd[2255]: Archive: Recursion level limit set to 8.
May 11 16:23:59 mx01 clamd[2255]: Archive: Files limit set to 1500.
May 11 16:23:59 mx01 clamd[2255]: Archive: Compression ratio limit set to 250.
May 11 16:23:59 mx01 clamd[2255]: Archive support enabled.
May 11 16:23:59 mx01 clamd[2255]: Archive: RAR support disabled.
May 11 16:23:59 mx01 clamd[2255]: Archive: Blocking archives that exceed limits.
May 11 16:23:59 mx01 clamd[2255]: Portable Executable support enabled.
May 11 16:23:59 mx01 clamd[2255]: Detection of broken executables enabled.
May 11 16:23:59 mx01 clamd[2255]: Mail files support enabled.
May 11 16:23:59 mx01 clamd[2255]: OLE2 support enabled.
May 11 16:23:59 mx01 clamd[2255]: HTML support enabled.
May 11 16:23:59 mx01 clamd[2255]: Self checking every 600 seconds.
May 11 16:24:01 mx01 amavis[2256]: starting. /usr/sbin/amavisd at mx01 amavisd-new-20040701 (2.0), Unicode aware
May 11 16:24:01 mx01 amavis[2256]: user=, EUID: 0 (0); group=, EGID: 0 (0)
May 11 16:24:01 mx01 amavis[2256]: Perl version 5.008003
May 11 16:24:01 mx01 amavis[2428]: Net::Server: Process Backgrounded
May 11 16:24:01 mx01 amavis[2428]: Net::Server: 2005/05/11-16:24:01 Amavis (type Net::Server::PreForkSimple) starting! pid(2428)
May 11 16:24:01 mx01 amavis[2428]: Net::Server: Binding to UNIX socket file /var/spool/amavis/amavisd.sock using SOCK_STREAM
May 11 16:24:01 mx01 amavis[2428]: Net::Server: Binding to TCP port 10024 on host 127.0.0.1
May 11 16:24:01 mx01 amavis[2428]: Net::Server: Setting gid to "101 101"
May 11 16:24:01 mx01 amavis[2428]: Net::Server: Setting uid to "65"
May 11 16:24:01 mx01 amavis[2428]: Module Amavis::Conf 2.02
May 11 16:24:01 mx01 amavis[2428]: Module Archive::Tar 1.08
May 11 16:24:01 mx01 amavis[2428]: Module Archive::Zip 1.09
May 11 16:24:01 mx01 amavis[2428]: Module BerkeleyDB 0.25
May 11 16:24:01 mx01 amavis[2428]: Module Compress::Zlib 1.33
May 11 16:24:01 mx01 amavis[2428]: Module Convert::TNEF 0.17
May 11 16:24:01 mx01 amavis[2428]: Module Convert::UUlib 1.0
May 11 16:24:01 mx01 amavis[2428]: Module MIME::Entity 5.404
May 11 16:24:01 mx01 amavis[2428]: Module MIME::Parser 5.406
May 11 16:24:01 mx01 amavis[2428]: Module MIME::Tools 5.411
May 11 16:24:01 mx01 amavis[2428]: Module Mail::Header 1.60
May 11 16:24:01 mx01 amavis[2428]: Module Mail::Internet 1.60
May 11 16:24:01 mx01 amavis[2428]: Module Net::Cmd 2.24
May 11 16:24:01 mx01 amavis[2428]: Module Net::SMTP 2.26
May 11 16:24:01 mx01 amavis[2428]: Module Net::Server 0.87
May 11 16:24:01 mx01 amavis[2428]: Module Time::HiRes 1.52
May 11 16:24:01 mx01 amavis[2428]: Module Unix::Syslog 0.100
May 11 16:24:01 mx01 amavis[2428]: Lookup::SQL code NOT loaded
May 11 16:24:01 mx01 amavis[2428]: Lookup::LDAP code NOT loaded
May 11 16:24:01 mx01 amavis[2428]: AMCL-in protocol code loaded
May 11 16:24:01 mx01 amavis[2428]: SMTP-in protocol code loaded
May 11 16:24:01 mx01 amavis[2428]: ANTI-VIRUS code loaded
May 11 16:24:01 mx01 amavis[2428]: ANTI-SPAM code NOT loaded
May 11 16:24:01 mx01 amavis[2428]: Unpackers code loaded
May 11 16:24:01 mx01 amavis[2428]: Found $file at /usr/bin/file
May 11 16:24:01 mx01 amavis[2428]: Found $arc at /usr/bin/arc
May 11 16:24:01 mx01 amavis[2428]: Found $gzip at /usr/bin/gzip
May 11 16:24:01 mx01 amavis[2428]: Found $bzip2 at /usr/bin/bzip2
May 11 16:24:01 mx01 amavis[2428]: No $lzop, not using it
May 11 16:24:01 mx01 amavis[2428]: Found $lha at /usr/bin/lha
May 11 16:24:01 mx01 amavis[2428]: Found $unarj at /usr/bin/unarj
May 11 16:24:01 mx01 amavis[2428]: Found $uncompress at /usr/bin/uncompress
May 11 16:24:01 mx01 amavis[2428]: No $unfreeze, not using it
May 11 16:24:01 mx01 amavis[2428]: Found $unrar at /usr/bin/unrar
May 11 16:24:01 mx01 amavis[2428]: Found $zoo at /usr/bin/zoo
May 11 16:24:01 mx01 amavis[2428]: Found $cpio at /usr/bin/cpio
May 11 16:24:01 mx01 amavis[2428]: Found $rpm2cpio at /usr/bin/rpm2cpio
May 11 16:24:01 mx01 amavis[2428]: Found $cabextract at /usr/bin/cabextract
May 11 16:24:01 mx01 amavis[2428]: No $dspam, not using it
May 11 16:24:02 mx01 amavis[2428]: Using internal av scanner code for (primary) ClamAV-clamd
May 11 16:24:02 mx01 amavis[2428]: Found secondary av scanner ClamAV-clamscan at /usr/bin/clamscan
May 11 16:24:02 mx01 amavis[2428]: Creating cache and SNMP db in /var/spool/amavis/db/; BerkeleyDB 0.25, V4.2
May 11 14:24:57 mx01 postfix/postqueue[2782]: fatal: Cannot flush mail queue - mail system is down
May 11 16:27:30 mx01 postfix/smtpd[2816]: connect from localhost[127.0.0.1]
May 11 16:27:36 mx01 postfix/smtpd[2816]: disconnect from localhost[127.0.0.1]

Hier ganz unten habe ich mmich testweise per telnet auf localhost connected, der smtpd läuft.

Leider habe ich bei den Postfix-Optionen keine weitern zum Log-Mir-Mehr gefunden, um festzustellen, wieso das System wieder down ist.

Kann mir jemand einen Tip geben, wo ich ansetzen kann?

Ich danke Euch für Eure Hilfe.

rkelly_2

Tomek
11.05.05, 23:28
Lies bitte zuerst, wie man hier richtig postet (http://www.linuxforen.de/forums/showthread.php?t=164474) und passe deinen Beitrag dementsprechend an.