Page 1 of 1

Exim4 SMTP/TLS (starttls hängt)

Posted: 2006-11-26 11:32
by masterevil
Hiho, irgendwie will mein Exim4 SMTP nicht via TLS :(

Laut Telnet ist STARTTLS verfügbar, wenn ich es aufrufe erfolgt allerdings keine Reaktion, siehe:

Code: Select all

servername:/etc/exim4# exim4 -bh xx.xx.xx.xxx

**** SMTP testing session as if from host xx.xx.xx.xxx
**** but without any ident (RFC 1413) callback.
**** This is not for real!

>>> host in hosts_connection_nolog? no (option unset)
>>> host in host_lookup? yes (matched "*")
>>> looking up host name for xx.xx.xx.xxx
>>> IP address lookup yielded host.domain.tld
>>> gethostbyname2 looked up these IP addresses:
>>>   name=host.domain.tld address=xx.xx.xx.xxx
>>> checking addresses for host.domain.tld
>>>   xx.xx.xx.xxx OK
>>> host in host_reject_connection? no (option unset)
>>> host in sender_unqualified_hosts? no (option unset)
>>> host in recipient_unqualified_hosts? no (option unset)
>>> host in helo_verify_hosts? no (option unset)
>>> host in helo_try_verify_hosts? no (option unset)
>>> host in helo_accept_junk_hosts? no (option unset)
220 host.domain.tld ESMTP Exim 4.50 Sun, 26 Nov 2006 11:19:18 +0100
ehlo host.domain.tld
>>> using ACL "acl_check_helo"
>>> processing "accept"
>>> check hosts = :
>>> host in ":"? no (end of list)
>>> accept: condition test failed
>>> processing "accept"
>>> check hosts = +relay_from_hosts
>>> gethostbyname2 looked up these IP addresses:
>>>   name=localhost address=127.0.0.1
>>> host in "localhost : 192.168.0.0/24 : xx.xx.xx.xxx"? yes (matched "xx.xx.xx.xxx")
>>> host in "+relay_from_hosts"? yes (matched "+relay_from_hosts")
>>> accept: condition test succeeded
>>> host in pipelining_advertise_hosts? yes (matched "*")
>>> host in auth_advertise_hosts? yes (matched "*")
>>> host in tls_advertise_hosts? yes (matched "*")
250-host.domain.tld Hello host.domain.tld [xx.xx.xx.xxx]
250-SIZE 52428800
250-PIPELINING
250-AUTH PLAIN LOGIN CRAM-MD5
250-STARTTLS
250 HELP
HELP
>>> host in smtp_accept_max_nonmail_hosts? yes (matched "*")
214-Commands supported:
214 AUTH STARTTLS HELO EHLO MAIL RCPT DATA NOOP QUIT RSET HELP
STARTTLS

( ab hier bleibt er dann stehen )
Wenn ich den Prozess jetzt beende bekomme ich folgende Meldung:

Code: Select all

LOG: SMTP connection from host.domain.tld [xx.xx.xx.xxx] closed after SIGTERM
421 host.domain.tld: Service not available - closing connection
In den Logs findet sich leider kein Eintrag, in der exim4.conf is allerdings folgendes aktiviert:
log_selector = +subject +tls_cipher +tls_peerdn

Ich nutze Exim4 unter Debian 3.1 mit einer großen Config-Datei.
Vieleicht kann mir ja einer weiterhelfen :(

MFG

Re: Exim4 SMTP/TLS (starttls hängt)

Posted: 2006-11-26 12:29
by dodolin
Vermutlich hat dein Kernel nicht mehr genug Entropie. Das Problem ist altbekannt und findet sich in den Mailinglisten-Archiven - eventuell auch den FAQs von Debian-Exim und/oder Exim. HTH.

Re: Exim4 SMTP/TLS (starttls hängt)

Posted: 2006-11-26 14:30
by masterevil
Ja, thx lag tatsächlich daran.
Aber ohne "Entropy" zu kennen findet man nicht so besonders viel.

Um das ganze also zu umgehen einfach alle 10 Sekunden das Script hier ausführen:

Code: Select all

entropy=`cat /proc/sys/kernel/random/entropy_avail`

if [ $entropy -lt 1000 ]; then
  find /var/mail -type f -print0 | rl -0 -c 5000 | xargs -0 cat > /dev/null
fi