Bonjour à tous
J’ai mis en palce un serveur mails avec Postfix et Dovecot, et paramétré le tout pour que les services autentifient les utilisateurs sur une base LDAP (AD en l’occurence).
En local, tout fonctionne nickel, et c’est lorsqu’il faut s’ouvrir au monde que mon Posftix fait des siennes…
Voici mon fichier de conf :
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# TLS parameters
smtpd_tls_cert_file = /un/certificat.crt
smtpd_tls_key_file = /un/certificate.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
myhostname = monserveur.mondomaine.fr
alias_maps = hash:/etc/postfix/ aliases
alias_database = hash:/etc/postfix/aliases
myorigin = mon.serveur.fr
mydestination = $myhostname, localhost, localhost.localdomain, localhost.$myhostname
mynetworks = 127.0.0.0/8
mailbox_command = /usr/lib/dovecot/deliver
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
virtual_alias_domains =
mydomain = mondomaine.fr
mynetworks_style = subnet
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_reject_unlisted_recipient = yes
smtpd_reject_unlisted_sender = yes
smtpd_sender_restrictions = permit_mynetworks, reject_sender_login_mismatch, permit_sasl_authenticated
delay_warning_time = 0h
maximal_queue_lifetime = 1d
bounce_queue_lifetime = 1d
proxy_read_maps = $canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions
smtp_data_init_timeout = 240s
smtp_data_xfer_timeout = 600s
smtpd_helo_required = yes
smtpd_helo_restrictions = permit_mynetworks,permit_sasl_authenticated, check_helo_access pcre:/etc/postfix/helo_access.pcre
queue_run_delay = 300s
minimal_backoff_time = 300s
maximal_backoff_time = 4000s
enable_original_recipient = no
disable_vrfy_command = yes
home_mailbox = Maildir/
allow_min_user = no
message_size_limit = 15728640
virtual_minimum_uid = 1000
virtual_uid_maps = static:1000
virtual_gid_maps = static:1000
virtual_mailbox_base = /var/vmail
transport_maps = hash:/etc/postfix/transport
virtual_alias_maps = proxy:ldap:/etc/postfix/ad_virtual_group_maps.cf
virtual_mailbox_domains = hash:/etc/postfix/domaines
virtual_mailbox_maps = proxy:ldap:/etc/postfix/ad_virtual_mailbox_maps.cf
sender_bcc_maps =
recipient_bcc_maps =
relay_domains = hash:/etc/postfix/domaines
smtpd_sender_login_maps = proxy:ldap:/etc/postfix/ad_sender_login_maps.cf
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = mondomaine.fr
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = no
smtpd_recipient_restrictions = reject_unknown_sender_domain reject_unknown_recipient_domain reject_non_fqdn_sender reject_non_fqdn_recipient reject_unlisted_recipient permit_mynetworks permit_sasl_authenticated reject_unauth_destination reject_non_fqdn_helo_hostname reject_invalid_helo_hostname
#check_policy_service inet:127.0.0.1:10031
smtpd_tls_security_level = encrypt
smtpd_tls_loglevel = 0
smtpd_tls_CAfile = /un/certificat.pem
tls_random_source = dev:/dev/urandom
# Uncomment below line to enable policyd sender throttle.
#smtpd_end_of_data_restrictions = check_policy_service inet:127.0.0.1:10032
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
smtpd_sasl_type = dovecot
smtpd_sasl_path = ./dovecot-auth
content_filter = smtp-amavis:[127.0.0.1]:10024
smtp-amavis_destination_recipient_limit = 1
relay_recipient_maps =
Et voici le message d’erreur que je me prend :
Nov 19 13:46:49 mail postfix/smtpd[5079]: E9DB480247F: client=localhost[127.0.0.1]
Nov 19 13:46:49 mail postfix/cleanup[5075]: E9DB480247F: message-id=<50AA2A22.8080104@mondomaine.fr>
Nov 19 13:46:49 mail postfix/qmgr[5068]: E9DB480247F: from=<user@mondomaine.fr>, size=1445, nrcpt=1 (queue active)
Nov 19 13:46:49 mail postfix/smtpd[5079]: disconnect from localhost[127.0.0.1]
Nov 19 13:46:50 mail amavis[1289]: (01289-05) Passed CLEAN, MYNETS/MYUSERS LOCAL [192.168.x.x] [192.168.x.x] <user@mondomaine.fr> -> <adresse@externe.com>, Message-ID: <50AA2A22.8080104@mondomaine.fr>, mail_id: Rqb4V3eBgyu9, Hits: -10, size: 542, queued_as: E9DB480247F, 8603 ms
Nov 19 13:46:50 mail postfix/smtp[5076]: 593C580247E: to=<adresse@externe.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=8.9, delays=0.22/0.02/0.01/8.6, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=01289-05, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as E9DB480247F)
Nov 19 13:46:50 mail postfix/qmgr[5068]: 593C580247E: removed
Nov 19 13:46:50 mail postfix/smtp[5080]: E9DB480247F: to=<adresse@externe.com>, relay=mta6.am0.yahoodns.net[66.94.236.34]:25, delay=0.08, delays=0/0.01/0.06/0, dsn=5.0.0, status=bounced (host mta6.am0.yahoodns.net[66.94.236.34] said: 550 Blocked (in reply to MAIL FROM command))
Nov 19 13:46:50 mail postfix/cleanup[5075]: 1066A802480: message-id=<20121119124650.1066A802480@monserveur.mondomaine.fr>
Nov 19 13:46:50 mail postfix/qmgr[5068]: 1066A802480: from=<>, size=3288, nrcpt=1 (queue active)
Nov 19 13:46:50 mail postfix/bounce[5081]: E9DB480247F: sender non-delivery notification: 1066A802480
Nov 19 13:46:50 mail postfix/qmgr[5068]: E9DB480247F: removed
Nov 19 13:46:50 mail postfix/pipe[5082]: 1066A802480: to=<user@mondomaine.fr>, relay=dovecot, delay=0.14, delays=0.02/0.01/0/0.12, dsn=2.0.0, status=sent (delivered via dovecot service)
Nov 19 13:46:50 mail postfix/qmgr[5068]: 1066A802480: removed
Lorsque j’envoie un mail de Yahoo vers mon domaine , cela fonctionne, lorsque j’envoie un mail de mon domaine vers Yahoo, ça me donne l’erreur.
A tout hasard, j’ai installé des certificats Gandi (bien que cela soit un serveur de tests…), rien n’ a fait.
Après l’échec, je recois un mail qui me notifie du blocage.
J’ai vérifé, je ne suis blacklisté nulle part.
La configuration DNS chez Gandi est la même qu’un autre serveur que j’ai fait et qui lui, fonctionne très bien…
Une idée ?
Merci beaucoup ! 