I'm trying to get sendmail working. Sending an email to myself, it appears the email is delivered...

May 24 06:55:13 example sendmail[29544]: x4O6tDOL029544:
to=<[email protected]>, [email protected] (0/0),
delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30113,
relay=[] [], dsn=2.0.0, stat=Sent (x4O6tDVt029545
Message accepted for delivery)

But a few minutes later I get errors like this:

May 24 07:27:47 example sm-mta[30712]: x4O74rBD029756:
to=<[email protected]>, ctladdr=<[email protected]> (0/0),
delay=00:22:53, xdelay=00:04:21, mailer=esmtp, pri=210301,
relay=mail.protonmail.ch. [], dsn=4.0.0, stat=Deferred:
Connection timed out with mail.protonmail.ch.

I'm using Debian 9 on a VPS. So far:

  • I set my hostname with hostnamectl
  • changed /etc/hosts (not sure if that helped)
  • Added SPF record
  • Added DKIM record

Solved: It was the ISP. I didn't think of this at first because I have multiple providers and the one I usually use doesn't block port 25. I opened a ticket and now just waiting to reboot. "We have removed the default SMTP block on your account."

2 Answers 2


Your first message only indicates your local sendmail MTA accepting the message for local processing. The second message is about failing to connect to mail.protonmail.ch which is the server indicated by the primary MX record for protonmail.com. That would be the next hop on the mail's path to the destination.

Your VPS provider might be required by local regulating authorities to restrict outgoing unauthenticated SMTP connections in port 25 to the VPS provider's local SMTP servers only, to make sure spammers and email-sending malware can be detected and their traffic stopped as near the source as possible.

In that case, you might have to specify the appropriate outgoing email server as your "smarthost" through which all outgoing email will be sent. This can be done by putting something like this in your /etc/mail/sendmail.mc:


and then regenerating your sendmail.cf (often with cd /etc/mail; make).

You should also be aware of a thing called greylisting: mail servers may, when receiving a connection from a previously unknown source, initially reject the connection/message but remember the IP address it was coming from. A legitimate mail server will try again a few minutes later and will then be accepted; a spammer/malware might just skip to an easier target. After submitting a few valid mail messages in this delayed way, the remote mail server may omit the delay mechanism.

  • It was the VPS provider :-) But the other answer was first.
    – PJ Brunet
    May 24, 2019 at 19:27

Are you SURE your outgoing SMTP connections are not firewalled out (by your ISP)?

Does the command below get SMTP greeting messages (after a few seconds)?
[ Is it sendmail's fault?]

telnet mail.protonmail.ch. 25

  • I'm looking into it. Linode documentation says that it's not blocked. I might have made some newbie mistake. In any case I'm not getting a "greeting message" -- but not getting an error either. I'm reading this now :-) serverfault.com/questions/481448/cannot-telnet-to-port-25
    – PJ Brunet
    May 24, 2019 at 18:50
  • Looks like it was the ISP (forgot that it was with another company and NOT Linode) and I'm opening a ticket now, fingers crossed :-D
    – PJ Brunet
    May 24, 2019 at 19:20
  • I would mark both answers correct, but you were first :-)
    – PJ Brunet
    May 24, 2019 at 19:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .