Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung Nächste ÜberarbeitungBeide Seiten der Revision | ||
centos:mail_c7:dovecot_2 [10.08.2014 12:06. ] – django | centos:mail_c7:dovecot_2 [10.08.2014 12:37. ] – [SASL-Anmeldetest] django | ||
---|---|---|---|
Zeile 454: | Zeile 454: | ||
===== Dovecot ===== | ===== Dovecot ===== | ||
- | ==== Konfiguration | + | ==== Konfiguration ==== |
Die Konfiguration auf Seiten des Dovecot-Servers ist denkbar einfach, ist die grundlegende Konfiguration ja schon in der Datei // | Die Konfiguration auf Seiten des Dovecot-Servers ist denkbar einfach, ist die grundlegende Konfiguration ja schon in der Datei // | ||
# vim / | # vim / | ||
Zeile 543: | Zeile 543: | ||
0 0 ACCEPT | 0 0 ACCEPT | ||
</ | </ | ||
- | ===== Postfix (SASL) ===== | + | ===== Postfix |
- | FIXME | + | Auch der Konfigurationsaufwand auf Seiten von Postfix hält sich in überschaubaren Grenzen. |
+ | ==== Konfiguration ==== | ||
+ | Zum Aktivieren der SASL-Autentifikation gegen unseren Dovecot-Server tragen wir die folgenden Zeilen in der Postfix-konfigurationsdatei // | ||
+ | # vim / | ||
+ | <code bash> | ||
+ | |||
+ | # Django : 2012-10-09 | ||
+ | # SMTP-Auth | ||
+ | # Enable SASL authentication in the Postfix SMTP server. By default, the Postfix SMTP server | ||
+ | # does not use authentication. | ||
+ | smtpd_sasl_auth_enable | ||
+ | # The SASL plug-in type that the Postfix SMTP server should use for authentication. The available | ||
+ | # types are and dovecot. | ||
+ | smtpd_sasl_type | ||
+ | # Implementation-specific information that the Postfix SMTP server passes through to the SASL | ||
+ | # plug-in implementation that is selected with smtpd_sasl_type. Typically this specifies the | ||
+ | # name of a configuration file or rendezvous point. | ||
+ | smtpd_sasl_path | ||
+ | # Postfix SMTP server SASL security options; as of Postfix 2.3 the list of available features | ||
+ | # depends on the SASL server implementation that is selected with smtpd_sasl_type. The following | ||
+ | # security features are defined for the cyrus server SASL implementation: | ||
+ | # Restrict what authentication mechanisms the Postfix SMTP server will offer to the client. | ||
+ | # The list of available authentication mechanisms is system dependent. Specify zero or more of | ||
+ | # the following: | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # Only allow methods that support forward secrecy (Dovecot only). | ||
+ | # | ||
+ | # Only allow methods that provide mutual authentication | ||
+ | # (not available with Cyrus SASL version 1). | ||
+ | # | ||
+ | # By default, the Postfix SMTP server accepts plaintext passwords but not anonymous logins. | ||
+ | # | ||
+ | # Warning: it appears that clients try authentication methods in the order as advertised by the | ||
+ | # server (e.g., PLAIN ANONYMOUS CRAM-MD5) which means that if you disable plaintext passwords, | ||
+ | # clients will log in anonymously, | ||
+ | # disable plaintext logins, disable anonymous logins too. Postfix treats anonymous login as no | ||
+ | # authentication. | ||
+ | smtpd_sasl_security_options | ||
+ | # The name of the Postfix SMTP server' | ||
+ | # By default, the local authentication realm name is the null string. | ||
+ | smtpd_sasl_local_domain | ||
+ | # The SASL authentication security options that the Postfix SMTP server uses for TLS encrypted | ||
+ | # SMTP sessions. | ||
+ | smtpd_sasl_tls_security_options = $smtpd_sasl_security_options | ||
+ | # Enable inter-operability with remote SMTP clients that implement an obsolete version of the | ||
+ | # AUTH command (RFC 4954). Examples of such clients are MicroSoft Outlook Express version 4 | ||
+ | # and MicroSoft Exchange version 5.0. | ||
+ | broken_sasl_auth_clients = yes | ||
+ | |||
+ | |||
+ | ... | ||
+ | </ | ||
+ | |||
+ | Ein Restart unseres Postfix-Servers aktiviert unsere Konfigurationsanpassungen. | ||
+ | # systemctl restart postfix | ||
+ | |||
===== SASL-Anmeldetest ===== | ===== SASL-Anmeldetest ===== | ||
- | FIXME | + | Melden wir uns nun via **telnet** auf Port **25** bei unserem Postfix-Server an werden uns nach Eingabe des **EHLO** die Authentifizierungsmöglichkeiten (gegen unseren Dovecot-SASL-Port 3569) angezeigt. |
+ | |||
+ | Bei Test vsind die Eingaben am testenden Client in der Farbe < | ||
+ | |||
+ | Wir bauen also eine Verbindung zu unserem Postfix-Server zum **SMTP** **25** auf und setzen dann den Befehl **EHLO** ab, damit uns der SMTP-server seine Authentifizierungsoptionen anzeigt. | ||
+ | |||
+ | < | ||
+ | <font style=" | ||
+ | <font style=" | ||
+ | Connected to 10.0.0.80. | ||
+ | Escape character is ' | ||
+ | <font style=" | ||
+ | <font style=" | ||
+ | <font style=" | ||
+ | 250-PIPELINING | ||
+ | 250-SIZE 52428800 | ||
+ | 250-ETRN | ||
+ | 250-STARTTLS | ||
+ | 250-AUTH PLAIN LOGIN DIGEST-MD5 CRAM-MD5 | ||
+ | 250-AUTH=PLAIN LOGIN DIGEST-MD5 CRAM-MD5 | ||
+ | 250-ENHANCEDSTATUSCODES | ||
+ | 250 8BITMIME</ | ||
+ | <font style=" | ||
+ | <font style=" | ||
+ | <font style=" | ||
+ | </ | ||
+ | |||
+ | Melden wir uns nun über unseren Mailclient an, typischerweise passiert das jeweils vor dem Versand von ausgehenden Nachrichten, | ||
+ | # less / | ||
+ | |||
+ | Aug 10 10:56:29 vml000080 postfix/ | ||
+ | |||
+ | Auf seiten unseres Dovecot-Servers passiert natürlich wesentlich mehr, da ja dort die Authentifizierungsanfrage des Postfix-Servers angenommen und bearbeitet wird. Im Detail bedeutet dies, dass der Dovecot-Server eine **passdb-Anfrage** gegen unsere MySQL-Datenbank macht und das Ergebnis **OK** an den postfix-Frontend-Server zurückmeldet. | ||
+ | # less / | ||
+ | |||
+ | <code bash>Aug 10 10:56:29 vml000170 dovecot: auth: Debug: auth client connected (pid=0) | ||
+ | Aug 10 10:56:29 vml000170 dovecot: auth: Debug: client in: AUTH# | ||
+ | Aug 10 10:56:29 vml000170 dovecot: auth: Debug: client passdb out: CONT# | ||
+ | Aug 10 10:56:29 vml000170 dovecot: auth: Debug: client in: CONT# | ||
+ | Aug 10 10:56:29 vml000170 dovecot: auth: Debug: client passdb out: CONT# | ||
+ | Aug 10 10:56:29 vml000170 dovecot: auth: Debug: client in: CONT# | ||
+ | Aug 10 10:56:29 vml000170 dovecot: auth: Debug: sql(michael@nausch.org, | ||
+ | Aug 10 10:56:29 vml000170 dovecot: auth-worker(6830): | ||
+ | Aug 10 10:56:29 vml000170 dovecot: auth-worker(6830): | ||
+ | Aug 10 10:56:29 vml000170 dovecot: auth-worker(6830): | ||
+ | Aug 10 10:56:29 vml000170 dovecot: auth-worker(6830): | ||
+ | Aug 10 10:56:29 vml000170 dovecot: auth: Debug: client passdb out: OK# | ||
+ | </ | ||
+ | |||
+ | |||
- | Aug 10 10:56:30 vml000080 postfix/ | ||