Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 26/05/2018, à 21:55

Nym

[Résolu] Relais postfix chez Orange

Bonjour.

Ca fait plusieurs heures que je galère pour configurer un relais de mails vers Orange sur mon serveur local. J'ai consulté plusieurs pages sur le sujet et je n'y arrive toujours pas. Pourtant mon client Thunderbird fonctionne bien.
Voici la configuration sous Thunderbird :
Serveur SMTP : smtp.orange.fr
Port : 465
Utilisateur : mon adresse mail orange
Authentification : mot de passe
Sécurité : SSL/TLS

Le résultat de postconf -n :

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
mydestination = $myhostname, neldoreth.loc, T400, localhost.localdomain, localhost
myhostname = T400.home
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost = [smtp.orange.fr]:465
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
smtp_sasl_security_options = noplaintext noanonymous
smtp_tls_security_level = encrypt
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_tls_wrappermode = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes

Le fichier sasl_password :

[smtp.orange.fr]:465 mon_adresse_mail:le_mot_de passe

Les erreurs que j'obtiens dans mail.log :

May 26 22:49:34 T400 postfix/pickup[8104]: DD9A324211F: uid=1000 from=<utilisateur_local>
May 26 22:49:34 T400 postfix/cleanup[8874]: DD9A324211F: message-id=<20180526204934.DD9A324211F@T400.home>
May 26 22:49:34 T400 postfix/qmgr[8105]: DD9A324211F: from=****************, size=324, nrcpt=1 (queue active)
May 26 22:49:35 T400 postfix/smtp[8876]: warning: SASL authentication failure: No worthy mechs found
May 26 22:49:35 T400 postfix/smtp[8876]: DD9A324211F: SASL authentication failed; cannot authenticate to server smtp.orange.fr[80.12.242.10]: no mechanism available
May 26 22:49:35 T400 postfix/smtp[8876]: warning: SASL authentication failure: No worthy mechs found
May 26 22:49:35 T400 postfix/smtp[8876]: DD9A324211F: to=*******************, relay=smtp.orange.fr[193.252.22.64]:465, delay=0.31, delays=0.03/0.01/0.27/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server smtp.orange.fr[193.252.22.64]: no mechanism available)

Dernière modification par Nym (Le 02/06/2018, à 22:19)


Nym
Ubuntu 18.04.1 LTS 64bits

Hors ligne

#2 Le 30/05/2018, à 15:11

LeoMajor

Re : [Résolu] Relais postfix chez Orange

bonjour,

smtp_sasl_security_options = noanonymous

orange ne sait faire que du login, plain  ( noplaintext )

Hors ligne

#3 Le 31/05/2018, à 22:11

Nym

Re : [Résolu] Relais postfix chez Orange

Merci.
J'ai une nouvelle erreur :

May 31 23:04:20 T400 postfix/pickup[27514]: F035E240E9C: uid=1000 from=<mon_username>
May 31 23:04:20 T400 postfix/cleanup[27568]: F035E240E9C: message-id=<20180531210420.F035E240E9C@T400.home>
May 31 23:04:21 T400 postfix/qmgr[27515]: F035E240E9C: from=<mon_username@neldoreth.loc>, size=268, nrcpt=1 (queue active)
May 31 23:04:22 T400 postfix/smtp[27570]: F035E240E9C: to=*******************, relay=smtp.orange.fr[80.12.242.10]:465, delay=13, delays=11/0.03/0.35/1.1, dsn=5.1.0, status=bounced (host smtp.orange.fr[80.12.242.10] said: 501 5.1.0 Emetteur invalide. Invalid Sender. OFR203_405 [405] (in reply to MAIL FROM command))
May 31 23:04:22 T400 postfix/cleanup[27568]: 7CFCC240F96: message-id=<20180531210422.7CFCC240F96@T400.home>
May 31 23:04:22 T400 postfix/bounce[27572]: F035E240E9C: sender non-delivery notification: 7CFCC240F96
May 31 23:04:22 T400 postfix/qmgr[27515]: 7CFCC240F96: from=<>, size=2170, nrcpt=1 (queue active)
May 31 23:04:22 T400 postfix/qmgr[27515]: F035E240E9C: removed
May 31 23:04:22 T400 postfix/local[27573]: 7CFCC240F96: to=<mon_username@neldoreth.loc>, relay=local, delay=0.03, delays=0.02/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
May 31 23:04:22 T400 postfix/qmgr[27515]: 7CFCC240F96: removed

J'imagine que ça vient de la valeur du champ From, mais je pensais que la configuration du sender_canonical réglerait ce genre de problème :

T400.home mon_adresse_mail_orange
neldoreth.loc mon_adresse_mail_orange

Nym
Ubuntu 18.04.1 LTS 64bits

Hors ligne

#4 Le 01/06/2018, à 06:35

bruno

Re : [Résolu] Relais postfix chez Orange

Bonjour,

Effectivement la plupart des serveurs SMTP sont configurés pour refuser les courriels dont le FRom ne contient pas une adresse avec un nom de domaine pleinement qualifié (FQDN).
sender_canonical_maps devrait régler le problème. Exemple avec le contenu de ton fichier dans /etc/postfix/sender_canonical, dans main.cf :

sender_canonical_maps=hash:/etc/postfix/sender_canonical

en n'oubliant pas de faire :

sudo postmap /etc/postfix/sender_canonical

et de recharger la configuration de postfix.

Hors ligne

#5 Le 01/06/2018, à 21:46

Nym

Re : [Résolu] Relais postfix chez Orange

Bonsoir.

J'ai la même erreur :

Jun  1 22:36:21 T400 postfix[7042]: Postfix is running with backwards-compatible default settings
Jun  1 22:36:21 T400 postfix[7042]: See http://www.postfix.org/COMPATIBILITY_README.html for details
Jun  1 22:36:21 T400 postfix[7042]: To disable backwards compatibility use "postconf compatibility_level=2" and "postfix reload"
Jun  1 22:36:21 T400 postfix/master[1881]: terminating on signal 15
Jun  1 22:36:21 T400 postfix[7154]: Postfix is running with backwards-compatible default settings
Jun  1 22:36:21 T400 postfix[7154]: See http://www.postfix.org/COMPATIBILITY_README.html for details
Jun  1 22:36:21 T400 postfix[7154]: To disable backwards compatibility use "postconf compatibility_level=2" and "postfix reload"
Jun  1 22:36:22 T400 postfix/master[7191]: daemon started -- version 3.1.0, configuration /etc/postfix
Jun  1 22:36:45 T400 postfix/pickup[7201]: 95193240E8D: uid=1000 from=<mon_username>
Jun  1 22:36:45 T400 postfix/cleanup[7216]: 95193240E8D: message-id=<20180601203645.95193240E8D@T400.home>
Jun  1 22:36:45 T400 postfix/qmgr[7202]: 95193240E8D: from=<mon_username@neldoreth.loc>, size=268, nrcpt=1 (queue active)
Jun  1 22:36:54 T400 postfix/smtp[7218]: 95193240E8D: to=*************, relay=smtp.orange.fr[80.12.242.10]:465, delay=19, delays=10/0.02/7.8/1.2, dsn=5.1.0, status=bounced (host smtp.orange.fr[80.12.242.10] said: 501 5.1.0 Emetteur invalide. Invalid Sender. OFR203_405 [405] (in reply to MAIL FROM command))
Jun  1 22:36:55 T400 postfix/cleanup[7216]: 6C3A224100F: message-id=<20180601203655.6C3A224100F@T400.home>
Jun  1 22:36:55 T400 postfix/bounce[7221]: 95193240E8D: sender non-delivery notification: 6C3A224100F
Jun  1 22:36:55 T400 postfix/qmgr[7202]: 6C3A224100F: from=<>, size=2170, nrcpt=1 (queue active)
Jun  1 22:36:55 T400 postfix/qmgr[7202]: 95193240E8D: removed
Jun  1 22:36:55 T400 postfix/local[7222]: 6C3A224100F: to=<mon_username@neldoreth.loc>, relay=local, delay=0.05, delays=0.03/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Jun  1 22:36:55 T400 postfix/qmgr[7202]: 6C3A224100F: removed

Avec le résultat de postconf -n :

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
inet_interfaces = all
inet_protocols = all
mailbox_size_limit = 0
mydestination = $myhostname, neldoreth.loc, T400, localhost.localdomain, localhost
myhostname = T400.home
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost = [smtp.orange.fr]:465
sender_canonical_maps = hash:/etc/postfix/sender_canonical
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_password
smtp_sasl_security_options = noanonymous
smtp_tls_security_level = encrypt
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_tls_wrappermode = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
postconf: warning: /etc/postfix/main.cf: unused parameter: smtp_sasl_local_domain=$myhostname

Nym
Ubuntu 18.04.1 LTS 64bits

Hors ligne

#6 Le 02/06/2018, à 06:15

bruno

Re : [Résolu] Relais postfix chez Orange

Bien visiblement le From n'est pas réécrit par Cleanup ou il réécrit en <mon_username@neldoreth.loc> et non en adresse orange.

Vérifie bien ton fichier /etc/postfix/sender_canonical sa syntaxe ne me paraît pas correcte si tu veux utiliser des domaines c'est :

@T400.home mon_adresse_mail_orange
@neldoreth.loc mon_adresse_mail_orange

cf. http://www.postfix.org/canonical.5.html

Hors ligne

#7 Le 02/06/2018, à 22:19

Nym

Re : [Résolu] Relais postfix chez Orange

Génial, ça fonctionne !
Merci !


Nym
Ubuntu 18.04.1 LTS 64bits

Hors ligne