• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Postfix versendet die Mails nicht

Status
Für weitere Antworten geschlossen.

Latz

Member
Hallo,

habe einen Mailserver auf Suse 9.0 Basis. Fetchmail, Postfix und Qpopper sind installiert.
Wenn ich jetzt eine Mail über meinen Mailserver verschicken will, lässt er die Mail in der Queue und verschickt sie nicht.

Auszug aus der Logdatei:

Mar 3 07:58:19 linux postfix/smtp[977]: connect to localhost[127.0.0.1]: Connection refused (port 10024)
Mar 3 07:58:19 linux postfix/smtp[977]: 96A638D5E: to=<latz@***.de>, relay=none, delay=0, status=deferred (connect to localhost[127.0.0.1]: Connection refused)

Ich hoffe Ihr könnt mir helfen.

Gruß Latz
 
OP
L

Latz

Member
Also, ich bin jetzt auf den Trichter gekommen, dass ich ein Antiviren Programm installieren muss. Nur weiss ich jetzt nicht wie ich das genau machen muss.
Habe jetzt mal antivir für Linux Workstations installiert, doch jetzt bekomme ich auch wieder die meldung, dass amavis kein virenscanner findet, obwohl ich antivir doch installiert habe.
Welches antivir muss ich da installieren und wie wird das genau installiert?

Gruß Latz
 

DemoFreak

Member
Wo ist das Antivir bei Dir gelandet? Ich glaube, amavis sucht es unter /usr/bin/antivir, aber das Paket installiert den Scanner nach /usr/lib/Antivir/antivir. Daher muss ein Link gelegt werden, schau mal, ob der da ist.

Code:
ls -la /usr/bin/antivir

muss ergeben

Code:
asterix:~ # ls -la /usr/bin/antivir
lrwxrwxrwx    1 root     root           22 Feb 20 16:49 /usr/bin/antivir -> ../lib/AntiVir/antivir

Wenn das nicht so ist, hast Du schon einen möglichen Fehler entdeckt.

Ausserdem solltest Du Dir, aber das ist jetzt unabhängig vopn Deinem Fehler, die für Privatanwendung kostenlose Lizenz von Antivir holen, sonst kannst Du die Virendefinitionsdateien nicht updaten. Schau auf der Webseite, das ist ziemlich deutlich verlinkt dort. Die Lizenzdatei kommt per Email, und Du musst sie einfach nur ins Verzeichnis /usr/lib/Antivir kopieren. Danach kannst Du mittels

Code:
antivir --update

Deine Signaturen und den Scanner updaten.
 
OP
L

Latz

Member
Hallo,

Code:
asterix:~ # ls -la /usr/bin/antivir
lrwxrwxrwx    1 root     root           22 Feb 20 16:49 /usr/bin/antivir -> ../lib/AntiVir/antivir
das funktioniert. Bekomme genau die Meldung.

Also, ich denke dass antivir funktioniert, denn wenn ich in Update versuche bekomme ich die Meldung:

Code:
Sorry, --update is not available in DEMO mode.

Kann es sein, dass es damit zusammenhängt, dass ich antivir für workstations installiert habe und nicht antivir für Mailgate?

Hier nochmal ein Auszug aus meiner jetzigen /var/log/mail:

Code:
Mar  3 12:10:37 linux postfix/postfix-script: starting the Postfix mail system
Mar  3 12:10:37 linux postfix/master[829]: daemon started -- version 2.0.14
Mar  3 12:10:37 linux postfix/qmgr[834]: 2ABD68D64: from=<tobias.funk@domain1.de>, size=601, nrcpt=1 (queue active)
Mar  3 12:10:38 linux postfix/smtp[844]: connect to localhost[127.0.0.1]: Connection refused (port 10024)
Mar  3 12:10:38 linux postfix/smtp[844]: 2ABD68D64: to=<latz@domain2.de>, relay=none, delay=1418, status=deferred (connect to localhost[127.0.0.1]: Connection refused)
Mar  3 12:10:40 linux amavis[607]: starting.  amavisd at linux amavisd-new-20030616-p5, Unicode aware
Mar  3 12:10:40 linux amavis[607]: Perl version               5.008001
Mar  3 12:10:40 linux amavis[607]: Module Amavis::Conf        1.15
Mar  3 12:10:40 linux amavis[607]: Module Archive::Tar        0.23
Mar  3 12:10:40 linux amavis[607]: Module Archive::Zip        1.05
Mar  3 12:10:40 linux amavis[607]: Module Compress::Zlib      1.16
Mar  3 12:10:40 linux amavis[607]: Module Convert::TNEF       0.17
Mar  3 12:10:40 linux amavis[607]: Module Convert::UUlib      0.31
Mar  3 12:10:40 linux amavis[607]: Module MIME::Entity        5.404 
Mar  3 12:10:40 linux amavis[607]: Module MIME::Parser        5.406 
Mar  3 12:10:40 linux amavis[607]: Module MIME::Tools         5.411 
Mar  3 12:10:40 linux amavis[607]: Module Mail::Header        1.58
Mar  3 12:10:40 linux amavis[607]: Module Mail::Internet      1.58
Mar  3 12:10:40 linux amavis[607]: Module Mail::SpamAssassin  2.55
Mar  3 12:10:40 linux amavis[607]: Module Net::Cmd            2.24
Mar  3 12:10:40 linux amavis[607]: Module Net::DNS            0.38
Mar  3 12:10:40 linux amavis[607]: Module Net::SMTP           2.26
Mar  3 12:10:40 linux amavis[607]: Module Net::Server         0.85
Mar  3 12:10:40 linux amavis[607]: Module Time::HiRes         1.51
Mar  3 12:10:40 linux amavis[607]: Module Unix::Syslog        0.98
Mar  3 12:10:40 linux amavis[607]: Found myself: /usr/sbin/amavisd -c /etc/amavisd.conf
Mar  3 12:10:40 linux amavis[607]: Lookup::SQL code       NOT loaded
Mar  3 12:10:40 linux amavis[607]: Lookup::LDAP code      NOT loaded
Mar  3 12:10:40 linux amavis[607]: AMCL-in protocol code  loaded
Mar  3 12:10:40 linux amavis[607]: SMTP-in protocol code  loaded
Mar  3 12:10:40 linux amavis[607]: ANTI-VIRUS code        loaded
Mar  3 12:10:40 linux amavis[607]: ANTI-SPAM  code        loaded
Mar  3 12:10:40 linux amavis[894]: Net::Server: Process Backgrounded
Mar  3 12:10:40 linux amavis[894]: Net::Server: 2004/03/03-12:10:40 Amavis (type Net::Server::PreForkSimple) starting! pid(894)
Mar  3 12:10:40 linux amavis[894]: Net::Server: Binding to UNIX socket file /var/spool/amavis/amavisd.sock using SOCK_STREAM
Mar  3 12:10:40 linux amavis[894]: Net::Server: Binding to TCP port 10024 on host 127.0.0.1
Mar  3 12:10:40 linux amavis[894]: Net::Server: Setting gid to "101 101"
Mar  3 12:10:40 linux amavis[894]: Net::Server: Setting uid to "65"
Mar  3 12:10:40 linux amavis[894]: Net::Server: Couldn't POSIX::setuid to "65" [Illegal seek]
Mar  3 12:10:40 linux amavis[894]: Found $file       at /usr/bin/file
Mar  3 12:10:40 linux amavis[894]: Found $arc        at /usr/bin/arc
Mar  3 12:10:40 linux amavis[894]: Found $gzip       at /usr/bin/gzip
Mar  3 12:10:40 linux amavis[894]: Found $bzip2      at /usr/bin/bzip2
Mar  3 12:10:40 linux amavis[894]: No $lzop,         not using it
Mar  3 12:10:40 linux amavis[894]: Found $lha        at /usr/bin/lha
Mar  3 12:10:40 linux amavis[894]: Found $unarj      at /usr/bin/unarj
Mar  3 12:10:40 linux amavis[894]: Found $uncompress at /usr/bin/uncompress
Mar  3 12:10:40 linux amavis[894]: No $unfreeze,     not using it
Mar  3 12:10:40 linux amavis[894]: Found $unrar      at /usr/bin/unrar
Mar  3 12:10:40 linux amavis[894]: Found $zoo        at /usr/bin/zoo
Mar  3 12:10:40 linux amavis[894]: Found $cpio       at /usr/bin/cpio
Mar  3 12:10:40 linux amavis[894]: Found primary av scanner H+BEDV AntiVir or CentralCommand Vexira Antivirus at /usr/bin/antivir
Mar  3 12:10:40 linux amavis[894]: SpamControl: initializing Mail::SpamAssassin
Mar  3 12:10:41 linux amavis[894]: SpamControl: done
Mar  3 12:43:57 linux postfix/qmgr[834]: 2ABD68D64: from=<tobias.funk@domain1.de>, size=601, nrcpt=1 (queue active)
Mar  3 12:44:37 linux postfix/smtp[942]: 2ABD68D64: to=<latz@domain2.de>, relay=none, delay=3457, status=deferred (Name service error for name=localhost type=A: Host not found, try again)
Hoffe, du kannst etwas damit anfangen.

Gruß Latz
 

DemoFreak

Member
Code:
Mar  3 12:10:40 linux amavis[894]: Found primary av scanner H+BEDV AntiVir or CentralCommand Vexira Antivirus at /usr/bin/antivir 
Mar  3 12:10:40 linux amavis[894]: SpamControl: initializing Mail::SpamAssassin 
Mar  3 12:10:41 linux amavis[894]: SpamControl: done 
Mar  3 12:43:57 linux postfix/qmgr[834]: 2ABD68D64: from=<tobias.funk@domain1.de>, size=601, nrcpt=1 (queue active) 
Mar  3 12:44:37 linux postfix/smtp[942]: 2ABD68D64: to=<latz@domain2.de>, relay=none, delay=3457, status=deferred (Name service error for name=localhost type=A: Host not found, try again)
Also den Virenscanner findet er offensichtlich, siehe erste Zeile des Logauszugs.
Aber Postfix hat scheinbar mit der Namensauflösung ein Problem. Das hatte ich schon an manchen Stellen in Zusammanhang mit IPv6. Wie sieht Deine /etc/hosts aus? Poste mal bitte hier.
 
OP
L

Latz

Member
#
# hosts This file describes a number of hostname-to-address
# mappings for the TCP/IP subsystem. It is mostly
# used at boot time, when no name servers are running.
# On small systems, this file can be used instead of a
# "named" name server.
# Syntax:
#
# IP-Address Full-Qualified-Hostname Short-Hostname
#

127.0.0.1 localhost

# special IPv6 addresses
::1 localhost ipv6-localhost ipv6-loopback

fe00::0 ipv6-localnet

ff00::0 ipv6-mcastprefix
ff02::1 ipv6-allnodes
ff02::2 ipv6-allrouters
ff02::3 ipv6-allhosts

10.3.201.227 linux.sf-orion linux
 

DemoFreak

Member
Gut, da ich annehme, dass Du IPv6 bisher ebensowenig benutzt wie die meisten anderen, kannst Du erstmal versuchshalber diese Datei wie folgt editieren:
Code:
# 
# hosts This file describes a number of hostname-to-address 
# mappings for the TCP/IP subsystem. It is mostly 
# used at boot time, when no name servers are running. 
# On small systems, this file can be used instead of a 
# "named" name server. 
# Syntax: 
# 
# IP-Address Full-Qualified-Hostname Short-Hostname 
# 

127.0.0.1 localhost 

# special IPv6 addresses 
# ::1 localhost ipv6-localhost ipv6-loopback 

# fe00::0 ipv6-localnet 

# ff00::0 ipv6-mcastprefix 
# ff02::1 ipv6-allnodes 
# ff02::2 ipv6-allrouters 
# ff02::3 ipv6-allhosts 

10.3.201.227 linux.sf-orion linux
Mit einfachen Worte: kommentiere alles IPv6-bezogene aus, und lass nur die IPv4-Adressen für localhost und Dein linux.sf-orion drin. Dann restarte mal den Postfix
Code:
rcpostfix restart
(eigentlich sollte reload gefolgt von sendmail -q reichen, aber sicher ist sicher ;)) und schau Dir mit
Code:
mailq
an, ob die Mails so nach und nach aus der Queue verschwinden. Auch, wenn sie das nicht tun sollten, versuche trotzdem, ob neue Mails jetzt ankommen. Ergebnis hier bitte posten. :)
 
OP
L

Latz

Member
Hallo,

die mails sind immer noch in der queue.

Eine Verständnisfrage. Ich habe amavis von der Suse 9.0 CD installiert.
Antivir habe ich von der Homepage installiert. Und zwar für Workstations. Die Dazuko installatin habe ich nicht durchgeführt und auch den AV Guard habe ich nicht installiert.

Muss ich diesen installieren?

So nun mein neuer Auszug aus der logdatei:
Code:
Mar  3 15:09:44 linux postfix/master[1232]: daemon started -- version 2.0.14
Mar  3 15:09:44 linux postfix/qmgr[1236]: 2ABD68D64: from=<tobias.funk@domain1.de>, size=601, nrcpt=1 (queue active)
Mar  3 15:09:44 linux postfix/qmgr[1236]: 2ABD68D64: from=<tobias.funk@domain1.de>, size=601, nrcpt=1 (queue active)
Mar  3 15:09:44 linux amavis[892]: (00892-01) ESMTP::10024 /var/spool/amavis/amavis-20040303T150944-00892: <tobias.funk@domain1.de> -> <latz@domain2.de> Received: SIZE=1409 BODY=8BITMIME from linux.sf-orion ([127.0.0.1]) by localhost (linux [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00892-01 for <latz@domain2.de>; Wed,  3 Mar 2004 15:09:44 +0100 (CET)
Mar  3 15:09:44 linux amavis[891]: (00891-01) ESMTP::10024 /var/spool/amavis/amavis-20040303T150944-00891: <tobias.funk@domain1.de> -> <latz@domain2.de> Received: SIZE=601 from linux.sf-orion ([127.0.0.1]) by localhost (linux [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 00891-01 for <latz@domain2.de>; Wed,  3 Mar 2004 15:09:44 +0100 (CET)
Mar  3 15:09:44 linux amavis[892]: (00892-01) Checking: <tobias.funk@domain1.de> -> <latz@domain2.de>
Mar  3 15:09:44 linux amavis[891]: (00891-01) Checking: <tobias.funk@domain1.de> -> <latz@domain2.de>
Mar  3 15:09:45 linux amavis[891]: (00891-01) Virus scanner failure: /usr/bin/antivir (exit status: 214)
Mar  3 15:09:45 linux amavis[891]: (00891-01) WARN: all primary virus scanners failed, considering backups
Mar  3 15:09:45 linux amavis[891]: (00891-01) TROUBLE in check_mail: virus_scan FAILED: ALL VIRUS SCANNERS FAILED: 
Mar  3 15:09:45 linux amavis[891]: (00891-01) PRESERVING EVIDENCE in /var/spool/amavis/amavis-20040303T150944-00891
Mar  3 15:09:45 linux amavis[891]: (00891-01) TIMING [total 1200 ms] - SMTP EHLO: 15 (1%), SMTP pre-MAIL: 11 (1%), mkdir tempdir: 19 (2%), create email.txt: 22 (2%), SMTP pre-DATA-flush: 15 (1%), SMTP DATA: 34 (3%), body hash: 1 (0%), mkdir parts: 2 (0%), mime_decode: 56 (5%), get-file-type: 59 (5%), decompose_part: 1 (0%), parts: 0 (0%), AV-scan-1: 961 (80%), rundown: 2 (0%)
Mar  3 15:09:45 linux amavis[892]: (00892-01) Virus scanner failure: /usr/bin/antivir (exit status: 214)
Mar  3 15:09:45 linux amavis[892]: (00892-01) WARN: all primary virus scanners failed, considering backups
Mar  3 15:09:45 linux amavis[892]: (00892-01) TROUBLE in check_mail: virus_scan FAILED: ALL VIRUS SCANNERS FAILED: 
Mar  3 15:09:45 linux amavis[892]: (00892-01) PRESERVING EVIDENCE in /var/spool/amavis/amavis-20040303T150944-00892
Mar  3 15:09:45 linux amavis[892]: (00892-01) TIMING [total 1186 ms] - SMTP EHLO: 6 (1%), SMTP pre-MAIL: 1 (0%), mkdir tempdir: 15 (1%), create email.txt: 6 (1%), SMTP pre-DATA-flush: 19 (2%), SMTP DATA: 24 (2%), body hash: 17 (1%), mkdir parts: 2 (0%), mime_decode: 54 (5%), get-file-type: 181 (15%), decompose_part: 2 (0%), parts: 0 (0%), AV-scan-1: 855 (72%), rundown: 2 (0%)
Mar  3 15:09:45 linux postfix/smtp[1241]: 6ED8B9020: to=<latz@domain2.de>, relay=localhost[127.0.0.1], delay=5290, status=deferred (host localhost[127.0.0.1] said: 451 4.5.0 Error in processing, id=00892-01, virus_scan FAILED: ALL VIRUS SCANNERS FAILED:  (in reply to end of DATA command))
Mar  3 15:09:45 linux postfix/smtp[1240]: 2ABD68D64: to=<latz@domain2.de>, relay=localhost[127.0.0.1], delay=12165, status=deferred (host localhost[127.0.0.1] said: 451 4.5.0 Error in processing, id=00891-01, virus_scan FAILED: ALL VIRUS SCANNERS FAILED:  (in reply to end of DATA command))

Gruß Latz
 

DemoFreak

Member
Du musst nix anderes installieren, der Workstationscanner ist der Richtige (AmaVis kopiert die Mail in eine Datei und lässt selbige scannen). Die ganzen anderen Sachen sind für andere Anwendungszwecke und auch von der kostenfreien Personal-Lizenz nicht abgedeckt.

Zur Sache: Du hast da mehrere Meldungen der Art

Virus scanner failure: /usr/bin/antivir (exit status: 214)

in Deinem Log. Dort wird der Hase wohl begraben liegen. Nun schau Dir mal mit

antivir --help

ganz unten die Liste der Exitcodes an, gucke, was 214 bedeutet, und dann scher Dich auf die Seite, von der ich vorhin schon sprach und besorge Dir eine Lizenz. :D :p
 

DemoFreak

Member
DemoFreak schrieb:
Ausserdem solltest Du Dir, aber das ist jetzt unabhängig vopn Deinem Fehler, die für Privatanwendung kostenlose Lizenz von Antivir holen, sonst kannst Du die Virendefinitionsdateien nicht updaten. Schau auf der Webseite, das ist ziemlich deutlich verlinkt dort. Die Lizenzdatei kommt per Email, und Du musst sie einfach nur ins Verzeichnis /usr/lib/Antivir kopieren. Danach kannst Du mittels

Code:
antivir --update

Deine Signaturen und den Scanner updaten.
Damit Du nicht erst suchen musst, und weil ich grade eine nette Phase habe :D

http://www.antivir.de/order/privreg/linux.htm

Dort registrieren und dann mit der zugeschickten Lizenzdatei wie oben beschrieben verfahren.
 
OP
L

Latz

Member
OK, ich glaube ich habe verstanden. :lol:

Jetzt habe ich noch eine Frage. Normalerweise läuft auf diesem Server noch Squid als transparenter Proxy. Dadurch wird die Firewall mit folgender Regel benutzt:
Code:
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128

muss ich für die Umleitung auf den Virenscanner auch eine Regel erstellen? Wenn ja wie muss diese lauten?
Könnte ich diese dann mit in das Startscript schreiben?

So, dann dank ich die hier erstmal rechtherzlich und hoffe, du kannst mir diese Frage noch beantworten. :D

Gruß Latz
 
OP
L

Latz

Member
Hallo,

mein Postfix sendet leider nach dem Update auf Suse 9.1 die mails nicht mehr.
Hier mal der Auszug aus der /var/log/mail:


Code:
May 15 06:07:38 mailer postfix/smtpd[1957]: connect from unknown[192.168.123.100]
May 15 06:07:39 mailer postfix/smtpd[1957]: 0A604A480: client=unknown[192.168.123.100]
May 15 06:07:39 mailer postfix/cleanup[1960]: 0A604A480: message-id=<40C9E1B3.3050103@baeckerei-funk.de>
May 15 06:07:39 mailer postfix/qmgr[1956]: 0A604A480: from=<tobias.funk@baeckerei-funk.de>, size=602, nrcpt=1 (queue active)
May 15 06:07:39 mailer postfix/smtp[1961]: connect to localhost[::1]: Connection refused (port 10024)
May 15 06:07:39 mailer postfix/smtp[1961]: connect to localhost[127.0.0.1]: Connection refused (port 10024)
May 15 06:07:39 mailer postfix/smtpd[1957]: disconnect from unknown[192.168.123.100]
May 15 06:07:39 mailer postfix/smtp[1961]: 0A604A480: to=<Latz@tobiasfunk.de>, relay=none, delay=1, status=deferred (connect to localhost[127.0.0.1]: Connection refused)

Gruß Latz
 
OP
L

Latz

Member
was hattest Du Dir mit dem Update auf SuSE 9.1 erhofft?
Wenn es mit 9.0 lief warum dieser Update?

Hatte ein anderes Problem mit amavis-new, deshalb das update.

Amavis läuft. Habe versucht amavis zu restarten, doch dann bekomme ich diese Meldung:

Code:
Bareword found where operator expected at /etc/amavisd.conf line 126, near "# feeding amavisd, e.g. with Postfix the 'Max"
  (Might be a runaway multi-line '' string starting on line 120)
        (Missing operator before Max?)
Number found where operator expected at /etc/amavisd.conf line 127, near "# master.cf file, like the '2"
  (Might be a runaway multi-line '' string starting on line 126)
        (Missing operator before 2?)
String found where operator expected at /etc/amavisd.conf line 141, near "# that WE DO NOT WANT (it won'"
  (Might be a runaway multi-line '' string starting on line 127)
        (Missing semicolon on previous line?)
Bareword found where operator expected at /etc/amavisd.conf line 141, near "# that WE DO NOT WANT (it won't"
        (Missing operator before t?)
Scalar found where operator expected at /etc/amavisd.conf line 385, near "D_DISCARD  # (defaults to D_BOUNCE)
$final_banned_destiny"
        (Missing semicolon on previous line?)
Error in config file /etc/amavisd.conf: syntax error at /etc/amavisd.conf line 126, near "# feeding amavisd, e.g. with Postfix the 'Max procs"
syntax error at /etc/amavisd.conf line 385, near "D_DISCARD  # (defaults to D_BOUNCE)
$final_banned_destiny     "

Ich hoffe du kannst mir helfen.

Gruß Latz

edit: Habe das Problem gefunden!!!
trotzdem danke
 
OP
L

Latz

Member
Ein Problem habe ich noch!

Wenn ein Virus in einer mail gefunden wird, wird eine warnmail an
virusalert@funk.local erstellt. diese mail wird jedoch versucht über den relayserver zuzustellen.
wie kann ich postfix klarmachen, dass es mails die an meine lokale domain gehen, auch lokal zustellt?

Gruß Latz
 
OP
L

Latz

Member
Danke für Eure Antworten,

doch leider hilft beides nicht. Hat vielleicht noch jemand ne Idee?

Gruß Latz
 

Martin Breidenbach

Ultimate Guru
Latz schrieb:
wie kann ich postfix klarmachen, dass es mails die an meine lokale domain gehen, auch lokal zustellt?

Check doch mal folgende Einstellung:

YaST2 - System - Editor für /etc/sysconfig-Dateien

Dort dann

Network - Mail - Postfix - POSTFIX_LOCALDOMAINS

Ich hatte ähnliche Probleme und habe da mal alles reingeschrieben was irgendwie paßt (Rechner heißt gateway.discworld.home):

discworld.home,localhost,gateway,gateway.discworld.home

Ich glaube bei mir hatte da localhost gefehlt und nachdem ich das hinzufügte wurde es besser. Als ich jetzt von discworld.local in discworld.home umbenannt habe hatte ich diesen Eintrag auch erst vergessen zu ändern (und Mail ging natürlich nicht mehr).
 
Status
Für weitere Antworten geschlossen.
Oben