Dovecot Problem mit TLS

thewilli

New Member
Postfix Problem mit TLS

Hi,

ich verwende Dovecot und Postfix unter Debian Etch.
Dovecot funktioniert, aber das Senden mit TLS nicht. Outlook meldet "Es konnte keine verschlüsselte Verbindung mit Ihrem Postausgangsserver hergestellt werden". In der Mail.log steht

Code:
Oct  5 22:44:19 hostname postfix/smtpd[2822]: lost connection after STARTTLS from p57A96DC5.dip.t-dialin.net[87.169.109.197]

die Konfiguration (postconf -n)

Code:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
mydestination = mail.my-domain.de, mail, localhost.localdomain, localhost
myhostname = mail
mynetworks = 127.0.0.0/8
myorigin = /etc/mailname
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_CAfile = /etc/lighttpd/webs/mail.my-domain.de.ca
smtpd_tls_cert_file = /etc/lighttpd/webs/mail.my-domain.de.crt
smtpd_tls_key_file = /etc/lighttpd/webs/mail.my-domain.de.key
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf
virtual_gid_maps = static:5000
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_transport = dovecot
virtual_uid_maps = static:5000

Habt ihr eine Idee? Danke im Voraus!
 
Last edited by a moderator:
Aus dem [thread=28143]anderen Thread [/thread]weiss ich, dass du das Cert auch für eine SSL-Webseite verwendest.
Ist das Cert gültig? Kann man die Webseite ohne Warnung anbrowsen?

Hast du bei deiner Konfiguration eigentlich ein bestimmtes Tutorial verwendet?
Ich vermisse ein paar Parameter.

Eine typische Konfig sollte ungefähr so aussehen:

http://postfix.state-of-mind.de/patrick.koetter/smtpauth/postfix_tls_support.html said:
## TLS
# Transport Layer Security
# TLS-Patch by Lutz Jänicke
#
smtpd_use_tls = yes
#smtpd_tls_auth_only = yes
smtpd_tls_key_file = /etc/postfix/newreq.pem
smtpd_tls_cert_file = /etc/postfix/newcert.pem
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_loglevel = 3
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

Bei diesen Zeilen aus deiner Konfig frage ich mich, was denn in ${queue_directory} steht?
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache

Den Loglevel könntest du mal erhöhen, evtl. sieht man dann mehr.
 
habe ich gemacht.. und siehe da: Mein Problem war, dass Postfix nicht damit klar gekommen ist, dass der Private Key verschlüsselt war. Nun geht es :)

Dafür habe ich ein anderes Problem: POP3, POP3s und IMAP mit Dovecot funktionieren, IMAPS allerdings nicht.

Ich verbinde über Outlook 2007, Port 143 (der ist identsich mit IMAP, oder?). In der Mail.log erscheint der Eintrag

Code:
Oct  6 09:45:13 hostname dovecot: imap-login: Disconnected: Inactivity: rip=(meine IP), lip=(Server IP), TLS handshake

Meine Dovecot.conf
Code:
disable_plaintext_auth = no
log_timestamp = "%Y-%m-%d %H:%M:%S "
ssl_disable = no
ssl_cert_file = /etc/lighttpd/webs/mail.my-domain.de/mail.my-domain.de.pem
ssl_key_file =  /etc/lighttpd/webs/mail.my-domain.de/mail.my-domain.de.pem
ssl_ca_file =  /etc/lighttpd/webs/mail.my-domain.de/mail.my-domain.de.ca
mail_location = maildir:/home/vmail/%d/%n
mail_privileged_group = mail

protocol imap {
imap_client_workarounds = outlook-idle
}
  
protocol pop3 {
pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
}

protocol lda {
  log_path = /home/vmail/dovecot-deliver.log
    auth_socket_path = /var/run/dovecot/auth-master
    postmaster_address = [email protected]
    mail_plugins = cmusieve
    global_script_path = /home/vmail/globalsieverc
}
auth default {
  mechanisms = plain login
  passdb pam {
  }
  passdb sql {
		args = /etc/dovecot/dovecot-sql.conf
	}
  userdb passwd {
  }
  userdb static {
		args = uid=5000 gid=5000 home=/home/vmail/%d/%n allow_all_users=yes
	}
  user = root
  socket listen {
  	master {
		path = /var/run/dovecot/auth-master
	        mode = 0600
        	user = vmail
    }
	client {
	path = /var/spool/postfix/private/auth
	mode = 0660
	user = postfix
	group = postfix
    }
}

}
plugin {
}

Woran kann das liegen?

Danke für eure Hilfe!
 
Last edited by a moderator:
ist afaik SSL - hab es aber auch mal versucht, hat leider nichts gebracht :(

Habe testweise mal Thunderbird ausprobiert - selbes Spiel:

Code:
hostname dovecot: imap-login: Disconnected: rip=(ich), lip=(server), TLS handshake
 
hmm, ich habe gerade mal ausprobiert SSL statt TLS zu benuzen, und das funktioniert in Outlook und Thunderbird :confused:

Woran kann es liegen, dass SSL aber TLS nicht funktioniert?
 
Back
Top