#1 Le 29/10/2012, à 17:35
- jj16
Difficultés avec SSMTP
Bonjour,
Je me sers sur mon poste d'un serveur LAMP. Je voudrais lors d'un traitement en PHP utiliser la fonction mail() pour des tests
Après avoir lu pas mas de tuto , j'ai installé ssmtp mais rien à faire je ne reçois pas de mail.
voilà la configuration de mes fichiers "ssmtp.conf" "revaliases" et "php.ini" :
Je sèche sur le problème si quelqu'un voit une erreur dans ce que j'ai fait !
fichier /etc/ssmtp/ssmtp.conf
#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
root=j'ai mis mon nom quand je me connecte à mon pc
AuthUser=monmail@orange.fr
AuthPass= monpasse
# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
mailhub=smtp.orange.fr:587
# Where will the mail seem to come from?
#rewriteDomain=orange.fr
# The full hostname
hostname=jacominos
# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
FromLineOverride=YES
fichier /etc/ssmtp/revaliases
# sSMTP aliases
#
# Format: local_account:outgoing_address:mailhub
#
# Example: root:your_login@your.domain:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.
root:jean-jacques.jacomino@orange.fr:orange.fr:587
Mon fichier php.ini
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25
; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = me@example.com
; For Unix only. You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path
sendmail_path = /usr/sbin/ssmtp -t -i
; Force the addition of the specified parameters to be passed as extra parameters
; to the sendmail binary. These parameters will always replace the value of
; the 5th parameter to mail(), even in safe mode.
;mail.force_extra_parameters =
; Add X-PHP-Originating-Script: that will include uid of the script followed by the filename
mail.add_x_header = On
; Log all mail() calls including the full path of the script, line #, to address and headers
;mail.log =
Hors ligne
#2 Le 29/10/2012, à 21:17
- Kooothor
Re : Difficultés avec SSMTP
Salut jj16,
Quand tu dis «je ne reçois pas de mail», il faut que tu saches où se situe le problème : si ça se trouve c'est juste que ton firewall bloque le port 25 !
Regarde dans /var/log/mail.{err,log}
@+
~ktr
Hors ligne
#3 Le 29/10/2012, à 22:45
- jj16
Re : Difficultés avec SSMTP
slt Kooothor
merci de ta réponse
voila ce que j'ai dans /var/log/mail .err
mais suis pas très calé dans tous ces paramétrage et ça me parle pas beaucoup
Oct 29 21:00:01 jacominos sSMTP[3796]: Authorization failed (501 5.7.0 invalid LOGIN encoding)
Hors ligne
#4 Le 29/10/2012, à 23:56
- Kooothor
Re : Difficultés avec SSMTP
Tu vois, déjà là t'as une piste : INVALID LOGIN
Essaie de mettre juste ton user comme username, pas user@orange.fr dans le ssmtp.conf.
Dernière modification par Kooothor (Le 29/10/2012, à 23:57)
Hors ligne