Postfix, DNSSEC und DANE unter Alpine Linux

SchwarzeBeere

0
Mitarbeiter
Hi,

Ich bin aktuell dran eine kleine einfache Postfix-Instanz aufzusetzen, um damit E-Mails an andere Adressen zu forwarden. Installation und Konfiguration werden automatisch durchgeführt in Docker unter Alpine Linux. So weit, so gut.

Nun sollte die Installation ja sicherheitstechnisch auch die grundlegenden Mechanismen unterstützen. Neben DKIM, DMARC und SPF sollen auch die Postfix-eigenen Mechanismen genutzt werden. Auf Serverseite (smtpd) funktioniert das auch (STARTTLS mit TLS only und „Strong“). Auf Clientseite (smtp) funktioniert DANE jedoch nicht. Folgende Konfiguration ...

Code:
[COLOR=#151515][FONT=Arial]smtp_tls_security_level = dane-only[/FONT][/COLOR]
[COLOR=#151515][FONT=Arial]smtp_dns_support_level = dnssec[/FONT][/COLOR]

.. erzeugt die folgende Fehlermeldung ...

Code:
no TLSA records found

bei einer Mail an einen Empfänger bei posteo.de. Posteo ist bekanntermaßen jedoch mit DANE gesichert, was sich auch leicht mit dig oder drill nachprüfen lässt. Letztlich wird die E-Mail nicht weitergeleitet.

Fürs Debugging habe ich dann posttls-finger herangezogen. Sidenote: Ich musste mir das postfix-Paket neu bauen, da Alpine das Tool selbst nicht mitliefert. In diesem Zuge habe ich auch gleich einen lokalen Unbound-Resolver mitinstalliert, der mir die nötige DNSSEC Validierung direkt auf der Maschine macht (gem. den Anforderungen aus Postfix TLS Support, DANE TLS authentication). Allerdings bringt mich das nicht wirklich weiter. Im Folgenden der Output (am Beispiel sys4.de, ebenfalls DANE-fähig) von posttls-finger:

Code:
[COLOR=#000000][FONT=UICTFontTextStyleTallBody]posttls-finger -vv -L verbose -a ipv4 -c -l dane-only -f -o smtp_dns_support_level=dnssec [URL="http://sys4.de/"]sys4.de[/URL]
[/FONT][/COLOR][...]
[COLOR=#000000][FONT=UICTFontTextStyleTallBody]posttls-finger: parse_destination: [URL="http://sys4.de/"]sys4.de[/URL] smtp[/FONT][/COLOR]
[COLOR=#000000][FONT=UICTFontTextStyleTallBody]posttls-finger: dns_query: [URL="http://sys4.de/"]sys4.de[/URL] (MX): OK[/FONT][/COLOR]
[COLOR=#000000][FONT=UICTFontTextStyleTallBody]posttls-finger: dns_query: reply len=46 ancount=1 nscount=0[/FONT][/COLOR]
[COLOR=#000000][FONT=UICTFontTextStyleTallBody]posttls-finger: dns_get_answer: type MX for [URL="http://sys4.de/"]sys4.de[/URL][/FONT][/COLOR]
[COLOR=#000000][FONT=UICTFontTextStyleTallBody]posttls-finger: addr_one: host [URL="http://mail.sys4.de/"]mail.sys4.de[/URL][/FONT][/COLOR]
[COLOR=#000000][FONT=UICTFontTextStyleTallBody]posttls-finger: lookup [URL="http://mail.sys4.de/"]mail.sys4.de[/URL] type A flags RES_USE_DNSSEC[/FONT][/COLOR]
[COLOR=#000000][FONT=UICTFontTextStyleTallBody]posttls-finger: dns_query: [URL="http://mail.sys4.de/"]mail.sys4.de[/URL] (A): OK[/FONT][/COLOR]
[COLOR=#000000][FONT=UICTFontTextStyleTallBody]posttls-finger: dns_query: reply len=46 ancount=1 nscount=0[/FONT][/COLOR]
[COLOR=#000000][FONT=UICTFontTextStyleTallBody]posttls-finger: dns_get_answer: type A for [URL="http://mail.sys4.de/"]mail.sys4.de[/URL][/FONT][/COLOR]
[COLOR=#000000][FONT=UICTFontTextStyleTallBody]posttls-finger: lookup [URL="http://mail.sys4.de/"]mail.sys4.de[/URL] type AAAA flags RES_USE_DNSSEC[/FONT][/COLOR]
[COLOR=#000000][FONT=UICTFontTextStyleTallBody]posttls-finger: dns_query: [URL="http://mail.sys4.de/"]mail.sys4.de[/URL] (AAAA): OK[/FONT][/COLOR]
[COLOR=#000000][FONT=UICTFontTextStyleTallBody]posttls-finger: dns_query: reply len=58 ancount=1 nscount=0[/FONT][/COLOR]
[COLOR=#000000][FONT=UICTFontTextStyleTallBody]posttls-finger: dns_get_answer: type AAAA for [URL="http://mail.sys4.de/"]mail.sys4.de[/URL][/FONT][/COLOR]
[COLOR=#000000][FONT=UICTFontTextStyleTallBody]posttls-finger: dns_query: _25._[URL="http://tcp.mail.sys4.de/"]tcp.mail.sys4.de[/URL] (TLSA): OK[/FONT][/COLOR]
[COLOR=#000000][FONT=UICTFontTextStyleTallBody]posttls-finger: dns_query: reply len=86 ancount=1 nscount=0[/FONT][/COLOR]
[COLOR=#000000][FONT=UICTFontTextStyleTallBody]posttls-finger: dns_get_answer: type TLSA for _25._[URL="http://tcp.mail.sys4.de/"]tcp.mail.sys4.de[/URL][/FONT][/COLOR]
[COLOR=#000000][FONT=UICTFontTextStyleTallBody]posttls-finger: ctable_locate: install entry key _25._[URL="http://tcp.mail.sys4.de/"]tcp.mail.sys4.de[/URL][/FONT][/COLOR]
[COLOR=#000000][FONT=UICTFontTextStyleTallBody]posttls-finger: no TLSA records found, resorting to "secure"[/FONT][/COLOR]
[COLOR=#000000][FONT=UICTFontTextStyleTallBody][...][/FONT][/COLOR]

TLSA Records werden also gefunden, trotz anderslautender Fehlermeldung. Ok. Whatever. Mein Schluss wäre, dass DNSSEC nicht funktioniert. Sowohl dig, als auch drill zeigen das ad-Bit jedoch an, sowohl beim standard DNS Server, als auch beim lokalen unbound Service. Alpine Linux verwendet Musl als Resolver Library. Auf den ersten Blick scheint Musl das auch zu supporten.

Hat jemand eine Idee, an was es liegen könnte? Als nächstes würde ich mal mit tcpdump die Abfragen untersuchen, aber dieses gefrickel würde ich mir natürlich gerne sparen...
 
Zurück
Oben