I'm trying to setup ssmtp (for sendmail) in Docker image.
To do so I've created the folowing Dockerfile:
FROM php:7.4-apache
# Install paquet requirements
RUN set -ex; \
# Install required system packages
apt-get update; \
apt-get install -qy --no-install-recommends \
ssmtp \
mailutils \
; \
# Clean aptitude cache and tmp directory
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*;
As you can see I have installed ssmtp and mailutils.
My /etc/ssmtp.conf file contains all credentials that I can log into my account using standard mail client:
root=serwer@mydomain.com
mailhub=mail.mydomain.com:587
AuthUser=serwer@mydomain.com
AuthPass=PASS_HERE
FromLineOverride=YES
UseTLS=YES
#UseSTARTTLS=YES
Debug=YES
hostname=OVERRIDEN_HOSTNAME
From some reason mail is not sent. I'm tying with sendmail
command:
sendmail my_email@example.com
Subject: aaa
aaa
CTRL+d
and getting error:
sendmail: Authorization failed (535 Incorrect authentication data)
Even Debug=YES
is set, I do not see any log under /var/log
regarding sendmail.
Do you have any thought what might be wrong?
Thank you all!