Paramétrage smtp avec mailx ?
Résolu
eZula
Messages postés
3509
Statut
Contributeur
-
eZula Messages postés 3509 Statut Contributeur -
eZula Messages postés 3509 Statut Contributeur -
Salut
je n'arrive pas à envoyer un mail tout simple avec la commande mailx dans une boite de type yahoo ou orange. Selon l'option choisie, (ex : echo "test" | mailx -s "test" adresse@wanadoo.fr) ça parvient dans /var/spool/mail/ mais ce n'est pas le but.
Je suis abonné orange/ex wanadoo, donc le smtp est en principe smtp-msa.orange.fr avec le port 587 (authentification nécessaire pour l'envoi de messages)
Est-ce que quelqu'un aurait une idée pour intégrer ce paramètre si le pb vient de là ?
Merci
je n'arrive pas à envoyer un mail tout simple avec la commande mailx dans une boite de type yahoo ou orange. Selon l'option choisie, (ex : echo "test" | mailx -s "test" adresse@wanadoo.fr) ça parvient dans /var/spool/mail/ mais ce n'est pas le but.
Je suis abonné orange/ex wanadoo, donc le smtp est en principe smtp-msa.orange.fr avec le port 587 (authentification nécessaire pour l'envoi de messages)
Est-ce que quelqu'un aurait une idée pour intégrer ce paramètre si le pb vient de là ?
Merci
Configuration: Linux Suse Firefox 2.0.0.14
29 réponses
- 1
- 2
Suivant
-
ca veut dire que le mail vient d'orange.fr, le serveur sécurisé d'orange dot connaitre d'ou vient le mail, je ne vois pas d'implication.
-
Je viens d'essayer avec msmtp :
msmtp --host=smtp-msa.orange.fr --port=587 --user=MonNomUtilisateur --from=nick@linux-jsfm "test" monadresse@yahoo.fr msmtp: envelope from address nick@linux-jsfm not accepted by the server msmtp: server message: 504 <nick@linux-jsfm>: Sender address rejected: need fully-qualified address msmtp: could not send mail
retest :
msmtp --host=smtp-msa.orange.fr --port=587 --user=MonNomUtilisateur --from=MonAdresse@wanadoo.fr "test" MonAdresse@yahoo.fr msmtp: recipient address test not accepted by the server msmtp: server message: 504 <test>: Recipient address rejected: need fully-qualified address msmtp: could not send mail
c'est désespérant. Il y a vraiment une solution possible ? -
il doit être protégé 600 rw-------
-
Yes ça marche, mail reçu sur yahoo ; j'ai simplement modifié dans main.cf :
myhostname = orange.fr
on peut modifier ce paramètre librement sans implication secondaire ? -
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question -
Tu as une erreur dans /var/log/mail.log ou non ?
-
il y a soit le contenu du message, soit des erreurs de type :
Final-Recipient: rfc822; adresse@yahoo.fr Action: failed Status: 4.4.1 Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to f.mx.mail.yahoo.com[209.191.88.247]: Connection timed out --6A09B4C200E.1212679569/linux-xxx.site Content-Description: Undelivered Message Content-Type: message/rfc822 Content-Transfer-Encoding: 8bit -
c'est bizarre, j'ai posé la question sur deux autres forums, ça a l'air de bloquer tout le monde. Est-ce que mailx fonctionne chez vous sur une boite de type orange, yahoo ou autre ?
-
mailx est une interface utilisateur, c'est sendmal ou postfx qui envoient le mail et qu'il faut configurer
-
j'avais regardé un peu du coté de postfix https://www.developpez.net/forums/d514882/systemes/linux/administration-systeme/postfix-utiliser-relay-smtp-orange/ sans résultat convaincant. Comment faudrait-il paramétrer le fichier de configuration correspondant ?
Voici quelques infos :
/etc/postfix/sasl_passwd # sasl_passwd # Syntax: # domain username:password # Example: # foo.com username:password # See /usr/share/doc/packages/postfix/README_FILES/SASL_README # for more details [193.252.22.72]:587 nom_utilisateur_wanadoo:mdp_messagerie_wanadoo
et
# postconf -n alias_maps = hash:/etc/aliases biff = no canonical_maps = hash:/etc/postfix/canonical command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/lib/postfix debug_peer_level = 2 defer_transports = disable_dns_lookups = no disable_mime_output_conversion = no html_directory = /usr/share/doc/packages/postfix/html inet_interfaces = localhost inet_protocols = all mail_owner = postfix mail_spool_directory = /var/mail mailbox_command = mailbox_size_limit = 0 mailbox_transport = mailq_path = /usr/bin/mailq manpage_directory = /usr/share/man masquerade_classes = envelope_sender, header_sender, header_recipient masquerade_domains = masquerade_exceptions = root message_size_limit = 10240000 mydestination = $myhostname, localhost.$mydomain myhostname = linux-jsfm.site mynetworks_style = subnet newaliases_path = /usr/bin/newaliases queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/packages/postfix/README_FILES relayhost = relocated_maps = hash:/etc/postfix/relocated sample_directory = /usr/share/doc/packages/postfix/samples sender_canonical_maps = hash:/etc/postfix/sender_canonical sendmail_path = /usr/sbin/sendmail setgid_group = maildrop smtp_sasl_auth_enable = no smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_security_options = smtp_use_tls = no smtpd_client_restrictions = smtpd_helo_required = no smtpd_helo_restrictions = smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination smtpd_sasl_auth_enable = no smtpd_sender_restrictions = hash:/etc/postfix/access smtpd_use_tls = no strict_8bitmime = no strict_rfc821_envelopes = no transport_maps = hash:/etc/postfix/transport unknown_local_recipient_reject_code = 550 virtual_alias_domains = hash:/etc/postfix/virtual virtual_alias_maps = hash:/etc/postfix/virtual
-
et avec ça:
If the relayhost needs authentification, add these directives to main.cf
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_client
smtp_sasl_security_options = noanonymous
create a new file /etc/postfix/sasl_client
edit this file and add an entry like
[smtp-msa.orange.fr]:587 mylogin:mypass
mylogin:mypass => SMTP login and pass
run postmap sasl_client (will create sasl_client.db file)
http://www.anaema.com/port-25-blocked.html -
ça ne change rien, aucun message reçu, et avec msmtp, toujours "cannot use a secure authentication method"
-
au fait, j'ai pas précisé un truc, ça a peut être son importance : je passe par un routeur pour la connection internet
-
est-ce que
telnet smtp-msa.orange.fr 587
passe ? -
$telnet smtp-msa.orange.fr 587 Trying 193.252.22.72... Connected to smtp-msa.orange.fr. Escape character is '^]'. 220 mwinf2352.orange.fr ESMTP MSA **************************
comme il ne se passe rien, j'appuie sur entrée au hasard et voilà la suite
500 Error: bad syntax
il faut faire autre chose ? -
ca veut juste dire que le serveur orange est accessible, pas de problèmes de routeur
-
Ok, merci. Sinon tu verrais une autre solution pour résoudre ce problème ?
-
je reprends le post #7:
dans main.cf ajouter
relayhost = [smtp-msa.orange.fr]:587
dans /etc/postfix/sasl_client, on est bien d'accord que
mylogin:mypass
c'est le login chez orange, pas le login local -
oui :
/etc/postfix> egrep -v '^(#|$)' main.cf queue_directory = /var/spool/postfix command_directory = /usr/sbin daemon_directory = /usr/lib/postfix mail_owner = postfix unknown_local_recipient_reject_code = 550 debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5 sendmail_path = /usr/sbin/sendmail newaliases_path = /usr/bin/newaliases mailq_path = /usr/bin/mailq setgid_group = maildrop html_directory = /usr/share/doc/packages/postfix/html manpage_directory = /usr/share/man sample_directory = /usr/share/doc/packages/postfix/samples readme_directory = /usr/share/doc/packages/postfix/README_FILES inet_protocols = all biff = no mail_spool_directory = /var/mail canonical_maps = hash:/etc/postfix/canonical virtual_alias_maps = hash:/etc/postfix/virtual virtual_alias_domains = hash:/etc/postfix/virtual relocated_maps = hash:/etc/postfix/relocated transport_maps = hash:/etc/postfix/transport sender_canonical_maps = hash:/etc/postfix/sender_canonical masquerade_exceptions = root masquerade_classes = envelope_sender, header_sender, header_recipient myhostname = linux-jsfm.site program_directory = /usr/lib/postfix inet_interfaces = localhost masquerade_domains = mydestination = $myhostname,localhost.$mydomain,$mydomain defer_transports = mynetworks_style = subnet disable_dns_lookups = no relayhost = [smtp-msa.orange.fr]:587 mailbox_command = mailbox_transport = strict_8bitmime = no disable_mime_output_conversion = no smtpd_sender_restrictions = hash:/etc/postfix/access smtpd_client_restrictions = smtpd_helo_required = no smtpd_helo_restrictions = strict_rfc821_envelopes = no smtpd_recipient_restrictions = permit_mynetworks,reject_unauth_destination smtp_sasl_auth_enable = yes smtpd_sasl_auth_enable = no smtpd_use_tls = no smtp_use_tls = no alias_maps = hash:/etc/aliases mailbox_size_limit = 0 message_size_limit = 10240000 smtp_sasl_security_options = noanonymous smtp_sasl_password_maps = hash:/etc/postfix/sasl_client
dans /etc/postfix/sasl_client
mylogin = le nom d'utilisateur orange, par exemple pour l'adresse abc@orange.fr, ce serait abc
mypass : mot de passe de messagerie orange (utilisé pour lire les mails donc)
===============================
Là je viens de reessayer d'envoyer un simple "test" à deux adresses yahoo et orange, voilà ce qui est arrivé dans /var/spool/mail/nom :
From MAILER-DAEMON Sun Jun 8 14:38:07 2008 Return-Path: <> X-Original-To: nom@linux-jsfm.site Delivered-To: nom@linux-jsfm.site Received: by linux-jsfm.site (Postfix) id 66C814C202F; Sun, 8 Jun 2008 14:38:07 +0200 (CEST) Date: Sun, 8 Jun 2008 14:38:07 +0200 (CEST) From: MAILER-DAEMON@linux-jsfm.site (Mail Delivery System) Subject: Undelivered Mail Returned to Sender To: nom@linux-jsfm.site Auto-Submitted: auto-replied MIME-Version: 1.0 Content-Type: multipart/report; report-type=delivery-status; boundary="8ADC04C202E.1212928687/linux-jsfm.site" Message-Id: <20080608123807.66C814C202F@linux-jsfm.site> This is a MIME-encapsulated message. --8ADC04C202E.1212928687/linux-jsfm.site Content-Description: Notification Content-Type: text/plain; charset=us-ascii This is the mail system at host linux-jsfm.site. I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below. For further assistance, please send mail to postmaster. If you do so, please include this problem report. You can delete your own text from the attached returned message. The mail system <monadresse@orange.fr>: host smtp-msa.orange.fr[193.252.22.72] said: 553 <nom@linux-jsfm.site>: Sender address rejected: Domain not found (in reply to MAIL FROM command) --8ADC04C202E.1212928687/linux-jsfm.site Content-Description: Delivery report Content-Type: message/delivery-status Reporting-MTA: dns; linux-jsfm.site X-Postfix-Queue-ID: 8ADC04C202E X-Postfix-Sender: rfc822; nom@linux-jsfm.site Arrival-Date: Sun, 8 Jun 2008 14:38:06 +0200 (CEST) Final-Recipient: rfc822; monadresse@orange.fr Action: failed Status: 5.0.0 Remote-MTA: dns; smtp-msa.orange.fr Diagnostic-Code: smtp; 553 <nom@linux-jsfm.site>: Sender address rejected: Domain not found --8ADC04C202E.1212928687/linux-jsfm.site Content-Description: Undelivered Message Content-Type: message/rfc822 Received: by linux-jsfm.site (Postfix, from userid 1000) id 8ADC04C202E; Sun, 8 Jun 2008 14:38:06 +0200 (CEST) Date: Sun, 08 Jun 2008 14:38:06 +0200 To: monadresse@orange.fr Subject: test User-Agent: Heirloom mailx 12.2 01/07/07 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20080608123806.8ADC04C202E@linux-jsfm.site> From: nom@linux-jsfm.site (nom) test --8ADC04C202E.1212928687/linux-jsfm.site-- From MAILER-DAEMON Sun Jun 8 14:39:02 2008 Return-Path: <> X-Original-To: nom@linux-jsfm.site Delivered-To: nom@linux-jsfm.site Received: by linux-jsfm.site (Postfix) id 971F34C202F; Sun, 8 Jun 2008 14:39:02 +0200 (CEST) Date: Sun, 8 Jun 2008 14:39:02 +0200 (CEST) From: MAILER-DAEMON@linux-jsfm.site (Mail Delivery System) Subject: Undelivered Mail Returned to Sender To: nom@linux-jsfm.site Auto-Submitted: auto-replied MIME-Version: 1.0 Content-Type: multipart/report; report-type=delivery-status; boundary="D13344C202E.1212928742/linux-jsfm.site" Message-Id: <20080608123902.971F34C202F@linux-jsfm.site> This is a MIME-encapsulated message. --D13344C202E.1212928742/linux-jsfm.site Content-Description: Notification Content-Type: text/plain; charset=us-ascii This is the mail system at host linux-jsfm.site. I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below. For further assistance, please send mail to postmaster. If you do so, please include this problem report. You can delete your own text from the attached returned message. The mail system <monadresse@yahoo.fr>: host smtp-msa.orange.fr[193.252.22.72] said: 553 <nom@linux-jsfm.site>: Sender address rejected: Domain not found (in reply to MAIL FROM command) --D13344C202E.1212928742/linux-jsfm.site Content-Description: Delivery report Content-Type: message/delivery-status Reporting-MTA: dns; linux-jsfm.site X-Postfix-Queue-ID: D13344C202E X-Postfix-Sender: rfc822; nom@linux-jsfm.site Arrival-Date: Sun, 8 Jun 2008 14:39:01 +0200 (CEST) Final-Recipient: rfc822; monadresse@yahoo.fr Action: failed Status: 5.0.0 Remote-MTA: dns; smtp-msa.orange.fr Diagnostic-Code: smtp; 553 <nom@linux-jsfm.site>: Sender address rejected: Domain not found --D13344C202E.1212928742/linux-jsfm.site Content-Description: Undelivered Message Content-Type: message/rfc822 Received: by linux-jsfm.site (Postfix, from userid 1000) id D13344C202E; Sun, 8 Jun 2008 14:39:01 +0200 (CEST) Date: Sun, 08 Jun 2008 14:39:01 +0200 To: monadresse@yahoo.fr Subject: test User-Agent: Heirloom mailx 12.2 01/07/07 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20080608123901.D13344C202E@linux-jsfm.site> From: nom@linux-jsfm.site (nom) test --D13344C202E.1212928742/linux-jsfm.site-- -
une remarque, le fichier /etc/postfix/sasl_client est un simple fichier texte non crypté lisible par tout le monde (il contient le login et le mdp), ce qui n'est pas le cas par exemple de sasl_passwd lisible uniquement par root.
Ca ne pose pas de problème ? -
ok, c'est rectifié.
Et encore ceci après un essai :
host smtp-msa.orange.fr[193.252.22.72] said: 553 <nom@linux-jsfm.site>: Sender address rejected: Domain not found (in reply to MAIL FROM command)
est-ce qu'on peut changer le from dans un fichier de conf ? on dirait que c'est ça qui bloque, non ?
- 1
- 2
Suivant