Sendmail stopped working last week (Deferred: Connection timed out)
Hello all,
I'm on linux mint 17 and I can't seem to use sendmail anymore while logged into PIA. Sending mail to the same email addresses via my mail client (thunderbird) works just fine. I have some cron jobs setup to email me their status' or any errors that might have occurred. I've been doing this while logged into PIA for years without issue. I get an email every morning so I was pretty concerned when I didn't receive one on 2-14 (and I haven't gotten on since). so after some playing around this weekend (trying different config values, reading the logs, trying different email addresses including gmail) I figured out that I'm unable to send mail via sendmail while logged into PIA. if I disconnect from PIA sendmail will send all the mail in the cue and anything new mails that I send.
Here is a simple test that I was using which tries to send a test email every 2mins (crontab -e):
[email protected]
*/2 * * * * echo testing sendmail
and yes I've tried other emails even a gmail so I don't think it's a whitelisting issue.
mail log:
Feb 18 11:32:01 localhost sendmail[23364]: w1IGW1uG023364: from=tomjane, size=323, class=0, nrcpts=1, msgid=<[email protected]>, [email protected]
Feb 18 11:32:07 localhost sm-mta[23365]: w1IGW1U5023365: from=, size=601, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Feb 18 11:32:07 localhost sendmail[23364]: w1IGW1uG023364: [email protected], ctladdr=tomjane (1000/1000), delay=00:00:06, xdelay=00:00:06, mailer=relay, pri=30323, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (w1IGW1U5023365 Message accepted for delivery)
Feb 18 11:36:07 localhost sm-mta[23375]: w1IGW1U5023365: to=, ctladdr= (1000/1000), delay=00:04:01, xdelay=00:04:00, mailer=esmtp, pri=120601, relay=mail.protonmail.ch. [185.70.40.101], dsn=4.0.0, stat=Deferred: Connection timed out with mail.protonmail.ch.
From the logs above you can see that in this case I was trying to send to an email I have with protonmail but I've tried my work email and also a gmail address. If I log out of PIA the mail is sent as it had earlier last week. any help would be appreciated.
Comments
Hello all,
I'm on linux mint 17 and I can't seem to use sendmail anymore while logged into PIA. Sending mail to the same email addresses via my mail client (thunderbird) works just fine. I have some cron jobs setup to email me their status' or any errors that might have occurred. I've been doing this while logged into PIA for years without issue. I get an email every morning so I was pretty concerned when I didn't receive one on 2-14 (and I haven't gotten on since). so after some playing around this weekend (trying different config values, reading the logs, trying different email addresses including gmail) I figured out that I'm unable to send mail via sendmail while logged into PIA. if I disconnect from PIA sendmail will send all the mail in the cue and anything new mails that I send.
Here is a simple test that I was using which tries to send a test email every 2mins (crontab -e):
and yes I've tried other emails even a gmail so I don't think it's a whitelisting issue.
mail log:
Feb 18 11:32:01 localhost sendmail[23364]: w1IGW1uG023364: from=tomjane, size=323, class=0, nrcpts=1, msgid=<[email protected]>, [email protected]
Feb 18 11:32:07 localhost sm-mta[23365]: w1IGW1U5023365: from=<[email protected]>, size=601, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Feb 18 11:32:07 localhost sendmail[23364]: w1IGW1uG023364: [email protected], ctladdr=tomjane (1000/1000), delay=00:00:06, xdelay=00:00:06, mailer=relay, pri=30323, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (w1IGW1U5023365 Message accepted for delivery)
Feb 18 11:36:07 localhost sm-mta[23375]: w1IGW1U5023365: to=<[email protected]>, ctladdr=<[email protected]> (1000/1000), delay=00:04:01, xdelay=00:04:00, mailer=esmtp, pri=120601, relay=mail.protonmail.ch. [185.70.40.101], dsn=4.0.0, stat=Deferred: Connection timed out with mail.protonmail.ch.
From the logs above you can see that in this case I was trying to send to an email I have with protonmail but I've tried my work email and also a gmail address. If I log out of PIA the mail is sent as it had earlier last week. any help would be appreciated.
For posterity for other users: PIA doesn't allow outbound connections on port 25 (SMTP) at all because it is widely use for spam. In order to send emails, you must use submission ports 465 or 587 from your email provider (and potentially request your server to be whitelisted by support).
Turns out @bpdp used a custom configuration before to handle this situation and the reason it stopped working is the configuration somehow got reset, bringing back the port 25 issue.