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
[email protected]
mailhub=mail.infomaniak.com:587
[email protected]
AuthPass=PASS
UseTLS=YES
UseSTARTTLS=YES
Debug=YES
Into revaliases i've got :
www-data:[email protected]:mail.infomaniak.com:587
root:[email protected]: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 "[email protected]" >> /etc/ssmtp/ssmtp.conf \
&& echo "mailhub=mail.infomaniak.com:587" >> /etc/ssmtp/ssmtp.conf \
&& echo "[email protected]" >> /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:[email protected]: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 !