Mail Server geht nach Spam Update nicht mehr

ReduX

New Member
Tag,
Ich arbeite schon etwas länger mit Linux un habe mir zwecks privaten vorhaben einen Server zugelegt.
Dort läuft wie auch sonst überall bei mir Debian Etch 4.0.
Soweit so gut, alles eingerichtet wie ich es gewohnt war usw.
Ich bin dann zu dem Punkt gekommen das ich unbedingt einen Mail Server brauche, da ich eine Domain habe und darüber mein kompletter E-Mail Verkehr läuft.
Da das Thema E-Mail Server für mich neuland ist (Zuhause nochnie gebraucht) habe ich mir ein Tutorial gesucht und mich über die Sicherheit schlau gemacht (stichpunkt Offen Rellay).
Ich habe dann mittels des Tutorials (das ich verschlampt habe) den Mail server (Postfix; Dovecot; SpamAssign<=kann auch anderst heißen) aufgesetzt.
Der Server war so konfiguriert das man die Domains und User alle schön in die Mysql Tabelle schreiben konnte.
Alle waren glücklich der Server lief ohne Probleme, jedoch seit geraumer Zeit kann ich keine E-Mails mehr Empfangen oder Senden, alle Dienste laufen aber.
In den Logfiles steht dann immer:
Code:
Jul 22 00:46:04 HOST postfix/qmgr[7310]: 2DEB52A6BE: to=<timo@MEINEDOMAIN>, relay=none, delay=23981, delays=23981/0.8/0/0, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with 127.0.0.1[127.0.0.1] while sending RCPT TO)
Jul 22 00:46:04 HOST postfix/qmgr[7310]: 76B732A671: to=<timo@MEINEDOMAIN>, relay=none, delay=431800, delays=431800/0.8/0/0, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with 127.0.0.1[127.0.0.1] while sending RCPT TO)
Jul 22 00:46:04 HOST postfix/qmgr[7310]: 756072BFC8: to=<timo@MEINEDOMAIN>, relay=none, delay=351696, delays=351695/0.81/0/0, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with 127.0.0.1[127.0.0.1] while sending RCPT TO)
Jul 22 00:46:04 HOST postfix/qmgr[7310]: 7E8DD2BFCA: to=<timo@MEINEDOMAIN>, relay=none, delay=351660, delays=351660/0.81/0/0, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with 127.0.0.1[127.0.0.1] while sending RCPT TO)
Jul 22 00:46:04 HOST postfix/qmgr[7310]: 712D62BFAF: to=<timo@MEINEDOMAIN>, relay=none, delay=331044, delays=331043/0.82/0/0, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with 127.0.0.1[127.0.0.1] while sending RCPT TO)
Jul 22 00:46:04 HOST postfix/qmgr[7310]: 75F222BFD3: to=<timo@MEINEDOMAIN>, relay=none, delay=295414, delays=295413/0.82/0/0, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with 127.0.0.1[127.0.0.1] while sending RCPT TO)
Jul 22 00:46:04 HOST postfix/qmgr[7310]: 792C42BFFF: to=<timo@MEINEDOMAIN>, relay=none, delay=311125, delays=311125/0.83/0/0, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with 127.0.0.1[127.0.0.1] while sending RCPT TO)
Jul 22 00:46:04 HOST postfix/qmgr[7310]: 7E17B2BF7C: to=<timo@MEINEDOMAIN>, relay=none, delay=223732, delays=223731/0.83/0/0, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with 127.0.0.1[127.0.0.1] while sending RCPT TO)
Jul 22 00:46:04 HOST postfix/qmgr[7310]: 77B912BB46: to=<timo@MEINEDOMAIN>, relay=none, delay=31561, delays=31560/0.84/0/0, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with 127.0.0.1[127.0.0.1] while sending RCPT TO)
Jul 22 00:46:04 HOST postfix/qmgr[7310]: 72D372BB65: to=<timo@MEINEDOMAIN>, relay=none, delay=15966, delays=15966/0.84/0/0, dsn=4.4.2, status=deferred (delivery temporarily suspended: lost connection with 127.0.0.1[127.0.0.1] while sending RCPT TO)
Jul 22 00:46:33 HOST postfix/smtp[17893]: connect to ddplus.co.uk[89.238.131.133]: Connection timed out (port 25)
Jul 22 00:46:33 HOST postfix/smtp[17893]: 5307A2C048: to=<[email protected]>, relay=none, delay=20030, delays=20000/0.03/30/0, dsn=4.4.1, status=deferred (connect to ddplus.co.uk[89.238.131.133]: Co
Jul 22 00:46:35 HOST dovecot: pop3-login: Disconnected: rip=80.93.223.120, lip=SERVERIP
Jul 22 00:47:10 HOST dovecot: pop3-login: Disconnected: rip=91.121.66.222, lip=SERVERIP
Jul 22 00:47:55 HOST dovecot: pop3-login: Disconnected: rip=91.121.87.77, lip=SERVERIP
Jul 22 00:48:22 HOST postfix/anvil[17792]: statistics: max connection rate 1/60s for (smtp:78.36.161.139) at Jul 22 00:44:58
Jul 22 00:48:22 HOST postfix/anvil[17792]: statistics: max connection count 1 for (smtp:78.36.161.139) at Jul 22 00:44:58
Jul 22 00:48:22 HOST postfix/anvil[17792]: statistics: max cache size 1 at Jul 22 00:44:58
Jul 22 00:49:23 HOST postfix/scache[17897]: statistics: start interval Jul 22 00:46:03
Jul 22 00:49:23 HOST postfix/scache[17897]: statistics: domain lookup hits=0 miss=3 success=0%
Jul 22 00:49:23 HOST postfix/scache[17897]: statistics: address lookup hits=0 miss=3 success=0%
Jul 22 00:50:04 HOST dovecot: pop3-login: Disconnected: rip=91.121.66.222, lip=SERVERIP
Jul 22 00:50:06 HOST dovecot: pop3-login: Disconnected: rip=80.93.223.120, lip=SERVERIP
Hier sieht man auch wieder schön die ganzen Zombies die versuch da was zu machen.
Irgendwie habe ich den Spam Dämon im Verdacht da er ja unter localhost läuft und er da immer die Verbindung verliert.
Bzw. ich würde den Mail Server nochmal komplett neu aufsetzen, kann mir da jemand ein Tutorial für geben mit ca. den gleichen Eigenschaften die der bisherige hat?
Ich weiß das man normalerweiße die Doku lesen soll, aber in der Doku steht nix wie man Postix Dovecot usw. zusammenbringt und dann noch mit mysql Verbindet.
Ich bin mir hier auch im Klaren das man beim Betreiben eines Mail-Servers Verantwortung mitbringen muss zwecks Sicherheit und Spam.

MFG ReduX

Edit: Falls jemand ein Tutorial oder ähnliches Postet wäre es nicht schlecht das in dem Tutorial nicht nur steht was ich machen muss sondern warum jetzt da diese Einstellung getroffen werden muss, damit es klappt (damit ich auch noch was lerne).
 
Last edited by a moderator:
Tag,
Hier mal die Config:
Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

# TLS parameters
smtpd_tls_cert_file = /etc/ssl/certs/postfix.pem
smtpd_tls_key_file = /etc/ssl/private/postfix.pem
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = SERVER.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = SERVER.com, localhost.SERVER.com, localhost
relayhost =
mynetworks =
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_tls_auth_only = yes
content_filter = smtp-amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings

MFG ReduX
 
Code:
content_filter = smtp-amavis:[127.0.0.1]:10024

Läuft der amavis-Dienst auch auf Port 10024? Sieht eher nicht danach aus. Versuch den noch mal von Hand zu starten und schau ggfs. in dessen Logfiles.
 
Nach einem Restart von amavis (was komischerweiße 3min dauert) steht in der Log dann:
Code:
Jul 22 17:50:47 HOST amavis[8313]: (08313-02-41) (!!) WARN: all primary virus scanners failed, considering backups
Jul 22 17:50:47 HOST amavis[8313]: (08313-02-41) (!!) TROUBLE in check_mail: virus_scan FAILED: virus_scan: ALL VIRUS SCANNERS FAILED: ClamAV-clamd av-scanner FAILED: Too many retries to talk to /var/run/clamav/clamd.ctl (Can't connect to UNIX socket /var/run/clamav/clamd.ctl: Datei oder Verzeichnis nicht gefunden) at (eval 48) line 268.
Jul 22 17:50:47 HOST amavis[8313]: (08313-02-41) (!) PRESERVING EVIDENCE in /var/lib/amavis/tmp/amavis-20080722T175040-08313
Jul 22 17:50:47 HOST postfix/smtp[8751]: 743A52A619: to=<timo@MEINEDOMAIN>, relay=127.0.0.1[127.0.0.1]:10024, conn_use=41, delay=184337, delays=184038/292/0/7.1, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=08313-02-41, virus_scan FAILED: virus_scan: ALL VIRUS SCANNERS FAILED: ClamAV-clamd av-scanner FAILED: Too many retries to talk to /var/run/clamav/clamd.ctl (Can't connect to UNIX socket /var/run/clamav/clamd.ctl: Datei oder Verzeichnis nicht gefunden) at (eval 48) line 268. (in reply to end of DATA command))
Jul 22 17:50:48 HOST amavis[8312]: (08312-03-42) (!) ClamAV-clamd: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: Datei oder Verzeichnis nicht gefunden, retrying (2)
Jul 22 17:50:54 HOST amavis[8312]: (08312-03-42) (!!) ClamAV-clamd av-scanner FAILED: Too many retries to talk to /var/run/clamav/clamd.ctl (Can't connect to UNIX socket /var/run/clamav/clamd.ctl: Datei oder Verzeichnis nicht gefunden) at (eval 48) line 268.
Jul 22 17:50:54 HOST amavis[8312]: (08312-03-42) (!!) WARN: all primary virus scanners failed, considering backups
Jul 22 17:50:54 HOST amavis[8312]: (08312-03-42) (!!) TROUBLE in check_mail: virus_scan FAILED: virus_scan: ALL VIRUS SCANNERS FAILED: ClamAV-clamd av-scanner FAILED: Too many retries to talk to /var/run/clamav/clamd.ctl (Can't connect to UNIX socket /var/run/clamav/clamd.ctl: Datei oder Verzeichnis nicht gefunden) at (eval 48) line 268.
Jul 22 17:50:54 HOST amavis[8312]: (08312-03-42) (!) PRESERVING EVIDENCE in /var/lib/amavis/tmp/amavis-20080722T175047-08312
Jul 22 17:50:54 HOST postfix/smtp[8744]: 7E9782BF2C: to=<timo@MEINEDOMAIN>, relay=127.0.0.1[127.0.0.1]:10024, conn_use=42, delay=271534, delays=271228/298/0/7.1, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=08312-03-42, virus_scan FAILED: virus_scan: ALL VIRUS SCANNERS FAILED: ClamAV-clamd av-scanner FAILED: Too many retries to talk to /var/run/clamav/clamd.ctl (Can't connect to UNIX socket /var/run/clamav/clamd.ctl: Datei oder Verzeichnis nicht gefunden) at (eval 48) line 268. (in reply to end of DATA command))
Aber warum findert er die dinger nicht ich hab das doch ganz normal installiert?!?!

MFG ReduX
 
Der clamd läuft sonst hätte ich ihn ja nicht restarten können...
Du hast amavisd-new neugestartet. Nicht den clamd.

Und sollte er wider Erwarten doch laufen, dann stimmt die Pfadangabe des UNIX-Sockets in der amavisd-new Konfiguration nicht mit der Angabe in der clamd.conf überein.
 
Boar, ich bin dumm. Ich hätte gleich mal mit man clamd drauf gehen sollen.
Hab die ganze Zeit clamd restart eingegeben :mad:

@Roger Wilco
Du bist mein Held, jetzt kann ich mich wieder von 100Spam Mails am Tag zu müllen lassen :D

Wenn du mir noch sagen könntest warum es dazu kam das er sich aufgehängt hat (er lilef im Hintergrund die ganze Zeit), da es ja keinen Neustart o.a. gab, dann bist du mein Gott :rolleyes:.

Nochmal Danke an alle die mir geholfen haben.

MFG ReduX

P.S.: weiß jemand wie man gegen die Spam Mails vorgehen kann? Habe mal im Header geschaut, es wird jedesmal ein anderer Server benutzt (andere IP) und jedes mal ist der Betress und Inhalt anders, sodass man keine Regeln erstellen kann.
 
Wenn du mir noch sagen könntest warum es dazu kam das er sich aufgehängt hat (er lilef im Hintergrund die ganze Zeit), da es ja keinen Neustart o.a. gab, dann bist du mein Gott :rolleyes:.
Das steht in deinen Logs zum clamd (evtl. /var/log/clamav/*.log).

P.S.: weiß jemand wie man gegen die Spam Mails vorgehen kann?
policyd-weight in Kombination mit Greylisting ist recht effektiv.
 
Tag,
Ich habe da nochmal eine Frage zu clamd.
Es kommt immer wieder vor das er 100% CPU Auslastung produziert.
In Google habe ich erfahren das dass Problem bekannt sei aber niergends wie man es behebt.
Wisst ihr da was, weil es kann ja nicht sein das der soviel braucht.

MFG ReduX
 
Back
Top