I've configured SSMTP to send mail, but the problem is that i can't send mail from my webserver and there is no logs in /var/log
. Sometimes, i've got Sender mismatch
in apache logs.
My config : Debian 11, and webserver into a Docker container.
This is my config of SSMTP :
hostname=domain.fr
root=no-reply@domain.fr
mailhub=mail.infomaniak.com:587
AuthUser=no-reply@domain.fr
AuthPass=PASS
UseTLS=YES
UseSTARTTLS=YES
Debug=YES
Into revaliases i've got :
www-data:no-reply@domain.fr:mail.infomaniak.com:587
root:no-reply@domain.fr:mail.infomaniak.com:587
EDIT : This is the part in my Dockerfile where I install and configure SSMTP :
&& apt -y install ssmtp mailutils \
&& echo "hostname=domain.fr" > /etc/ssmtp/ssmtp.conf \
&& echo "root=no-reply@domain.fr" >> /etc/ssmtp/ssmtp.conf \
&& echo "mailhub=mail.infomaniak.com:587" >> /etc/ssmtp/ssmtp.conf \
&& echo "AuthUser=no-reply@domain.fr" >> /etc/ssmtp/ssmtp.conf \
&& echo "AuthPass=" >> /etc/ssmtp/ssmtp.conf \
&& echo "UseTLS=YES" >> /etc/ssmtp/ssmtp.conf \
&& echo "UseSTARTTLS=YES" >> /etc/ssmtp/ssmtp.conf \
&& echo "Debug=YES" >> /etc/ssmtp/ssmtp.conf \
&& echo "www-data:no-reply@domain.fr:mail.infomaniak.com:587" >> /etc/ssmtp/revaliases
For information, in CLI i can send emails while i'm on root account.
What could be my problem ?
Thanks for your help !