Hello community,
I use Mailcow on my Debian Stretch virtual server and it works great in itself - sending email works perfectly via Outlook, Apple Mail and webmail.
But since a previous update (I’m not sure if it was Debian or Mailcow) the sending of emails via the CommandLine on the same server using SSMTP a has stopped working.
The command…
ssmtp recipient_email@example.com
To: recipient_email@example.com
From: myemailaddress@example.com
Subject: test email
hello world!
…returns: ssmtp: Cannot open mail.example.com:587
I have already tested various settings in /etc/ssmtp/ssmtp.conf (TLS on or off, port 25 or 587):
root=myemailaddress@example.com
mailhub=mail.example.com:587
#mailhub=mail.example.com:25
rewriteDomain=mail.example.com
FromLineOverride=YES
#AuthMethod=LOGIN
AuthUser=MYUSER
AuthPass=MYPASS
UseSTARTTLS=YES
#UseTLS=YES
TLS_CA_Dir=/usr/share/ca-certificates/mozilla/
The file /etc/ssmtp/revaliases:
root:myemailaddress@example.com:mail.example.com:587
sax:myemailaddress@example.com:mail.example.com:587
Unfortunately, none of my settings lead to success 😖
The ports:
netstat -tulpn | grep -E -w ‘25|80|110|143|443|465|587|993|995’
tcp6 0 0 :::25 :::* LISTEN 19239/docker-proxy
tcp6 0 0 :::443 :::* LISTEN 988/apache2
tcp6 0 0 :::993 :::* LISTEN 19301/docker-proxy
tcp6 0 0 :::995 :::* LISTEN 19285/docker-proxy
tcp6 0 0 :::587 :::* LISTEN 19201/docker-proxy
tcp6 0 0 :::110 :::* LISTEN 19331/docker-proxy
tcp6 0 0 :::143 :::* LISTEN 19317/docker-proxy
tcp6 0 0 :::80 :::* LISTEN 988/apache2
tcp6 0 0 :::465 :::* LISTEN 19227/docker-proxy
It can be reached via Telnet…
telnet mail.example.com 587
Trying <<IP>>...
Connected to mail.example.com .
Escape character is '^]'.
220 mail.example.com ESMTP Postcow
Sending works via other MTA, but not via SSMTP.
Could someone help me or give helpful tips?
Thanks in advance
sax