Problème envoi mail avec ssmtp
Publié : 22 nov. 2018, 11:11
Bonjour à tous,
J'ai une petite incompréhension à vous soumettre.
J'utilise Domoticz sur rasperry pi3 (raspbian) comme serveur domotique.
J'ai aussi installé nut pour surveiller le secteur via un onduleur eaton.
Et enfin pour finir ssmtp pour envoyer des mails sur mon portable.
Venons-en à mon interrogation.
Dans un script lancé par crontab toutes les minutes, une ligne du programme met à jour un dispositif de Domoticz par la commande suivante:
curl "http://192.168.0.53:8080/json.htm?type= ... e=$MESSAGE"
Et bien si la commande ci-dessus est exécutée, j'obtiens à chaque minute les lignes suivantes dans /var/log/mail.log
Nov 18 23:02:04 raspberrypi sSMTP[3250]: Sent mail for root@****************@free.fr (221 2.0.0 Bye) uid=1000 username=pi outbytes=924
Nov 18 23:03:03 raspberrypi sSMTP[3275]: Sent mail for root@****************@free.fr (221 2.0.0 Bye) uid=1000 username=pi outbytes=924
Nov 18 23:04:03 raspberrypi sSMTP[3307]: Sent mail for root@****************@free.fr (221 2.0.0 Bye) uid=1000 username=pi outbytes=924
Pourquoi cette commande curl déclenche l'envoi d'un mail ?
J'suis certainement une grosse burne... mais j'vois pas le rapport !
Pour infos, je vous joins les fichiers de conf. de ssmtp
/etc/ssmtp $ sudo nano ssmtp.conf
#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
#root=domoticz
# 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.free.fr:587
# Where will the mail seem to come from?
#rewriteDomain=free.fr
# The full hostname
hostname=************@free.fr
# 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
#AuthUser=
#AuthPass=
#useSTARTTLS=YES
#useTLS=YES
/etc/ssmtp $ sudo nano 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.
pi:***************@free.fr:smtp.free.fr
J'ai une petite incompréhension à vous soumettre.
J'utilise Domoticz sur rasperry pi3 (raspbian) comme serveur domotique.
J'ai aussi installé nut pour surveiller le secteur via un onduleur eaton.
Et enfin pour finir ssmtp pour envoyer des mails sur mon portable.
Venons-en à mon interrogation.
Dans un script lancé par crontab toutes les minutes, une ligne du programme met à jour un dispositif de Domoticz par la commande suivante:
curl "http://192.168.0.53:8080/json.htm?type= ... e=$MESSAGE"
Et bien si la commande ci-dessus est exécutée, j'obtiens à chaque minute les lignes suivantes dans /var/log/mail.log
Nov 18 23:02:04 raspberrypi sSMTP[3250]: Sent mail for root@****************@free.fr (221 2.0.0 Bye) uid=1000 username=pi outbytes=924
Nov 18 23:03:03 raspberrypi sSMTP[3275]: Sent mail for root@****************@free.fr (221 2.0.0 Bye) uid=1000 username=pi outbytes=924
Nov 18 23:04:03 raspberrypi sSMTP[3307]: Sent mail for root@****************@free.fr (221 2.0.0 Bye) uid=1000 username=pi outbytes=924
Pourquoi cette commande curl déclenche l'envoi d'un mail ?
J'suis certainement une grosse burne... mais j'vois pas le rapport !
Pour infos, je vous joins les fichiers de conf. de ssmtp
/etc/ssmtp $ sudo nano ssmtp.conf
#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
#root=domoticz
# 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.free.fr:587
# Where will the mail seem to come from?
#rewriteDomain=free.fr
# The full hostname
hostname=************@free.fr
# 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
#AuthUser=
#AuthPass=
#useSTARTTLS=YES
#useTLS=YES
/etc/ssmtp $ sudo nano 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.
pi:***************@free.fr:smtp.free.fr