PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Antivir will nicht



Andreas.S
12.12.03, 13:41
Hallo,

hab mir ein Mailserver mit Postfix Cyrus Amavis Procmail Antivir Spamassasin auf SuSE9.0 zusammen gebastelt.

Auch alles wunderbar nur mein Mails werden einfach nicht auf viren gescannt, in den Logfile steht nichts davon:

#Mail´s die rausgehen:
Dec 12 14:33:55 msmail postfix/smtpd[10233]: connect from unknown[192.168.70.122]
Dec 12 14:33:55 msmail postfix/smtpd[10233]: DB60AFC7EF: client=unknown[192.168.70.122]
Dec 12 14:33:55 msmail postfix/cleanup[10235]: DB60AFC7EF: message-id=<002b01c3c0b3$bfbcb440$7a46a8c0@techndoc>
Dec 12 14:33:56 msmail postfix/qmgr[9665]: DB60AFC7EF: from=<XXX@XXX.de>, size=8388, nrcpt=1 (queue active)
Dec 12 14:33:56 msmail postfix/smtp[10237]: DB60AFC7EF: to=<XXXX@XXXX.de>, relay=auth.smtp.kundenserver.de[212.227.15.178], delay=1, status=sent (250 OK id=1AUnPN-0003NA-00)
Dec 12 14:33:58 msmail postfix/smtpd[10233]: disconnect from unknown[192.168.70.122]

#Mail´s die reinkommen:
Dec 12 14:40:00 msmail postfix/pickup[9664]: BC34CFC7EF: uid=0 from=<root>
Dec 12 14:40:00 msmail postfix/cleanup[10325]: BC34CFC7EF: message-id=<20031212134000.BC34CFC7EF@XXX.XXX>
Dec 12 14:40:00 msmail postfix/qmgr[9665]: BC34CFC7EF: from=<root@XXX.XXX>, size=555, nrcpt=1 (queue active)
Dec 12 14:40:02 msmail postfix/pipe[10327]: BC34CFC7EF: to=<root@XXX.XXX>, orig_to=<root>, relay=vscan, delay=2, status=sent ([127.0.0.1
Dec 12 14:40:02 msmail amavis[10329]: starting. amavisd snapshot-20020531 Mon Mar 17 18:55:42 UTC 2003
Dec 12 14:40:03 msmail postfix/smtpd[10331]: connect from localhost[127.0.0.1]
Dec 12 14:40:03 msmail postfix/smtpd[10331]: E9E20FC7EF: client=localhost[127.0.0.1]
Dec 12 14:40:04 msmail postfix/cleanup[10325]: E9E20FC7EF: message-id=<26851872$10712360733fd9c3e954f325.27210917@config1 8.schlund.de>
Dec 12 14:40:04 msmail postfix/qmgr[9665]: E9E20FC7EF: from=<XXX@XXX.de>, size=1653, nrcpt=1 (queue active)
Dec 12 14:40:04 msmail postfix/smtpd[10331]: disconnect from localhost[127.0.0.1]
Dec 12 14:40:37 msmail postfix/pipe[10334]: E9E20FC7EF: to=<andi@localhost.msmail.msgmbh>, orig_to=<andi@localhost>, relay=procmail, delay=34,



So hab ich den Antivir in Amavis eingebunden:

# H+BEDV AntiVir
$antivir = "usr/bin/antivir";

kann mir hier vieleicht jemand weiterhelfen ?
Ich bedank mich hir schon mal im Vorraus für eure hilfe.

MfG
Andi

Doh!
12.12.03, 13:45
Zeich mal deine master.cf

Hast Du in der main.cf auch fein content_filter = [wasauchimmerduhierbrauchst] eingetragen?

Andreas.S
12.12.03, 13:48
Hallo,

das ging ja fix.
Hier meine master.cf




smtp inet n - n - - smtpd -o content_filter=
#smtp inet n - n - - smtpd
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 nqmgr
#tlsmgr fifo - - n 300 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
localhost:10025 inet n - n - - smtpd -o content_filter=
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# maildrop. See the Postfix MAILDROP_README file for details.
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
cyrus unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
vscan unix - n n - 10 pipe
user=vscan argv=/usr/sbin/amavisd ${sender} ${recipient}
#procmail unix - n n - - pipe
# flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}

procmail unix - n n - - pipe
flags=R user=cyrus argv=/usr/bin/procmail -t -m USER=${user} EXTENSION=${extension} /etc/procmailrc

MfG
Andi

Doh!
12.12.03, 13:57
Original geschrieben von Andreas.S
Hallo,

das ging ja fix.
Hier meine master.cf




smtp inet n - n - - smtpd -o content_filter=
#smtp inet n - n - - smtpd
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 nqmgr
#tlsmgr fifo - - n 300 1 tlsmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
localhost:10025 inet n - n - - smtpd -o content_filter=
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# maildrop. See the Postfix MAILDROP_README file for details.
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
cyrus unix - n n - - pipe
user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
vscan unix - n n - 10 pipe
user=vscan argv=/usr/sbin/amavisd ${sender} ${recipient}
#procmail unix - n n - - pipe
# flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}

procmail unix - n n - - pipe
flags=R user=cyrus argv=/usr/bin/procmail -t -m USER=${user} EXTENSION=${extension} /etc/procmailrc

MfG
Andi

Die erste Zeile ist falsch. Da übergibst Du dem "normalen" smtpd Dienst die Option keinen Kontent-Filter zu benutzen. Das darfst (und dort musst Du es sogar) nur in dieser Zeile machen:

localhost:10025 inet n - n - - smtpd -o content_filter=

also erste Zeile auf:
smtp inet n - n - - smtpd

setzen, dann sollte es gehen, sofern Du in Deiner main.cf den Wert content_filter = vscan gesetzt hast

Edit: Tausendster regulärer post... Glückwünsche, Geschenke und willige Jungfrauen im Mitgliederbereich abgeben.

Doh!
12.12.03, 14:03
BTW, Du solltest lieber auf amavis-new umsteigen, der alte amavis hat bei uns im Netzwerk (ca. 1 Mail/sek) irgendwann nicht mehr mitgemacht.

Andreas.S
12.12.03, 14:15
hi,

wenn ich das so mache wie du beschrieben hast verschwinden die mails im nirvana.

log:
Dec 12 15:09:12 msmail postfix/smtpd[10610]: 1DACCFC7EF: client=unknown[192.168.70.122]
Dec 12 15:09:12 msmail postfix/cleanup[10612]: 1DACCFC7EF: message-id=<003001c3c0b8$acb2cba0$7a46a8c0@techndoc>
Dec 12 15:09:12 msmail postfix/qmgr[10597]: 1DACCFC7EF: from=<schneider@ms-transformers.de>, size=8382, nrcpt=1 (queue active)
Dec 12 15:09:13 msmail postfix/pipe[10613]: 1DACCFC7EF: to=<a.schneider@pageedit.de>, relay=vscan, delay=1, status=sent ([127.0.0.1]:10025)
Dec 12 15:09:13 msmail amavis[10615]: starting. amavisd snapshot-20020531 Mon Mar 17 18:55:42 UTC 2003
Dec 12 15:09:14 msmail postfix/smtpd[10610]: disconnect from unknown[192.168.70.122]

Doh!
12.12.03, 15:02
aber zumindest nimmt amavis die Mails nun an. Das heißt Amavis reinjected die Mails nicht auf localhost:10025

Doh!
12.12.03, 15:11
Original geschrieben von Andreas.S
Dec 12 15:09:13 msmail postfix/pipe[10613]: 1DACCFC7EF: to=<a.schneider@pageedit.de>, relay=vscan, delay=1, status=sent ([127.0.0.1]:10025)


Das macht michg stutzig, das stimmt nicht, hier dürfte er noch nicht auf port 10025 gehen, das kommt erst später. Poste mal bitte auch Deine main.cf ohne Kommentare (siehe meine Sig)

Andreas.S
12.12.03, 15:53
hi,

meine main:

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
myhostname = msmail.msgmbh
inet_interfaces = all
mydestination = localhost, $myhostname, localhost.$mydomain, $mydomain
unknown_local_recipient_reject_code = 450
mynetworks = 192.168.70.0/24, 127.0.0.0/8
relayhost = [auth.smtp.kundenserver.de]
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mailbox_transport = cyrus
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 = linux.merkel.de
program_directory = /usr/lib/postfix
#inet_interfaces = 127.0.0.1
masquerade_domains =
#mydestination = $myhostname, localhost.$mydomain
defer_transports =
disable_dns_lookups = no
content_filter = vscan:[127.0.0.1]:10025
mailbox_transport = procmail
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
alias_maps = hash:/etc/aliases
mailbox_size_limit = 51200000
message_size_limit = 10240000
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

MfG
Andi

Doh!
12.12.03, 15:57
ersetz mal das


Original geschrieben von Andreas.S

content_filter = vscan:[127.0.0.1]:10025


durch

content_filter = vscan

Andreas.S
13.12.03, 00:23
hi,

danke für deine hilfe Doh! aber leider bin ich noch nicht weitergekommen.
Die logs bleiben die gleichen und die mails verschwinden:-(.

der port 10025/tcp muss doch auch noch die die services deklariert sein oder ?

MfG
Andi

Doh!
13.12.03, 00:26
Original geschrieben von Andreas.S
hi,

danke für deine hilfe Doh! aber leider bin ich noch nicht weitergekommen.
Die logs bleiben die gleichen und die mails verschwinden:-(.

der port 10025/tcp muss doch auch noch die die services deklariert sein oder ?

MfG
Andi

???

Doh!
13.12.03, 00:54
Pass Upp, hier eine master.cf, die knapp 1000 Leute mit Mails versorgt (hat - ich benutze jetzt amavis-new, da siehts a bisserl anders aus)



# =================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ================================================
smtp inet n - n - - smtpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
showq unix n - n - - showq
error unix - - n - - error
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
localhost:10025 inet n - n - - smtpd -o content_filter=
#
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# maildrop. See the Postfix MAILDROP_README file for details.
#
maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
cyrus unix - n n - - pipe user=cyrus argv=/usr/lib/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
ifmail unix - n n - - pipe flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
vscan unix - n n - 4 pipe user=vscan argv=/usr/sbin/amavis ${sender} ${recipient}
procmail unix - n n - - pipe flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}



Und hier die dazu passende main.cf:



queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
mail_owner = postfix
default_privs = nobody


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 = sau.geheim.tld
program_directory = /usr/lib/postfix
inet_interfaces = 1.2.3.4, 5.6.7.8, 127.0.0.1
masquerade_domains =
mydestination = $myhostname, localhost.$mydomain
defer_transports =
disable_dns_lookups = no
relayhost =
mailbox_command =
mailbox_transport =
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_client_restrictions = permit_sasl_authenticated
smtpd_helo_restrictions =
strict_rfc821_envelopes = no
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_unknown_sender_domain
smtp_sasl_auth_enable = no
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_securiy_options = noanonymous
smtpd_sasl_local_domain = pfrzzzzzzt
smtpd_use_tls = no
alias_maps = hash:/etc/aliases
mailbox_size_limit = 51200000
message_size_limit = 10240000
mydomain = berlitz.de
relay_domains = noch.geheimer.tld, unertraeglich.geheim.tld, psst.tld
mynetworks = 10.20.30.40, 127.0.0.0/8, 10.20.30.50
smtpd_banner = Mein Mailer ESMTP
content_filter = vscan
header_checks = regexp:/etc/postfix/maps/header_checks
mime_header_checks = regexp:/etc/postfix/maps/mime_header_checks
body_checks = regexp:/etc/postfix/maps/body_checks
maximal_queue_lifetime = 1



Du musst Dir klar machen was passieren soll:

Die Mail wird eingeliefert (entweder von Dir, um sie irgendwohin zu schicken oder eben von einem externen Mailserver) und zwar auf port 25 (erste Zeile, der smtpd startet standardmäßig auf port 25). Die Mail wird dann je nach konfiguration in der main.cf dem content_filer = vscan übergeben. vscan wiederrum wird definiert als aufruf über das wrapper-programm "pipe", welches wiederrum den amavis aufruft. Hier sind keine Ports im Spiel (Vorsicht, ganz anders, wenn Du mal den amavis-new benutzt, da dann sehr wohl!!!). Amavis prozessiert die Mail je nach seiner Konfig in /etc/amavis.conf und droppt die dann (so es in der Konfig eingestellt ist) auf localhost:10025. So hier lauscht ein weiterer smtpd-Dienst, den wir wiederrum in der master.cf mit der Zeile "localhost:10025 inet n - n - - smtpd -o content_filter=" definiert haben. Wir machen also nichts anderes, als die Mail, die gerade vom amavis ausgespuckt wurde in eine andere Instanz des smtpd zu schicken, dieses mal aber ohne die Option content_filter=vscan, denn sonst würde die Mail ja wieder beim amavis landen und endlos drin stecken bleiben. Nun wird die Mail normal weiterprozessiert.

Bei Dir ist irgendwo der Haken drin. Checke nochmal (und poste ggf.) die Dateien master.cf, main.cf und /etc/amavis.conf

EDIT: Sorry hatte da einen groben Fehler drin, jetzt sollte es stimmen

zini2001
13.12.03, 13:07
hallo!!

@Doh!
magst du mal zeigen wie das andere aussieht?? ( mit dem amavis-new)
das würd mich jetzt ohne fett suchen zumüssen einfach mal interessieren.

so denn gruß
zini

Doh!
15.12.03, 10:54
So, zu amavis-new.

Anders als der normale Amavis läuft der amavis-new als daemon und lauscht auf port 10024. Entsprechend müssen die main.cf und die master.cf angepasst werden.

main.cf:

content_filter = smtp-amavis:[127.0.0.1]:10024


master.cf:


smtp-amavis unix - - n - 2 smtp -o smtp_data_done_timeout=1200 -o disable_dns_lookups=yes
127.0.0.1:10025 inet n - n - - smtpd -o content_filter= -o header_checks= -o body_checks= -o mime_header_checks=

Die Checks-Dateien habe ich auch rausgenommen, so dass der Spamfilter nicht zweimal nachschaut