Ubuntu 18.04 ssmtp is running, and following command works correctly:
echo "This is a test" | mail -s "test subject" username@gmail.com
username@gmail.com receives the message via gmail, but message appears to be from root@[servername] which surprisingly the SMTP gateway is OK with. But when logcheck runs, I get an error:
Jun 15 18:02:03 [servername] sSMTP[13901]: 550 5.1.0 <logcheck@> invalid address 'logcheck@'
Jun 15 18:02:03 [servername] sSMTP[13901]: SSL connection using ECDHE_RSA_AES_256_GCM_SHA384
Jun 15 18:02:02 [servername] sSMTP[13901]: Creating SSL connection to host
So how do I convince logcheck to send as "logcheck@servername" instead of just "logcheck@" ??
ETA:
Everything in logcheck.conf is commented out except:
REPORTLEVEL="server"
SENDMAILTO="[myemail]@gmail.com"
MAILASATTACH=0
FQDN=1
TMP="/tmp"
ssmtp
is deprecated. If so, trymsntp
. I find it easier to use with gmail. – user68186 Jun 16 '22 at 19:45