J'ai configuré mon serveur de messagerie avec postfix 2.7.1 et Dovecot 1.2.15 et tout semblait fonctionner correctement, mais j'ai découvert que les personnes utilisant des adresses @gmx.net ne peuvent pas m'envoyer d'emails et reçoivent plutôt le message d'erreur suivant
Connected to <MYIPADDRESS> but sender was rejected.
Remote host said: 530 5.7.0 Must issue a STARTTLS command first
Le fichier /var/log/mail.log s'affiche :
postfix/smtpd[22743]: connected to mailout-de.gmx.net[213.165.64.23]
postfix/smtpd[22743]: disconnect from mailout-de.gmx.net[213.165.64.23]
un journal plus détaillé me l'indique :
postfix/smtpd[22743]: match_hostname: mailout-de.gmx.net ~? 127.0.0.0/8
postfix/smtpd[22743]: match_hostaddr: 213.165.64.23 ~? 127.0.0.0/8
postfix/smtpd[22743]: match_hostname: mailout-de.gmx.net ~? [::ffff:127.0.0.0]/104
postfix/smtpd[22743]: match_hostaddr: 213.165.64.23 ~? [::ffff:127.0.0.0]/104
postfix/smtpd[22743]: match_hostname: mailout-de.gmx.net ~? [::1]/128
postfix/smtpd[22743]: match_hostaddr: 213.165.64.23 ~? [::1]/128
postfix/smtpd[22743]: match_list_match: mailout-de.gmx.net: no match
postfix/smtpd[22743]: match_list_match: 213.165.64.23: no match
postfix/smtpd[22743]: auto_clnt_open: connected to private/anvil
postfix/smtpd[22743]: send attr request = connect
postfix/smtpd[22743]: send attr ident = smtp:213.165.64.23
postfix/smtpd[22743]: private/anvil: wanted attribute: status
postfix/smtpd[22743]: input attribute name: status
postfix/smtpd[22743]: input attribute value: 0
postfix/smtpd[22743]: private/anvil: wanted attribute: count
postfix/smtpd[22743]: input attribute name: count
postfix/smtpd[22743]: input attribute value: 1
postfix/smtpd[22743]: private/anvil: wanted attribute: rate
postfix/smtpd[22743]: input attribute name: rate
postfix/smtpd[22743]: input attribute value: 1
postfix/smtpd[22743]: private/anvil: wanted attribute: (list terminator)
postfix/smtpd[22743]: input attribute name: (end)
postfix/smtpd[22743]: > mailout-de.gmx.net[213.165.64.23]: 220 <MYDOMAIN> ESMTP Postfix (Debian/GNU)
postfix/smtpd[22743]: watchdog_pat: 0x7f1549946d00
postfix/smtpd[22743]: < mailout-de.gmx.net[213.165.64.23]: HELO mailout-de.gmx.net
postfix/smtpd[22743]: > mailout-de.gmx.net[213.165.64.23]: 250 <MYDOMAIN>
postfix/smtpd[22743]: watchdog_pat: 0x7f1549946d00
postfix/smtpd[22743]: < mailout-de.gmx.net[213.165.64.23]: MAIL FROM:<SomeAddress@gmx.net>
postfix/smtpd[22743]: > mailout-de.gmx.net[213.165.64.23]: 530 5.7.0 Must issue a STARTTLS command first
postfix/smtpd[22743]: watchdog_pat: 0x7f1549946d00
postfix/smtpd[22743]: < mailout-de.gmx.net[213.165.64.23]: QUIT
postfix/smtpd[22743]: > mailout-de.gmx.net[213.165.64.23]: 221 2.0.0 Bye
postfix/smtpd[22743]: match_hostname: mailout-de.gmx.net ~? 127.0.0.0/8
postfix/smtpd[22743]: match_hostaddr: 213.165.64.23 ~? 127.0.0.0/8
postfix/smtpd[22743]: match_hostname: mailout-de.gmx.net ~? [::ffff:127.0.0.0]/104
postfix/smtpd[22743]: match_hostaddr: 213.165.64.23 ~? [::ffff:127.0.0.0]/104
postfix/smtpd[22743]: match_hostname: mailout-de.gmx.net ~? [::1]/128
postfix/smtpd[22743]: match_hostaddr: 213.165.64.23 ~? [::1]/128
postfix/smtpd[22743]: match_list_match: mailout-de.gmx.net: no match
postfix/smtpd[22743]: match_list_match: 213.165.64.23: no match
postfix/smtpd[22743]: send attr request = disconnect
postfix/smtpd[22743]: send attr ident = smtp:213.165.64.23
postfix/smtpd[22743]: private/anvil: wanted attribute: status
postfix/smtpd[22743]: input attribute name: status
postfix/smtpd[22743]: input attribute value: 0
postfix/smtpd[22743]: private/anvil: wanted attribute: (list terminator)
postfix/smtpd[22743]: input attribute name: (end)
postfix/smtpd[22743]: disconnect from mailout-de.gmx.net[213.165.64.23]
Donc gmx n'émet pas la commande STARTTLS, n'est-ce pas ? Mais pourquoi ? Je ne comprends pas pourquoi d'autres serveurs de messagerie peuvent se connecter au mien mais pas gmx et pourquoi gmx peut se connecter à n'importe quel autre serveur de messagerie mais pas au mien.
Mon /etc/postfix/main.cf ressemble à ce qui suit : smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) [ ] append_dot_mydomain = non readme_directory = non
smtpd_tls_cert_file = /etc/ssl/certs/my_mail_cert.pem
smtpd_tls_key_file = /etc/ssl/private/my_mail_cert.pem
smtpd_tls_CAfile = /etc/ssl/certs/my_mail_ca_cert.pem
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_loglevel = 1
debug_peer_list = mailout-de.gmx.net #log problematic host
smtpd_tls_security_level = may
smtpd_tls_auth_only = yes
myhostname = <MYHOSTNAME>
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost.org, , localhost
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = <MYDOMAIN>
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_tls_security_level = encrypt