Hello, I have the same problem, the TLS work fine for the request of the mail and for send the mail but not for the DKIM relay. I tried with a self-signed certificate and with a CA signed certificate but none of them solve it.
here is my postconf -n, I changed my domains names:"dns.name.tld" is my postfix and "dns.name2.tld" is my main domain 2bounce_notice_recipient = postfixrepo...@dns.name2.tld alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no bounce_notice_recipient = postfixrepo...@dns.name2.tld bounce_queue_lifetime = 1d broken_sasl_auth_clients = yes config_directory = /etc/postfix content_filter = dksign:[127.0.0.1]:12027 cyrus_sasl_config_path = /etc/postfix/sasl home_mailbox = Maildir/ inet_interfaces = all mailbox_command = mailbox_size_limit = 0 maximal_queue_lifetime = 1d mydestination = localhost, localhost.localdomain myhostname = dns.name.tld mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.0.0/24 192.168.10.0/24 192.168.20.0/24 192.168.30.0/24 myorigin = /etc/mailname notify_classes = resource, software readme_directory = no recipient_delimiter = + relayhost = smtp_starttls_timeout = 60s smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt smtp_tls_cert_file = /etc/ssl/certs/postfix.crt smtp_tls_key_file = /etc/ssl/private/postfix.key smtp_tls_loglevel = 2 smtp_tls_scert_verifydepth = 5 smtp_tls_security_level = may smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtp_use_tls = yes smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unauth_destination, reject_unauth_pipelining, reject_invalid_hostname, reject_rbl_client list.dsbl.org, reject_rbl_client bl.spamcop.net, reject_rbl_client sbl-xbl.spamhaus.org smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = $myhostname smtpd_sasl_security_options = noanonymous smtpd_sasl_type = cyrus smtpd_starttls_timeout = 60s smtpd_tls_CAfile = /etc/ssl/certs/ca-certificates.crt smtpd_tls_cert_file = /etc/ssl/certs/postfix.crt smtpd_tls_key_file = /etc/ssl/private/postfix.key smtpd_tls_loglevel = 2 smtpd_tls_received_header = yes smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_tls_session_cache_timeout = 3600s smtpd_use_tls = yes tls_random_source = dev:/dev/urandom transport_maps = hash:/etc/postfix/transport virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf virtual_gid_maps = static:5000 virtual_mailbox_base = /home/vmail virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf virtual_mailbox_limit = 51200000 virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf virtual_minimum_uid = 5000 virtual_transport = virtual virtual_uid_maps = static:5000 Here is my master.cf # # Postfix master process configuration file. For details on the format # of the file, see the master(5) manual page (command: "man 5 master"). # # Do not forget to execute "postfix reload" after editing this file. # # ========================================================================== # service type private unpriv chroot wakeup maxproc command + args # (yes) (yes) (yes) (never) (100) # ========================================================================== # relayer sur dksign sur le port 10028 smtp inet n - - - 200 smtpd -o receive_override_options=no_address_mappings -o content_filter=dksign:[127.0.0.1]:12027 smtps inet n - - - - smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes -o content_filter=dksign:[127.0.0.1]:12027 -o receive_override_options=no_address_mappings -o smtpd_client_restrictions=permit_mynetworks,permit_sasl_authenticated,reject submission inet n - n - - smtpd -o smtpd_etrn_restrictions=reject -o smtpd_sasl_auth_enable=yes -o content_filter=dksign:[127.0.0.1]:12027 -o receive_override_options=no_address_mappings -o smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject #-o smtpd_recipient_restrictions=permit_mynetworks,permit_sasl_authenticated,reject #628 inet n - - - - qmqpd pickup fifo n - - 60 1 pickup cleanup unix n - - - 0 cleanup qmgr fifo n - n 300 1 qmgr #qmgr fifo n - - 300 1 oqmgr 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 # When relaying mail as backup MX, disable fallback_relay to avoid MX loops relay unix - - - - - smtp -o smtp_fallback_relay= # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 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 # # ==================================================================== # Interfaces to non-Postfix software. Be sure to examine the manual # pages of the non-Postfix software to find out what options it wants. # # Many of the following services use the Postfix pipe(8) delivery # agent. See the pipe(8) man page for information about ${recipient} # and other message envelope options. # ==================================================================== # # maildrop. See the Postfix MAILDROP_README file for details. # Also specify in main.cf: maildrop_destination_recipient_limit=1 # maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient} # # ==================================================================== # # Recent Cyrus versions can use the existing "lmtp" master.cf entry. # # Specify in cyrus.conf: # lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4 # # Specify in main.cf one or more of the following: # mailbox_transport = lmtp:inet:localhost # virtual_transport = lmtp:inet:localhost # # ==================================================================== # # Cyrus 2.1.5 (Amos Gouaux) # Also specify in main.cf: cyrus_destination_recipient_limit=1 # #cyrus unix - n n - - pipe # user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user} # # ==================================================================== # Old example of delivery via Cyrus. # #old-cyrus unix - n n - - pipe # flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user} # # ==================================================================== # # See the Postfix UUCP_README file for configuration details. # uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) # # Other external delivery methods. # 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} dksign unix - - n - 10 smtp -o smtp_send_xforward_command=yes -o smtp_discard_ehlo_keywords=8bitmime 127.0.0.1:12028 inet n - n - 10 smtpd -o content_filter= -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks -o smtpd_helo_restrictions= -o smtpd_client_restrictions= -o smtpd_sender_restrictions= -o smtpd_recipient_restrictions=permit_mynetworks,reject -o mynetworks=127.0.0.0/8 -o smtpd_authorized_xforward_hosts=127.0.0.0/8 And a log that show the sending of a mail: Jul 23 17:03:21 PC1 postfix/smtpd[26335]: initializing the server-side TLS engine Jul 23 17:03:21 PC1 postfix/smtpd[26335]: connect from dns.name.tld[xxx.xxx.xxx.xxx] Jul 23 17:03:23 PC1 postfix/smtpd[26335]: setting up TLS connection from dns.name.tld[xxx.xxx.xxx.xxx] Jul 23 17:03:23 PC1 postfix/smtpd[26335]: dns.name.tld[xxx.xxx.xxx.xxx]: TLS cipher list "ALL:+RC4:@STRENGTH" Jul 23 17:03:23 PC1 postfix/smtpd[26335]: SSL_accept:before/accept initialization Jul 23 17:03:23 PC1 postfix/smtpd[26335]: SSL_accept:SSLv3 read client hello B Jul 23 17:03:23 PC1 postfix/smtpd[26335]: SSL_accept:SSLv3 write server hello A Jul 23 17:03:23 PC1 postfix/smtpd[26335]: SSL_accept:SSLv3 write certificate A Jul 23 17:03:23 PC1 postfix/smtpd[26335]: SSL_accept:SSLv3 write key exchange A Jul 23 17:03:23 PC1 postfix/smtpd[26335]: SSL_accept:SSLv3 write server done A Jul 23 17:03:23 PC1 postfix/smtpd[26335]: SSL_accept:SSLv3 flush data Jul 23 17:03:24 PC1 postfix/smtpd[26335]: SSL_accept:SSLv3 read client key exchange A Jul 23 17:03:24 PC1 postfix/smtpd[26335]: SSL_accept:SSLv3 read finished A Jul 23 17:03:24 PC1 postfix/smtpd[26335]: SSL_accept:SSLv3 write session ticket A Jul 23 17:03:24 PC1 postfix/smtpd[26335]: SSL_accept:SSLv3 write change cipher spec A Jul 23 17:03:24 PC1 postfix/smtpd[26335]: SSL_accept:SSLv3 write finished A Jul 23 17:03:24 PC1 postfix/smtpd[26335]: SSL_accept:SSLv3 flush data Jul 23 17:03:24 PC1 postfix/smtpd[26335]: Anonymous TLS connection established from dns.name.tld[xxx.xxx.xxx.xxx]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits) Jul 23 17:03:28 PC1 postfix/smtpd[26335]: 1AB4128411E: client=dns.name.tld[xxx.xxx.xxx.xxx], sasl_method=PLAIN, sasl_username=m...@my.domain.tld Jul 23 17:03:29 PC1 postfix/cleanup[26340]: 1AB4128411E: message-id=<51ee9b3a.9040...@my.domain.tld> Jul 23 17:03:29 PC1 postfix/qmgr[26257]: 1AB4128411E: from=<m...@my.domain.tld>, size=738, nrcpt=1 (queue active) Jul 23 17:03:29 PC1 postfix/smtp[26341]: initializing the client-side TLS engine Jul 23 17:03:29 PC1 postfix/smtpd[26342]: initializing the server-side TLS engine Jul 23 17:03:29 PC1 postfix/smtpd[26342]: connect from localhost.localdomain[127.0.0.1] Jul 23 17:03:29 PC1 postfix/smtp[26341]: discarding EHLO keywords: 8BITMIME Jul 23 17:03:29 PC1 postfix/smtpd[26342]: setting up TLS connection from localhost.localdomain[127.0.0.1] Jul 23 17:03:29 PC1 postfix/smtpd[26342]: localhost.localdomain[127.0.0.1]: TLS cipher list "ALL:+RC4:@STRENGTH" Jul 23 17:03:29 PC1 postfix/smtp[26341]: setting up TLS connection to 127.0.0.1[127.0.0.1]:12027 Jul 23 17:03:29 PC1 postfix/smtpd[26342]: SSL_accept:before/accept initialization Jul 23 17:03:29 PC1 postfix/smtp[26341]: 127.0.0.1[127.0.0.1]:12027: TLS cipher list "ALL:+RC4:@STRENGTH" Jul 23 17:03:29 PC1 postfix/smtp[26341]: looking for session dksign:127.0.0.1:12027:my.domain.tld&p=1&c=ALL:+RC4:@STRENGTH in smtp cache Jul 23 17:03:29 PC1 postfix/tlsmgr[26264]: lookup smtp session id=dksign:127.0.0.1:12027:my.domain.tld&p=1&c=ALL:+RC4:@STRENGTH Jul 23 17:03:29 PC1 postfix/smtp[26341]: SSL_connect:before/connect initialization Jul 23 17:03:29 PC1 postfix/smtp[26341]: SSL_connect:SSLv2/v3 write client hello A Jul 23 17:03:31 PC1 postfix/smtpd[26335]: disconnect from dns.name.tld[xxx.xxx.xxx.xxx] Jul 23 17:04:30 PC1 postfix/smtpd[26342]: SSL_accept error from localhost.localdomain[127.0.0.1]: -1 Jul 23 17:04:30 PC1 postfix/smtp[26341]: SSL_connect error to 127.0.0.1[127.0.0.1]:12027: -1 Jul 23 17:04:30 PC1 postfix/smtp[26341]: remove session dksign:127.0.0.1:12027:my.domain.tld&p=1&c=ALL:+RC4:@STRENGTH from client cache Jul 23 17:04:30 PC1 postfix/smtpd[26342]: lost connection after STARTTLS from localhost.localdomain[127.0.0.1] Jul 23 17:04:30 PC1 postfix/tlsmgr[26264]: delete smtp session id=dksign:127.0.0.1:12027:my.domain.tld&p=1&c=ALL:+RC4:@STRENGTH Jul 23 17:04:30 PC1 postfix/smtpd[26342]: disconnect from localhost.localdomain[127.0.0.1] Jul 23 17:04:30 PC1 postfix/smtp[26341]: 1AB4128411E: Cannot start TLS: handshake failure Jul 23 17:04:30 PC1 postfix/smtpd[26342]: connect from localhost.localdomain[127.0.0.1] Jul 23 17:04:30 PC1 postfix/smtp[26341]: discarding EHLO keywords: 8BITMIME Jul 23 17:04:30 PC1 postfix/smtpd[26342]: 00F97284157: client=dns.name.tld[xxx.xxx.xxx.xxx] Jul 23 17:04:30 PC1 dkimproxy.out[24830]: DKIM signing - signed; message-id=<51ee9b3a.9040...@my.domain.tld>, signer=<m...@my.domain.tld>, from=<m...@my.domain.tld> Jul 23 17:04:30 PC1 postfix/cleanup[26340]: 00F97284157: message-id=<51ee9b3a.9040...@my.domain.tld> Jul 23 17:04:30 PC1 postfix/qmgr[26257]: 00F97284157: from=<m...@my.domain.tld>, size=1676, nrcpt=1 (queue active) Jul 23 17:04:30 PC1 postfix/smtp[26341]: 1AB4128411E: to=<m...@my.domain2.tld>, relay=127.0.0.1[127.0.0.1]:12027, delay=63, delays=2.7/0.01/60/0.09, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 00F97284157) Jul 23 17:04:30 PC1 postfix/smtpd[26342]: disconnect from localhost.localdomain[127.0.0.1] Jul 23 17:04:30 PC1 postfix/qmgr[26257]: 1AB4128411E: removed Jul 23 17:04:30 PC1 postfix/smtp[26343]: initializing the client-side TLS engine Jul 23 17:04:30 PC1 postfix/smtp[26343]: 00F97284157: to=<m...@my.domain2.tld>, relay=mx0.ovh.net[xxx.xxx.xxx.xxx]:25, delay=0.28, delays=0.09/0.02/0.07/0.11, dsn=2.0.0, status=sent (250 ok 1374591870 qp 8665) Jul 23 17:04:30 PC1 postfix/qmgr[26257]: 00F97284157: removed -- View this message in context: http://postfix.1071664.n5.nabble.com/All-my-email-are-5-minutes-delayed-tp37351p59926.html Sent from the Postfix Users mailing list archive at Nabble.com.