[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: exim4 und TLS



Hallo, hat leider ein Weilchen gedauert:

Am 17.04.2016 um 15:24 schrieb Marc Haber:
> Für die Übertragung von Mails zwischen MTAs dient Port 25, für die
> authentifizierte Einlieferung von Mails vom MUA beim MTA nimmt man
> Port 587. Wichtig ist, dass man auf Port 587 keine Mail ohne
> Authentifizierung annimmt.

So ich habe die Zeile
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 von tls_on_connect_ports = 465 
 in tls_on_connect_ports = 587 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
geändert und 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 von /etc/exim4/conf.d/main/03_exim4-config_tlsoptions
 nach /etc/exim4/exim4.conf.localmacros 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
verschoben.

Nun liefert
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~# exim -bP tls_on_connect_ports
tls_on_connect_ports = 587
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

und

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~# swaks -tlsc -s myhost.dyndns.org -q EHLO -p 587
=== Trying myhost.dyndns.org:587...
=== Connected to myhost.dyndns.org.
=== TLS started with cipher TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256
=== TLS no local certificate set
=== TLS peer DN="/C=DE/ST=NDS/CN=myhost.dyndns.org"
<~  220 ct-Server.myhost.dyndns.org ESMTP Exim 4.84_2 Sun, 17 Apr 2016 23:20:14 +0200
 ~> EHLO ct-Server.myhost.dyndns.org
<~  250-ct-Server.myhost.dyndns.org Hello p54820884.dip0.t-ipconnect.de [84.130.x.xx2]
<~  250-SIZE 52428800
<~  250-8BITMIME
<~  250-PIPELINING
<~  250-AUTH PLAIN
<~  250 HELP
 ~> QUIT
<~  221 ct-Server.myhost.dyndns.org closing connection
=== Connection closed with remote host.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~# swaks -s myhost.dyndns.org -q EHLO -p 587
=== Trying myhost.dyndns.org:587...
=== Connected to myhost.dyndns.org.
<** Timeout (30 secs) waiting for server response
 -> QUIT
*** Remote host closed connection unexpectedly.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~# swaks -tlso -s myhost.dyndns.org -q EHLO -p 25
=== Trying myhost.dyndns.org:25...
=== Connected to myhost.dyndns.org.
<** Timeout (30 secs) waiting for server response
 -> QUIT
<** Timeout (30 secs) waiting for server response
=== Connection closed with remote host.
================================================================================
#~# swaks -tlso -s 127.0.0.1 -q EHLO -p 25
=== Trying 127.0.0.1:25...
=== Connected to 127.0.0.1.
<-  220 ct-Server.myhost.dyndns.org ESMTP Exim 4.84_2 Mon, 18 Apr 2016 16:29:47 +0200
 -> EHLO ct-Server.myhost.dyndns.org
<-  250-ct-Server.myhost.dyndns.org Hello localhost [127.0.0.1]
<-  250-SIZE 52428800
<-  250-8BITMIME
<-  250-PIPELINING
<-  250-STARTTLS
<-  250 HELP
 -> STARTTLS
<-  220 TLS go ahead
=== TLS started with cipher TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256
=== TLS no local certificate set
=== TLS peer DN="/C=DE/ST=NDS/CN=myhost.dyndns.org"
 ~> EHLO ct-Server.myhost.dyndns.org
<~  250-ct-Server.myhost.dyndns.org Hello localhost [127.0.0.1]
<~  250-SIZE 52428800
<~  250-8BITMIME
<~  250-PIPELINING
<~  250-AUTH PLAIN
<~  250 HELP
 ~> QUIT
<~  221 ct-Server.myhost.dyndns.org closing connection
=== Connection closed with remote host.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~# swaks -s 127.0.0.1 -q EHLO -p 25
=== Trying 127.0.0.1:25...
=== Connected to 127.0.0.1.
<-  220 ct-Server.myhost.dyndns.org ESMTP Exim 4.84_2 Mon, 18 Apr 2016 16:37:22 +0200
 -> EHLO ct-Server.myhost.dyndns.org
<-  250-ct-Server.myhost.dyndns.org Hello localhost [127.0.0.1]
<-  250-SIZE 52428800
<-  250-8BITMIME
<-  250-PIPELINING
<-  250-STARTTLS
<-  250 HELP
 -> QUIT
<-  221 ct-Server.myhost.dyndns.org closing connection
=== Connection closed with remote host.
================================================================================
root@16:46:03#/etc/dovecot# swaks -tlsc -s 192.168.xxx.xx3 -q EHLO -p 587
=== Trying 192.168.xxx.xx3:587...
=== Connected to 192.168.xxx.xx3.
=== TLS started with cipher TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256
=== TLS no local certificate set
=== TLS peer DN="/C=DE/ST=NDS/CN=myhost.dyndns.org"
<~  220 ct-Server.myhost.dyndns.org ESMTP Exim 4.84_2 Mon, 18 Apr 2016 16:47:03 +0200
 ~> EHLO ct-Server.myhost.dyndns.org
<~  250-ct-Server.myhost.dyndns.org Hello ct-Server.myhost.dyndns.org [192.168.xxx.xx3]
<~  250-SIZE 52428800
<~  250-8BITMIME
<~  250-PIPELINING
<~  250-AUTH PLAIN
<~  250 HELP
 ~> QUIT
<~  221 ct-Server.myhost.dyndns.org closing connection
=== Connection closed with remote host.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~# swaks -tlso -s 192.168.xxx.xx3 -q EHLO -p 587
=== Trying 192.168.xxx.xx3:587...
=== Connected to 192.168.xxx.xx3.
<** Timeout (30 secs) waiting for server response
 -> QUIT
*** Remote host closed connection unexpectedly.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~# swaks -tlsc -s 192.168.xxx.xx3 -q EHLO -p 25
=== Trying 192.168.xxx.xx3:25...
*** Error connecting to 192.168.xxx.xx3:25:
***     IO::Socket::INET6: connect: Verbindungsaufbau abgelehnt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

> Du hast zusammengefasst eine Handvoll Denkfehler und eine ganze Menge
> fehlendem Grundwissen kombiniert und bist dabei erstaunlich weit
> gekommen. Nur leider sehr früh falsch abgebogen.

Wenn ich das richtig verstehe ist auf dem Port 587 nur noch verschlüsselte
Kommunikation möglich! Auf dem Host selber, nicht aber im Heimnetzwerk ist
unverschlüsselte Kommunikation möglich.

Und hoffentlich lauschen alle am richtigen Port?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#~# lsof -nPi :25,110,143,465,587,993
COMMAND     PID        USER   FD   TYPE   DEVICE SIZE/OFF NODE NAME
systemd       1        root   48u  IPv4      855      0t0  TCP *:143 (LISTEN)
systemd       1        root   49u  IPv6      856      0t0  TCP *:143 (LISTEN)
systemd       1        root   50u  IPv4      857      0t0  TCP *:993 (LISTEN)
systemd       1        root   51u  IPv6      858      0t0  TCP *:993 (LISTEN)
imap-logi 13101    dovenull   18u  IPv4 13984458      0t0  TCP 192.168.xxx.xx3:143->192.168.xxx.xx2:59024 (ESTABLISHED)
exim4     17888 Debian-exim    4u  IPv4 13041046      0t0  TCP 127.0.0.1:25 (LISTEN)
exim4     17888 Debian-exim    5u  IPv6 13041047      0t0  TCP [::1]:25 (LISTEN)
exim4     17888 Debian-exim    6u  IPv4 13041048      0t0  TCP *:587 (LISTEN)
dovecot   27529        root    3u  IPv4      855      0t0  TCP *:143 (LISTEN)
dovecot   27529        root    4u  IPv6      856      0t0  TCP *:143 (LISTEN)
dovecot   27529        root    5u  IPv4      857      0t0  TCP *:993 (LISTEN)
dovecot   27529        root    6u  IPv6      858      0t0  TCP *:993 (LISTEN)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- 
Gruß aus der Stadt der CeBIT
Jochen


Reply to: