linux sendmail doesn't work (stat=deferred)
I think I solved my problem by
- Using port 587 instead of 465, thanks to the hint of Andrzej
- Specifying the sender mail, because my hoster strato was denying mails that are not authenticated (in my case [email protected])
So, sending a test mail with this command worked
mail -s "Some random subject" -a "From: [email protected]" [email protected]
Don't forget to send the final mail by hitting [ctrl] + [d]
Related videos on Youtube
pixelmusic
Updated on September 18, 2022Comments
-
pixelmusic over 1 year
I have set up an linux webserver on my raspberry pi and now want the server be able to send emails without configuring a complete mailserver.
Thats why I have chosen the MTA 'sendmail', which I'm trying to configure correctly for days now.
In my
/etc/mail/sendmail.mc
I have added these lines:define(`SMART_HOST',`[smtp.strato.de]')dnl define(`RELAY_MAILER_ARGS', `TCP $h 465')dnl define(`ESMTP_MAILER_ARGS', `TCP $h 465')dnl define(`confAUTH_OPTIONS', `A p')dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl FEATURE(`authinfo',`hash -o /etc/mail/authinfo/auth.db')dnl
In my hashed
/etc/mail/authinfo/auth
I haveAuthInfo: "U:root" "I:[email protected]" "P:mypassword"
But sending a test email like this
echo "Just testing my sendmail relay" | mail -s "Sendmail Relay" [email protected]
doesn't give me any errors but still never arrived the recipient.
Let's check my
/var/log/mail.log
Mar 30 14:35:02 localhost sm-mta[2375]: v2UCKHOT002349: to=<[email protected]>, ctladdr=<[email protected]> (0/0), delay=00:14:45, xdelay=00:02:00, mailer=relay, pri=300405, relay=smtp.strato.de. [81.169.145.133], dsn=4.0.0, stat=Deferred: Connection reset by smtp.strato.de. Mar 30 14:35:02 localhost sm-mta[2375]: v2UAPG9t014829: to=<[email protected]>, ctladdr=<[email protected]> (0/0), delay=02:09:46, xdelay=00:00:00, mailer=relay, pri=1380405, relay=smtp.strato.de., dsn=4.0.0, stat=Deferred: Connection reset by smtp.strato.de. Mar 30 14:35:02 localhost sm-mta[2375]: v2UAHJSs014703: to=<[email protected]>, ctladdr=<[email protected]> (0/0), delay=02:17:43, xdelay=00:00:00, mailer=relay, pri=1470405, relay=smtp.strato.de., dsn=4.0.0, stat=Deferred: Connection reset by smtp.strato.de.
What does
stat=Deferred: Connection reset by smtp.strato.de.
mean?What can I do to finally solve my sending-email-problem?
I'm thankful for any hint!