PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Uneinigkeit bei Postfix Eintrag zu amavisd-new bez. content_filter =



mullfreak
24.03.05, 22:23
Hallo,

ich bastle nun schon seit einiger Zeit an einer Postfix, SA, ClamAV, Amavis Konfiguration. Dieser Server soll als SMTP-Proxy eingesetzt werden.
Die Postfix Konfiguration ist soweit in Ordnung. Postfix funktioniert, ich kann Mails versenden und empfangen.
SpamAssassin startet einwandfrei im Damaeon Modus mit spamd. Leider kann ich das Spamabwehrverhalten nur gering testen, da mir hier die Möglichkeiten fehlen bezüglich POP-Konten die Weiterleitung unterstützen im vollem Umfang und genug Spam Mails bekommen.
Nun hakelts noch an Amavis und ClamAV.
Im Moment habe ich folgenden Stand kurz und bündig:
Postfix läuft und liefert über telnet und im LogFile das alles OK ist.
In der master.cf habe ich die richtigen Einträge gesetzt.
Amavis antwort auf Port 10024 per telnet einwandfrei.
Nun müsste ich doch in der main.cf von Postfix unter:
content_filter =
einen Eintrag zu Amavis setzen.
Nach endlosem googlen habe ich zwei Möglichkeiten gefunden:
1.
content_filter = smtp:localhost:10024
und
2.
content_filter = smtp-amavis:[127.0.0.1]:10024

Soll man nun eckige Klammer verwenden, ich kenns ausm Exchange und dort sind diese z. B. bei der Angabe der Smarthosts zwingend notwendig?

Spielt die Bezeichnung "smtp" und "smtp-amavis" eine Rolle?

Grüsse
Mullfreak

mullfreak
24.03.05, 22:48
Hallo,

habs schnell alle zwei Einträge ausprobiert.
Natürlich hab ich nur die zwei Methoden probiert, weil ja "localhost" in eckigen Klammern eh nix bringt, war klar. :-)

Nach dem Reload von Postfix hauts mir gleich das Mailsystem zusammen. Jetzt werden keine Mails mehr ausgeliefert.
Ich erhalten in der mail.log folgende Auskunft:

fatal: parameter "smtp_recipient_restrictions": specify at least one working instance of: check_relay_domains$, reject_unauth_destination, reject, defer or defer_it_permit

und

warning: process /usr/lib/postfix /smtpd pid 7110 exit status 1

und

warning: process /usr/lib/postfix/smtpd: bad command startup -- throttling

Ich bin auch am throttln. Weiß jemand damit was anzufangen. Wenn ich die Eisntellung von content_filter wieder aufhebe, funktioniert wieder alles.

Grüsse
Mullfreak

whistle
25.03.05, 10:50
Hi,
die eckigen Klammer musst du verwenden, wenn du eine IP-Adresse angibst.
Was steht denn in der main.cf bei smtp_recipient_restrictions? Für doch dort einfach reject_unauth_destination bzw. check_relay_domains mal ein und schau ob es funktioniert.

Bei mir lautet der Eintrag für Content_Filter übrigens smtp-amavis:[127.0.0.1]:10024, dabei muss es aber den Eintrag smtp-amavis auch in der master.cf geben.
Gruß
Whistle

mullfreak
25.03.05, 13:01
Hi whistle,

ich hab jetzt unter smtpd_recipient_restrictions folgendes eingetragen:

permit_mynetworks

Reicht dieser Eintrage alleinstehend?

Dann hab ich unter content_filter eingetragen:

smtp-amavis:[127.0.0.1]:10024

Hier meine main.cf:
alias_maps = hash:/etc/aliases
canonical_maps = hash:/etc/postfix/canonical
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
defer_transports =
disable_dns_lookups = no
inet_interfaces = all
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command =
mailbox_size_limit = 0
mailbox_transport =
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains =
masquerade_exceptions = root
message_size_limit = 10240000
mydestination = $myhostname, localhost.$mydomain, $mydomain
mydomain = mster.info
myhostname = mail.mster.info
mynetworks = 127.0.0.0/8, 10.0.0.0/8, 192.168.0.0/24
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix/README_FILES
relayhost =
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_sasl_auth_enable = no
smtp_use_tls = no
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_mynetworks
smtpd_sasl_auth_enable = no
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_use_tls = no
strict_rfc821_envelopes = no
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 450

Meine master.cf sieht so aus:

# ================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ================================================== ========================
smtp inet n - n - - smtpd -o content_filter=spamd
#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 oqmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
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
anvil unix - - n - 1 anvil
127.0.0.1:10025 inet n - y - - smtpd
-o content_filter=
-o local_recipient_maps=
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks, reject unauth_destination
-o mynetworks=127.0.0.0/8, 10.0.0.0/8, 192.168.0.0/24
#
# 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/amavis ${sender} ${recipient}
procmail unix - n n - - pipe
flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}
spamd unix - n n - - pipe
user=spam argv=/usr/bin/spamc -f
-e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
smtp-amavis unix - - y - 2 smtpd
-o smtp_data_done_timeout=1200
-o disable_dns_lookups=yes

Stimmen die Einträge in meiner master.cf?

Grüsse
Mullfreak

whistle
25.03.05, 13:47
Sieht so ok aus, was mich irritiert ist der Eintrag smtp inet n - n - - smtpd -o content_filter=spamd, entferne da mal den content_filter.
Die Einstellungen für die recipient_restrictions hab ich jetzt nicht im Kopf, ich würde einfach noch das reject_unauth_destinations hinzufügen.
Läuft es denn oder welche Fehlermeldungen kommen?
Gruß
Whistle

mullfreak
25.03.05, 14:03
Hi,
der Eintrag mit content_filter=spamd stammt aus der SpamAssassin Installation. Nun, ich weiß mittlerweilen das SA auch von Amavis aufgerufen werden kann, und das tut es auch. Also könnte man den Eintrag entfernen.

Ich hab jetzt hier mal mein LogFile von Postfix:
Mar 25 13:57:52 mail postfix/postfix-script: stopping the Postfix mail system
Mar 25 13:57:52 mail postfix/master[5747]: terminating on signal 15
Mar 25 13:57:55 mail postfix/postfix-script: starting the Postfix mail system
Mar 25 13:57:55 mail postfix/master[5933]: daemon started -- version 2.0.19-20040312
Mar 25 13:59:33 mail postfix/smtpd[5945]: connect from mail.gmx.net[213.165.64.20]
Mar 25 13:59:33 mail postfix/smtpd[5945]: warning: support for restriction "check_relay_domains" will be removed from Postfix; use "reject_unauth_destination" instead
Mar 25 13:59:33 mail postfix/smtpd[5945]: 70916B6D9: client=mail.gmx.net[213.165.64.20]
Mar 25 13:59:33 mail postfix/cleanup[5949]: 70916B6D9: message-id=<2247.1111755453@www53.gmx.net>
Mar 25 13:59:33 mail postfix/qmgr[5935]: 70916B6D9: from=<mullfreak@gmx.de>, size=832, nrcpt=1 (queue active)
Mar 25 13:59:33 mail postfix/smtpd[5945]: disconnect from mail.gmx.net[213.165.64.20]
Mar 25 13:59:33 mail spamd[4436]: connection from localhost [127.0.0.1] at port 1182
Mar 25 13:59:33 mail spamd[5952]: info: setuid to spam succeeded
Mar 25 13:59:34 mail spamd[5952]: processing message <2247.1111755453@www53.gmx.net> for spam:1001.
Mar 25 13:59:35 mail spamd[5952]: clean message (0.4/5.0) for spam:1001 in 1.5 seconds, 809 bytes.
Mar 25 13:59:35 mail postfix/pickup[5934]: E33B2B736: uid=1001 from=<mullfreak@gmx.de>
Mar 25 13:59:35 mail postfix/cleanup[5949]: E33B2B736: message-id=<2247.1111755453@www53.gmx.net>
Mar 25 13:59:35 mail postfix/pipe[5950]: 70916B6D9: to=<mmueller@mster.info>, relay=spamd, delay=2, status=sent (mail.mster.info)
Mar 25 13:59:35 mail postfix/qmgr[5935]: 70916B6D9: removed
Mar 25 13:59:35 mail postfix/qmgr[5935]: E33B2B736: from=<mullfreak@gmx.de>, size=1114, nrcpt=1 (queue active)
Mar 25 13:59:36 mail amavis[5446]: (05446-01) ESMTP::10024 /var/spool/amavis/amavis-20050325T135936-05446: <mullfreak@gmx.de> -> <mmueller@mster.info> Received: SIZE=1114 from mail.mster.info ([127.0.0.1]) by localhost (mail [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 05446-01 for <mmueller@mster.info>; Fri, 25 Mar 2005 13:59:36 +0100 (CET)
Mar 25 13:59:36 mail amavis[5446]: (05446-01) Checking: <mullfreak@gmx.de> -> <mmueller@mster.info>
Mar 25 13:59:37 mail amavis[5446]: (05446-01) spam_scan: hits=0 tests=
Mar 25 13:59:37 mail amavis[5446]: (05446-01) FWD via SMTP: [127.0.0.1]:10025 <mullfreak@gmx.de> -> <mmueller@mster.info>
Mar 25 13:59:37 mail postfix/smtpd[5957]: fatal: parameter "smtpd_recipient_restrictions": specify at least one working instance of: check_relay_domains, reject_unauth_destination, reject, defer or defer_if_permit
Mar 25 13:59:38 mail postfix/master[5933]: warning: process /usr/lib/postfix/smtpd pid 5957 exit status 1
Mar 25 13:59:38 mail postfix/master[5933]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

Hier nochmal die main.cf:
alias_maps = hash:/etc/aliases
canonical_maps = hash:/etc/postfix/canonical
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
defer_transports =
disable_dns_lookups = no
inet_interfaces = all
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command =
mailbox_size_limit = 0
mailbox_transport =
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains =
masquerade_exceptions = root
message_size_limit = 10240000
mydestination = $myhostname, localhost.$mydomain, $mydomain
mydomain = mster.info
myhostname = mail.mster.info
mynetworks = 127.0.0.0/8, 10.0.0.0/8, 192.168.0.0/24
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix/README_FILES
relayhost =
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_sasl_auth_enable = no
smtp_use_tls = no
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_recipient_restrictions = permit_mynetworks, check_relay_domains
smtpd_sasl_auth_enable = no
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_use_tls = no
strict_rfc821_envelopes = no
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 450

Und hier das master.cf:
================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ================================================== ========================
smtp inet n - n - - smtpd -o content_filter=spamd
#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 oqmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
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
anvil unix - - n - 1 anvil

#
# 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/amavis ${sender} ${recipient}
procmail unix - n n - - pipe
flags=R user=nobody argv=/usr/bin/procmail -t -m /etc/procmailrc ${sender} ${recipient}
spamd unix - n n - - pipe
user=spam argv=/usr/bin/spamc -f
-e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
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 local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks, check_relay_domains
-o mynetworks=127.0.0.0/8, 10.0.0.0/8, 192.168.0.0/24
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000

Vielleicht findest Du noch was. Ich komme jetzt fast nicht mehr weiter irgendwie. Immer liegt es an den smtpd_recipient_restrictions. Auf jeden Fall sieht es schon mal gut aus mit der Übergabe der Mails an amavis auf Port 10024 und der Rückgabe an Postfix 10025. Ob jetzt schon ClamAV scannt ist noch eine weitere Geschichte.

Grüsse
Mullfreak

whistle
25.03.05, 14:11
Hi,
dann schreib doch einfach mal anstatt "check_relay_domains" jetzt "reject_unauth_destination" in die recipient_restrictions und entferne mal das -o content_filter=spamd und starte danach postfix mal neu.
Gruß
Whistle

mullfreak
25.03.05, 14:28
Hi whistle,

die Fehlermeldung ist jetzt verschwunden. Ich habe unten das LogFile angehängt. Die oberen Fehler glaube ich kommen davon, das Amavis noch nicht gestartet ist und Postfix versucht die Mails dorthin zuzustellen.
Die Dienste starten einwandfrei und SA wird jetzt von Amavis aufgerufen --> s. Log_File.
Wenn ich jetzt versuche von GMX eine Mail an den Account zu versenden dann kriege ich immer die Fehlermeldung "Connection refused" s. Log_file.

Mar 25 14:21:12 mail postfix/master[4649]: terminating on signal 15
Mar 25 14:21:12 mail spamd[4355]: server killed by SIGTERM, shutting down
Mar 25 14:22:31 mail spamd[4292]: server started on port 783/tcp (running version 2.63)
Mar 25 14:22:33 mail postfix/postfix-script: starting the Postfix mail system
Mar 25 14:22:33 mail postfix/master[4586]: daemon started -- version 2.0.19-20040312
Mar 25 14:22:34 mail postfix/qmgr[4601]: 496E9B505: from=<mullfreak@gmx.de>, size=1118, nrcpt=1 (queue active)
Mar 25 14:22:34 mail postfix/qmgr[4601]: 4F85BB6A3: from=<mullfreak@gmx.de>, size=1180163, nrcpt=1 (queue active)
Mar 25 14:22:34 mail postfix/qmgr[4601]: 52E28B64E: from=<cgi-mailer-bounces-106683144@kundenserver.de>, size=3235, nrcpt=1 (queue active)
Mar 25 14:22:34 mail postfix/qmgr[4601]: 54CD6B6BA: from=<mullfreak@gmx.de>, size=1135, nrcpt=1 (queue active)
Mar 25 14:22:34 mail postfix/qmgr[4601]: 67B04B606: from=<mullfreak@gmx.de>, size=1195, nrcpt=1 (queue active)
Mar 25 14:22:34 mail postfix/qmgr[4601]: 6202AB677: from=<root@mail.mster.info>, size=415, nrcpt=1 (queue active)
Mar 25 14:22:34 mail postfix/qmgr[4601]: 71901B6F1: from=<mullfreak@gmx.de>, size=1199, nrcpt=1 (queue active)
Mar 25 14:22:34 mail postfix/qmgr[4601]: 7518FB4E6: from=<mullfreak@gmx.de>, size=1266, nrcpt=1 (queue active)
Mar 25 14:22:34 mail postfix/qmgr[4601]: 7994AB4E4: from=<mullfreak@gmx.de>, size=1194, nrcpt=1 (queue active)
Mar 25 14:22:34 mail postfix/qmgr[4601]: 84B18B664: from=<httpd@web14.manitu.net>, size=2573, nrcpt=1 (queue active)
Mar 25 14:22:34 mail postfix/qmgr[4601]: 9A3E7B4DB: from=<mullfreak@gmx.de>, size=3058, nrcpt=1 (queue active)
Mar 25 14:22:34 mail postfix/qmgr[4601]: 9A05AB661: from=<bremennews@regionalinfo-themenguide.de>, size=16662, nrcpt=1 (queue active)
Mar 25 14:22:34 mail postfix/smtp[4743]: connect to 127.0.0.1[127.0.0.1]: Connection refused (port 10024)
Mar 25 14:22:34 mail postfix/qmgr[4601]: A62AEB6AD: from=<retur@post.komogvind.dk>, size=11449, nrcpt=1 (queue active)
Mar 25 14:22:34 mail postfix/smtp[4742]: connect to localhost[::1]: Connection refused (port 10024)
Mar 25 14:22:34 mail postfix/smtp[4742]: connect to localhost[127.0.0.1]: Connection refused (port 10024)
Mar 25 14:22:34 mail postfix/qmgr[4601]: ABC63B6B4: from=<root@localhost.flirtfloor.de>, size=2822, nrcpt=1 (queue active)
Mar 25 14:22:34 mail postfix/smtp[4745]: connect to 127.0.0.1[127.0.0.1]: Connection refused (port 10024)
Mar 25 14:22:34 mail postfix/smtp[4742]: 496E9B505: to=<mmueller@mster.info>, relay=none, delay=55183, status=deferred (connect to localhost[127.0.0.1]: Connection refused)
Mar 25 14:22:34 mail postfix/smtp[4744]: connect to localhost[::1]: Connection refused (port 10024)
Mar 25 14:22:34 mail postfix/smtp[4744]: connect to localhost[127.0.0.1]: Connection refused (port 10024)
Mar 25 14:22:34 mail postfix/qmgr[4601]: B6681B64C: from=<newsletter@zylomgames.com>, size=61566, nrcpt=1 (queue active)
Mar 25 14:22:34 mail postfix/qmgr[4601]: C995DB1AB: from=<mullfreak@gmx.de>, size=142593, nrcpt=1 (queue active)
Mar 25 14:22:34 mail postfix/qmgr[4601]: C3685B6A4: from=<mullfreak@gmx.de>, size=1114, nrcpt=1 (queue active)
Mar 25 14:22:34 mail postfix/qmgr[4601]: EEEBDB6AB: from=<mullfreak@gmx.de>, size=1180424, nrcpt=1 (queue active)
Mar 25 14:22:34 mail postfix/qmgr[4601]: E33B2B736: from=<mullfreak@gmx.de>, size=1114, nrcpt=1 (queue active)
Mar 25 14:22:34 mail postfix/smtp[4745]: 54CD6B6BA: to=<mmueller@mster.info>, relay=none, delay=68326, status=deferred (connect to 127.0.0.1[127.0.0.1]: Connection refused)
Mar 25 14:22:34 mail postfix/smtp[4743]: 52E28B64E: to=<mmueller@mster.info>, relay=none, delay=99150, status=deferred (connect to 127.0.0.1[127.0.0.1]: Connection refused)
Mar 25 14:22:34 mail postfix/smtp[4745]: connect to 127.0.0.1[127.0.0.1]: Connection refused (port 10024)
Mar 25 14:22:34 mail postfix/smtp[4743]: connect to 127.0.0.1[127.0.0.1]: Connection refused (port 10024)
Mar 25 14:22:34 mail postfix/smtp[4744]: 4F85BB6A3: to=<mmueller@mster.info>, relay=none, delay=53734, status=deferred (connect to localhost[127.0.0.1]: Connection refused)
Mar 25 14:22:34 mail postfix/smtp[4742]: connect to localhost[::1]: Connection refused (port 10024)
Mar 25 14:22:34 mail postfix/smtp[4742]: connect to localhost[127.0.0.1]: Connection refused (port 10024)
Mar 25 14:22:34 mail postfix/smtp[4745]: 67B04B606: to=<mmueller@mster.info>, relay=none, delay=138491, status=deferred (connect to 127.0.0.1[127.0.0.1]: Connection refused)
Mar 25 14:22:34 mail postfix/smtp[4743]: 6202AB677: to=<mmueller@mster.info>, relay=none, delay=56499, status=deferred (connect to 127.0.0.1[127.0.0.1]: Connection refused)
Mar 25 14:22:34 mail postfix/smtp[4743]: connect to 127.0.0.1[127.0.0.1]: Connection refused (port 10024)
Mar 25 14:22:34 mail postfix/smtp[4745]: fatal: valid hostname or network address required in SMTP server description: [127.0.0.1]:10024
Mar 25 14:22:34 mail postfix/smtp[4742]: EEEBDB6AB: to=<mmueller@mster.info>, relay=none, delay=53412, status=deferred (connect to localhost[127.0.0.1]: Connection refused)
Mar 25 14:22:35 mail postfix/smtp[4743]: 71901B6F1: to=<mmueller@mster.info>, relay=none, delay=1923, status=deferred (connect to 127.0.0.1[127.0.0.1]: Connection refused)
Mar 25 14:22:35 mail postfix/qmgr[4601]: 84B18B664: to=<mmueller@mster.info>, relay=none, delay=72700, status=deferred (connect to 127.0.0.1[127.0.0.1]: Connection refused)
Mar 25 14:22:35 mail postfix/qmgr[4601]: 9A05AB661: to=<mmueller@mster.info>, relay=none, delay=78454, status=deferred (connect to 127.0.0.1[127.0.0.1]: Connection refused)
Mar 25 14:22:35 mail postfix/qmgr[4601]: B6681B64C: to=<mmueller@mster.info>, relay=none, delay=68701, status=deferred (connect to 127.0.0.1[127.0.0.1]: Connection refused)
Mar 25 14:22:35 mail postfix/qmgr[4601]: C995DB1AB: to=<mmueller@mster.info>, relay=none, delay=138191, status=deferred (connect to 127.0.0.1[127.0.0.1]: Connection refused)
Mar 25 14:22:35 mail postfix/qmgr[4601]: C3685B6A4: to=<mmueller@mster.info>, relay=none, delay=56494, status=deferred (connect to 127.0.0.1[127.0.0.1]: Connection refused)
Mar 25 14:22:35 mail postfix/qmgr[4601]: E33B2B736: to=<mmueller@mster.info>, relay=none, delay=1380, status=deferred (connect to 127.0.0.1[127.0.0.1]: Connection refused)
Mar 25 14:22:35 mail postfix/smtp[4743]: fatal: valid hostname or network address required in SMTP server description: [127.0.0.1]:10024
Mar 25 14:22:35 mail postfix/qmgr[4601]: warning: premature end-of-input on private/smtp-amavis socket while reading input attribute name
Mar 25 14:22:35 mail postfix/qmgr[4601]: warning: private/smtp-amavis socket: malformed response
Mar 25 14:22:35 mail postfix/qmgr[4601]: warning: transport smtp-amavis failure -- see a previous warning/fatal/panic logfile record for the problem description
Mar 25 14:22:35 mail postfix/master[4586]: warning: process /usr/lib/postfix/smtp pid 4745 exit status 1
Mar 25 14:22:35 mail postfix/qmgr[4601]: 9A3E7B4DB: to=<mmueller@mster.info>, relay=none, delay=270949, status=deferred (unknown mail transport error)
Mar 25 14:22:36 mail postfix/qmgr[4601]: warning: premature end-of-input on private/smtp-amavis socket while reading input attribute name
Mar 25 14:22:36 mail postfix/qmgr[4601]: warning: private/smtp-amavis socket: malformed response
Mar 25 14:22:36 mail postfix/qmgr[4601]: warning: transport smtp-amavis failure -- see a previous warning/fatal/panic logfile record for the problem description
Mar 25 14:22:36 mail postfix/master[4586]: warning: process /usr/lib/postfix/smtp pid 4743 exit status 1
Mar 25 14:22:39 mail postfix/smtp[4752]: connect to localhost[::1]: Connection refused (port 10024)
Mar 25 14:22:39 mail postfix/smtp[4752]: connect to localhost[127.0.0.1]: Connection refused (port 10024)
Mar 25 14:22:39 mail postfix/smtp[4752]: ABC63B6B4: to=<mmueller@mster.info>, relay=none, delay=48605, status=deferred (connect to localhost[127.0.0.1]: Connection refused)
Mar 25 14:22:44 mail amavis[5340]: starting. amavisd at mail amavisd-new-20030616-p9, Unicode aware
Mar 25 14:22:44 mail amavis[5340]: Perl version 5.008003
Mar 25 14:22:44 mail amavis[5340]: Module Amavis::Conf 1.15
Mar 25 14:22:44 mail amavis[5340]: Module Archive::Tar 1.08
Mar 25 14:22:44 mail amavis[5340]: Module Archive::Zip 1.09
Mar 25 14:22:44 mail amavis[5340]: Module Compress::Zlib 1.33
Mar 25 14:22:44 mail amavis[5340]: Module Convert::TNEF 0.17
Mar 25 14:22:44 mail amavis[5340]: Module Convert::UUlib 1.0
Mar 25 14:22:44 mail amavis[5340]: Module DB_File 1.808
Mar 25 14:22:44 mail amavis[5340]: Module MIME::Entity 5.404
Mar 25 14:22:44 mail amavis[5340]: Module MIME::Parser 5.406
Mar 25 14:22:44 mail amavis[5340]: Module MIME::Tools 5.411
Mar 25 14:22:44 mail amavis[5340]: Module Mail::Header 1.60
Mar 25 14:22:44 mail amavis[5340]: Module Mail::Internet 1.60
Mar 25 14:22:44 mail amavis[5340]: Module Mail::SpamAssassin 2.63
Mar 25 14:22:44 mail amavis[5340]: Module Net::Cmd 2.24
Mar 25 14:22:44 mail amavis[5340]: Module Net::DNS 0.46
Mar 25 14:22:44 mail amavis[5340]: Module Net::SMTP 2.26
Mar 25 14:22:44 mail amavis[5340]: Module Net::Server 0.87
Mar 25 14:22:44 mail amavis[5340]: Module Time::HiRes 1.52
Mar 25 14:22:44 mail amavis[5340]: Module Unix::Syslog 0.100
Mar 25 14:22:44 mail amavis[5340]: Found myself: /usr/sbin/amavisd -c /etc/amavisd.conf
Mar 25 14:22:44 mail amavis[5340]: Lookup::SQL code NOT loaded
Mar 25 14:22:44 mail amavis[5340]: Lookup::LDAP code NOT loaded
Mar 25 14:22:44 mail amavis[5340]: AMCL-in protocol code loaded
Mar 25 14:22:44 mail amavis[5340]: SMTP-in protocol code loaded
Mar 25 14:22:44 mail amavis[5340]: ANTI-VIRUS code NOT loaded
Mar 25 14:22:44 mail amavis[5340]: ANTI-SPAM code loaded
Mar 25 14:22:44 mail amavis[5403]: Net::Server: Process Backgrounded
Mar 25 14:22:44 mail amavis[5403]: Net::Server: 2005/03/25-14:22:44 Amavis (type Net::Server::PreForkSimple) starting! pid(5403)
Mar 25 14:22:44 mail amavis[5403]: Net::Server: Binding to UNIX socket file /var/spool/amavis/amavisd.sock using SOCK_STREAM
Mar 25 14:22:44 mail amavis[5403]: Net::Server: Binding to TCP port 10024 on host 127.0.0.1
Mar 25 14:22:44 mail amavis[5403]: Net::Server: Setting gid to "101 101"
Mar 25 14:22:44 mail amavis[5403]: Net::Server: Setting uid to "65"
Mar 25 14:22:44 mail amavis[5403]: Found $file at /usr/bin/file
Mar 25 14:22:44 mail amavis[5403]: Found $arc at /usr/bin/arc
Mar 25 14:22:44 mail amavis[5403]: Found $gzip at /usr/bin/gzip
Mar 25 14:22:44 mail amavis[5403]: Found $bzip2 at /usr/bin/bzip2
Mar 25 14:22:44 mail amavis[5403]: No $lzop, not using it
Mar 25 14:22:44 mail amavis[5403]: Found $lha at /usr/bin/lha
Mar 25 14:22:44 mail amavis[5403]: Found $unarj at /usr/bin/unarj
Mar 25 14:22:44 mail amavis[5403]: Found $uncompress at /usr/bin/uncompress
Mar 25 14:22:44 mail amavis[5403]: No $unfreeze, not using it
Mar 25 14:22:44 mail amavis[5403]: Found $unrar at /usr/bin/unrar
Mar 25 14:22:44 mail amavis[5403]: Found $zoo at /usr/bin/zoo
Mar 25 14:22:44 mail amavis[5403]: Found $cpio at /usr/bin/cpio
Mar 25 14:22:44 mail amavis[5403]: SpamControl: initializing Mail::SpamAssassin
Mar 25 14:22:45 mail postfix/smtp[4748]: A62AEB6AD: to=<mmueller@mster.info>, relay=none, delay=36503, status=deferred (Host or domain name not found. Name service error for name=localhost type=MX: Host not found, try again)
Mar 25 14:22:45 mail amavis[5403]: SpamControl: done
Mar 25 14:24:58 mail postfix/smtpd[5567]: connect from mail.gmx.net[213.165.64.20]
Mar 25 14:24:58 mail postfix/smtpd[5567]: 945C4B642: client=mail.gmx.net[213.165.64.20]
Mar 25 14:24:58 mail postfix/cleanup[5571]: 945C4B642: message-id=<14859.1111756977@www15.gmx.net>
Mar 25 14:24:58 mail postfix/qmgr[4601]: 945C4B642: from=<mullfreak@gmx.de>, size=851, nrcpt=1 (queue active)
Mar 25 14:24:58 mail postfix/qmgr[4601]: 945C4B642: to=<mmueller@mster.info>, relay=none, delay=0, status=deferred (connect to 127.0.0.1[127.0.0.1]: Connection refused)
Mar 25 14:24:58 mail postfix/smtpd[5567]: disconnect from mail.gmx.net[213.165.64.20]


Vielleicht kannst Du mir hier auch noch weiterhelfen. Die Config-Files (main und master) sind eh oben in diesem Thread.

Mullfreak

mullfreak
25.03.05, 14:34
Hi,
das schmeisst er jetzt aus dem LogFile auch noch raus:
Mar 25 14:31:36 mail postfix/smtpd[5679]: fatal: unexpected command-line argument: 10.0.0.0/8,
Mar 25 14:31:37 mail postfix/master[4586]: warning: process /usr/lib/postfix/smtpd pid 5679 exit status 1
Mar 25 14:31:37 mail postfix/master[4586]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling
Mar 25 14:32:37 mail postfix/smtpd[5692]: fatal: unexpected command-line argument: 10.0.0.0/8,
Mar 25 14:32:38 mail postfix/master[4586]: warning: process /usr/lib/postfix/smtpd pid 5692 exit status 1
Mar 25 14:32:38 mail postfix/master[4586]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

Ich weiß nicht, warum er ein Problem hat mit 10.0.0.0/8. Das dürfte doch passen?
Dies ist mein internes Netzwerk. Das Netzwerk zum Internet hin, also das zum Router zeigt, wird mit 192.168.0.0/24 betrieben.

Grüsse
Mullfreak

mullfreak
25.03.05, 14:43
Hi whistle,
ich habe den Eintrag in der master.cf mit 10.0.0.0/8 entfernt. Dort ist jetzt nur noch 127.0.0.0/8 angegeben und schon klappts auch wieder mit der Auslieferung der Mails.

Jetzt bekomme ich in den LogFiles keine Fehler mehr. Der SpamAssassin läuft auch. Jetzt ist nur die Frage ob Amavis die Mails auch an ClamAV übergibt. Das kriege ich aber auch noch hin.

Grüsse
Mullfreak

Jinto
25.03.05, 20:32
Hi whistle,
Jetzt bekomme ich in den LogFiles keine Fehler mehr. Der SpamAssassin läuft auch. Jetzt ist nur die Frage ob Amavis die Mails auch an ClamAV übergibt. Das kriege ich aber auch noch hin.
Das testet man indem man einen Virus verschickt und zwar den Testvirus eicar (http://www.eicar.com).

HTH

mullfreak
25.03.05, 21:14
Hi,

nach dem Nachmittag heute kann ich sagen das Postfix mit Amavis einwandfrei funktioniert. Die Mails werden empfangen und einwandfrei ausgeliefert.
Amavis scannt E-Mail Anhänge und meldet diese als Virus bei Treffer. Diese werden dann an /var/spool/amavis/... ausgeliefert.

Zum Test von ClamAV habe ich den Dienst Amavis gestoppt und die Mails nochmals verschickt. Hier wird ClamAV auch nicht aufgerufen. Ist klar, weil ClamAV von Amavis aufgerufen wird. Wenn aber jetzt bereits Amavis die E-Mail Anhänge scannt und als Virus betitelt, wird ja ClamAV nicht mehr aufgerufen.

Man kann sagen, das der Dienst clamd einwandfrei läuft und damit habe ich auch verschiedene verzeichnisse gescannt.

Nachdem ich dann in der amavisd.conf alles was Anhänge betrifft auskommentiert habe, wurde nochmals ein Test durchgeführt.
ClamAV wird definitiv von Amavis nicht aufgerufen.

Hier die beiden Files:

amavisd.conf

['Clam Antivirus-clamd',
\&ask_daemon, ["CONTSCAN {}\n", "/var/run/amavis/clamd"],
qr/\bOK$/, qr/\bFOUND$/,
qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],


clamd.conf

LocalSocket /var/run/amavis/clamd




Es werden in der clamd.log keine Fehler aufgeführt:

Fri Mar 25 20:23:36 2005 -> SelfCheck: Database status OK.
Fri Mar 25 20:23:36 2005 -> SelfCheck: Integrity OK
Fri Mar 25 18:23:14 2005 -> +++ Started at Fri Mar 25 18:23:14 2005
Fri Mar 25 18:23:14 2005 -> Log file size limited to 2097152 bytes.
Fri Mar 25 18:23:14 2005 -> Verbose logging activated.
Fri Mar 25 18:23:14 2005 -> Running as user vscan (UID 65, GID 101)
Fri Mar 25 18:23:14 2005 -> Reading databases from /var/lib/clamav
Fri Mar 25 18:23:15 2005 -> Protecting against 28666 viruses.
Fri Mar 25 18:23:15 2005 -> Unix socket file /var/run/amavis/clamd
Fri Mar 25 18:23:15 2005 -> Setting connection queue length to 15
Fri Mar 25 18:23:15 2005 -> Listening daemon: PID: 10073
Fri Mar 25 18:23:15 2005 -> Maximal number of threads: 5
Fri Mar 25 18:23:15 2005 -> Archive: Archived file size limit set to 10485760 bytes.
Fri Mar 25 18:23:15 2005 -> Archive: Recursion level limit set to 5.
Fri Mar 25 18:23:15 2005 -> Archive: Files limit set to 1000.
Fri Mar 25 18:23:15 2005 -> Archive: Compression ratio limit set to 200.
Fri Mar 25 18:23:15 2005 -> Archive support enabled.
Fri Mar 25 18:23:15 2005 -> RAR support disabled.
Fri Mar 25 18:23:15 2005 -> Mail files support enabled.
Fri Mar 25 18:23:15 2005 -> ThreadWatcher: Started in process 10073
Fri Mar 25 18:23:15 2005 -> Self checking every 3600 seconds.
Fri Mar 25 18:23:15 2005 -> Timeout set to 180 seconds.
Fri Mar 25 18:23:15 2005 -> SelfCheck: Database status OK.
Fri Mar 25 18:23:15 2005 -> SelfCheck: Integrity OK
Fri Mar 25 19:23:25 2005 -> SelfCheck: Database status OK.
Fri Mar 25 19:23:25 2005 -> SelfCheck: Integrity OK
Fri Mar 25 20:23:36 2005 -> SelfCheck: Database status OK.
Fri Mar 25 20:23:36 2005 -> SelfCheck: Integrity OK


Und die Amavisd.log:

Mar 25 18:25:13 mail amavisd[10098]: starting. amavisd at mail amavisd-new-20030616-p9, Unicode aware, LC_CTYPE=de_DE.UTF-8
Mar 25 18:25:13 mail amavisd[10098]: Perl version 5.008003
Mar 25 18:25:13 mail amavisd[10098]: Module Amavis::Conf 1.15
Mar 25 18:25:13 mail amavisd[10098]: Module Archive::Tar 1.08
Mar 25 18:25:13 mail amavisd[10098]: Module Archive::Zip 1.09
Mar 25 18:25:13 mail amavisd[10098]: Module Compress::Zlib 1.33
Mar 25 18:25:13 mail amavisd[10098]: Module Convert::TNEF 0.17
Mar 25 18:25:13 mail amavisd[10098]: Module Convert::UUlib 1.0
Mar 25 18:25:13 mail amavisd[10098]: Module DB_File 1.808
Mar 25 18:25:13 mail amavisd[10098]: Module MIME::Entity 5.404
Mar 25 18:25:13 mail amavisd[10098]: Module MIME::Parser 5.406
Mar 25 18:25:13 mail amavisd[10098]: Module MIME::Tools 5.411
Mar 25 18:25:13 mail amavisd[10098]: Module Mail::Header 1.60
Mar 25 18:25:13 mail amavisd[10098]: Module Mail::Internet 1.60
Mar 25 18:25:13 mail amavisd[10098]: Module Mail::SpamAssassin 2.63
Mar 25 18:25:13 mail amavisd[10098]: Module Net::Cmd 2.24
Mar 25 18:25:13 mail amavisd[10098]: Module Net::DNS 0.46
Mar 25 18:25:13 mail amavisd[10098]: Module Net::SMTP 2.26
Mar 25 18:25:13 mail amavisd[10098]: Module Net::Server 0.87
Mar 25 18:25:13 mail amavisd[10098]: Module Time::HiRes 1.52
Mar 25 18:25:13 mail amavisd[10098]: Module Unix::Syslog 0.100
Mar 25 18:25:13 mail amavisd[10098]: Found myself: /usr/sbin/amavisd -c /etc/amavisd.conf
Mar 25 18:25:13 mail amavisd[10098]: Lookup::SQL code NOT loaded
Mar 25 18:25:13 mail amavisd[10098]: Lookup::LDAP code NOT loaded
Mar 25 18:25:13 mail amavisd[10098]: AMCL-in protocol code loaded
Mar 25 18:25:13 mail amavisd[10098]: SMTP-in protocol code loaded
Mar 25 18:25:13 mail amavisd[10098]: ANTI-VIRUS code NOT loaded
Mar 25 18:25:13 mail amavisd[10098]: ANTI-SPAM code loaded
Mar 25 18:25:13 mail amavisd[10098]: Net::Server: 2005/03/25-18:25:13 Pid_file already exists for running process (10077)... aborting\n\n at line 229 in fil$
Mar 25 18:25:13 mail amavisd[10098]: Net::Server: 2005/03/25-18:25:13 Server closing!
Mar 25 18:26:24 mail amavisd[10143]: starting. amavisd at mail amavisd-new-20030616-p9, Unicode aware, LC_CTYPE=de_DE.UTF-8
Mar 25 18:26:24 mail amavisd[10143]: Perl version 5.008003
Mar 25 18:26:24 mail amavisd[10143]: Module Amavis::Conf 1.15
Mar 25 18:26:24 mail amavisd[10143]: Module Archive::Tar 1.08
Mar 25 18:26:24 mail amavisd[10143]: Module Archive::Zip 1.09
Mar 25 18:26:24 mail amavisd[10143]: Module Compress::Zlib 1.33
Mar 25 18:26:24 mail amavisd[10143]: Module Convert::TNEF 0.17
Mar 25 18:26:24 mail amavisd[10143]: Module Convert::UUlib 1.0
Mar 25 18:26:24 mail amavisd[10143]: Module DB_File 1.808
Mar 25 18:26:24 mail amavisd[10144]: SpamControl: initializing Mail::SpamAssassin


Vielleicht fällt jemanden noch was ein.

Grüsse
Mullfreak

Grüsse
Mullfreak

whistle
25.03.05, 21:47
Hi,
zu ClamAV kann ich leider nix sagen, ich hab amavisd nur für Anti-Spam benutzt.
Was aber auffällt: in der Log-Datei steht Anti-Virus Code not loaded! Versuch mal "amavisd debug", vielleicht erfährst du dann noch mehr. Läuft amavis vielleicht chrooted?
Gruß
Whistle

Tomek
26.03.05, 09:22
Mullfreak: Benutze bitte die CODE-Tags beim Posten. Wie das geht, erfährst du hier (http://www.linuxforen.de/forums/showthread.php?t=164474).

whistle
26.03.05, 10:31
Hi,
schau doch mal in deiner amavisd.conf ob dort der Eintrag "@bypass_virus_checks_maps = (1);" exisitiert, wenn dem so ist, kommentiere ihn mal aus.
Gruß
Whistle

mullfreak
26.03.05, 10:38
Hi whistle,
diesen Eintrag habe ich in meiner amavisd.conf nicht vorhanden.
Es gibt einen Eintrag, der da heißt:
@bypass_virus_checks_acl = qw( . ); # uncomment to DISABLE anti-virus code

Dieser ist auskommentiert.

Grüsse
Mullfreak