Hi everybody,
I have a Postfix smarthost and a Postfix client who shall send mails
through that smathost using a TLS-certificate.
I don't get the client to send the certificate to the smarhost though.
The error is:
Anonymous TLS connection established from client.example.com [...]
smarthost: http://paste.debian.net/770746/
client: http://paste.debian.net/770757/
When using openssl s_client to test the authentication I get:
Trusted TLS connection established from client.example.com [...]
Like this I know that my client certifikate and the verfication on the
smarthost ist generally working.
http://paste.debian.net/770599/
When using openssl I can see "read certificate verify" in the traffic.
When sniffing the Trafic I can also verify that with openssl the client
is issuing "Certificate Verify"
http://paste.debian.net/770668/
But when the postfix client authenticates it does not send the certificate.
http://paste.debian.net/770667/
The openssl command is:
sudo openssl s_client -starttls smtp -cert
/etc/ssl/certs/client_example_com.crt -key
/etc/ssl/private/client_example_com.key -connect 192.168.59.3:587
What am I missing?
Something that makes me wonder as well ist, that even the file
/etc/postfix/relay_clientcerts is epmty I get a trusted connection with
the openssl command.
Warm regards,
Tom
= Relevant logs =
== Postfinger smarthost ==
--System Parameters--
mail_version = 2.9.6
hostname = smarthost
uname = Linux smarthost 3.2.0-4-amd64 #1 SMP Debian 3.2.73-2+deb7u2
x86_64 GNU/Linux
--Packaging information--
looks like this postfix comes from deb package: postfix-2.9.6-2
--main.cf non-default parameters--
alias_maps = hash:/etc/aliases
always_bcc = [email protected]
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
canonical_maps = regexp:/etc/postfix/canonical
html_directory = /usr/share/doc/postfix/html
mailbox_size_limit = 0
maildrop_destination_recipient_limit = 1
message_size_limit = 52428800
mydestination = smarthost.intern.domainaaaa.de, smarthost, localhost
myhostname = smarthost.domainaaaa.de
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128, 192.168.3.0/25
myorigin = domaincccc.de
recipient_delimiter = +
relay_domains = $mydestination, domainaaaa.com, domaindddd
remote_header_rewrite_domain = domain.invalid
sender_bcc_maps = regexp:/etc/postfix/sender_bcc
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/ssl/certs/mail_domainaaaa_de.crt
smtpd_tls_key_file = /etc/ssl/private/mail_domainaaaa_de.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_sasl_security_options = plaintext
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
virtual_alias_domains =
virtual_alias_maps = ldap:/etc/postfix/virtual-ldap-groups.cf
virtual_mailbox_domains = smarthost.domainaaaa.de,
smarthost.domainbbbb.de, smarthost.domaincccc.de, domainaaaa.de,
domainbbbb.de, domaincccc.de
virtual_mailbox_maps = ldap:/etc/postfix/virtual-ldap-users.cf
ldap:/etc/postfix/virtual-ldap-other-email-accounts.cf
ldap:/etc/postfix/virtual-ldap-public-folder.cf
ldap:/etc/postfix/virtual-ldap-external-people.cf
virtual_transport = maildrop
--master.cf--
smtp inet n - - - - smtpd
submission inet n - - - - smtpd
#-o transport_maps=hash:/etc/postfix/transport
-o smtpd_tls_security_level=encrypt
-o smtpd_tls_received_header=yes
-o smtpd_tls_CAfile=/etc/ssl/certs/Foo_Company_Certificate_Authority.pem
-o smtpd_tls_ask_ccert=yes
-o relay_clientcerts=hash:/etc/postfix/relay_clientcerts
-o smtpd_tls_loglevel=2
-o smtpd_sasl_auth_enable=yes
-o
smtpd_client_restrictions=permit_sasl_authenticated,permit_tls_clientcerts,reject
#-o smtpd_client_restrictions=permit_sasl_authenticated,reject
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - - - - smtp
relay unix - - - - - smtp
-o smtp_fallback_relay=
showq unix n - - - - showq
error unix - - - - - error
retry unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
maildrop unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/bin/maildrop -d ${recipient} -f
"${sender}" -t /var/run/dovecot/auth-userdb
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender
$recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}
dovecot unix - n n - - pipe
flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/dovecot-lda -f
${sender} -d ${recipient}
== Postfinger client ==
--System Parameters--
mail_version = 2.9.6
hostname = client
uname = Linux client 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2 x86_64 GNU/Linux
--Packaging information--
looks like this postfix comes from deb package: postfix-2.9.6-2
--main.cf non-default parameters--
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
html_directory = /usr/share/doc/postfix/html
mailbox_size_limit = 0
mydestination = localhost, localhost.localdomain, client, client.example.com
myhostname = client.example.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
recipient_delimiter = +
relayhost = mail.intern.domainaaaa.de:587
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_tls_cert_file = /etc/ssl/certs/client_example_com.crt
smtpd_tls_key_file = /etc/ssl/private/client_example_com.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_CAfile = /home/tom/rapid1.pem
smtp_tls_loglevel = 2
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
--master.cf--
smtp inet n - - - - smtpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - - - - smtp
relay unix - - - - - smtp
showq unix n - - - - showq
error unix - - - - - error
retry unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
($recipient)
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender
$recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}