[Dovecot-de] Dovecot SASL

Ferdinand Gruber fer.grub at aon.at
Mi Dez 18 23:48:44 CET 2013


Am 18.12.2013 21:46, schrieb Markus Hohlmeier:
>> Die von mir verwendeten, nicht funktionierenden SMTP Server 
>> Einstellung in Thunderbird:
>>
>>     Port: 25
>>     Verbindungssicherheit: SSL/TLS
>>
>
> Bitte ohne SSL versuchen. Das kann so nicht gehen da du in Postfix 
> nichts in dieser Hinsicht konfiguriert hast.
>

Ohne SSL funktioniert es ja, sehe ich gerade!

Wahrscheinlich habe ich so viel herumgeändert, dass ich das gar nicht 
mehr bemerkt habe. =-O
Ich hatte gedacht, dass das Zertifikat, das ich für Dovecot erstellt 
habe, hier auch verwendet wird.

Der Server läuft übrigens unter Suse 12.3

Nun, da es ohne Verschlüsselung geht, sollte es aber auch mit 
Verschlüsselung gelingen, dachte ich.
Nun habe ich nach einer Anleitung, ein Zertifikat für Postfix mit 
folgenden Befehlen erstellt:

    mkdir /etc/postfix/ssl
    cd /etc/postfix/ssl/
    openssl genrsa -des3 -rand /etc/hosts -out smtpd.key 1024

    chmod 600 smtpd.key
    openssl req -new -key smtpd.key -out smtpd.csr

    openssl x509 -req -days 3650 -in smtpd.csr -signkey smtpd.key -out
    smtpd.crt

    openssl rsa -in smtpd.key -out smtpd.key.unencrypted

    mv -f smtpd.key.unencrypted smtpd.key
    openssl req -new -x509 -extensions v3_ca -keyout cakey.pem -out
    cacert.pem -days 3650

Dann habe ich nach der gleichen Anleitung die Postfix-Konfiguration 
ergänzt bzw. geändert:

    postconf -e "mydomain = xxxxx.xx"
    postconf -e "myhostname = xxx.xxxxx"
    postconf -e "mynetworks = 127.0.0.0/8"
    postconf -e "smtpd_sasl_local_domain ="
    postconf -e "smtpd_sasl_auth_enable = yes"
    postconf -e "smtpd_sasl_security_options = noanonymous"
    postconf -e "broken_sasl_auth_clients = yes"
    postconf -e "smtpd_recipient_restrictions =
    permit_sasl_authenticated,permit_mynetworks,check_relay_domains"
    postconf -e "inet_interfaces = all"
    postconf -e "alias_maps = hash:/etc/aliases"
    postconf -e "smtpd_tls_auth_only = no"
    postconf -e "smtp_use_tls = yes"
    postconf -e "smtpd_use_tls = yes"
    postconf -e "smtp_tls_note_starttls_offer = yes"
    postconf -e "smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key"
    postconf -e "smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt"
    postconf -e "smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem"
    postconf -e "smtpd_tls_loglevel = 1"
    postconf -e "smtpd_tls_received_header = yes"
    postconf -e "smtpd_tls_session_cache_timeout = 3600s"
    postconf -e "tls_random_source = dev:/dev/urandom"

Die gesamte Konfiguration schaut jetzt so aus:

postconf -n

alias_maps = hash:/etc/aliases
biff = no
broken_sasl_auth_clients = yes
canonical_maps = hash:/etc/postfix/canonical
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter =
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd 
$daemon_directory/$process_name $process_id & sleep 5
defer_transports =
delay_warning_time = 1h
disable_dns_lookups = no
disable_mime_output_conversion = no
html_directory = /usr/share/doc/packages/postfix-doc/html
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_command =
mailbox_size_limit = 0
mailbox_transport =
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
masquerade_classes = envelope_sender, header_sender, header_recipient
masquerade_domains =
masquerade_exceptions = root
message_size_limit = 0
message_strip_characters = \0
mydestination = $myhostname, localhost.$mydomain
mydomain = yyyy.yy
myhostname = xxx.xxxxx
mynetworks = 127.0.0.0/8
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES
relay_domains = $mydestination, hash:/etc/postfix/relay
relayhost =
relocated_maps = hash:/etc/postfix/relocated
sample_directory = /usr/share/doc/packages/postfix-doc/samples
sender_canonical_maps = hash:/etc/postfix/sender_canonical
sendmail_path = /usr/sbin/sendmail
setgid_group = maildrop
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_client_restrictions =
smtpd_helo_required = no
smtpd_helo_restrictions =
smtpd_recipient_restrictions = 
permit_sasl_authenticated,permit_mynetworks,check_relay_domains
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = private/auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
smtpd_sender_restrictions = hash:/etc/postfix/access
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
strict_8bitmime = no
strict_rfc821_envelopes = no
tls_random_source = dev:/dev/urandom
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_domains = hash:/etc/postfix/virtual
virtual_alias_maps = hash:/etc/postfix/virtual

Leider funktioniert es jetzt trotzdem nicht, mit Thunderbird eine 
verschlüsselte SMTP Verbindung zum Server zu verwenden..
Ich nehme an, der Durcheinander in Postfix ist jetzt perfekt.
Die Anleitung, nach der ich im Prinzip vorgegangen bin, ist hier zu 
finden und ist wahrscheinlich etwas veraltet:
http://www.howtoforge.de/anleitung/der-perfekte-server-opensuse-103-32-bit/7/

Bitte um Hilfe.
Ferdinand

-- 
Ferdinand Gruber
f.gruber at eduhi.at
00 43 7249 48737
00 43 650 542 88 33
Grieskirchner Straße 22
4701 Bad Schallerbach
LPIC-1 zertifiziert <http://www.lpi.org/eng/certification/the_lpic_program>
-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: <https://listen.jpberlin.de/pipermail/dovecot/attachments/20131218/5cb0bde7/attachment.html>


Mehr Informationen über die Mailingliste Dovecot