I have a VPS (Debian) on which I am using sendmail. Problem is sendmail takes a lot of time to actually send email. I searched and found many people are facing same issue and everyone suggested to write following line in hosts file which I have done but still same problem. localhost localhost.localdomain myhostname

Even if I use following in hosts, problem remains the same. localhost localhost.localdomain myhostname localhost localhost.localdomain myhostname

By the way that is my VPS IP (this is not real IP just dummy one)


Aug 10 09:34:43 localhost sendmail[411]: v7BCXh8B100411: from=root, size=15, class=0, nrcpts=1, msgid=<[email protected]>, relay=root@localhost

Aug 10 09:34:43 localhost sm-mta[412]: v7BCXh8B100412: from=, size=316, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=localhost.localdomain []

Aug 10 09:35:47 localhost sm-mta[412]: STARTTLS=client, relay=gmail-smtp-in.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128

Aug 10 09:35:47 localhost sm-mta[412]: v7BCXh8B100412: to=, ctladdr= (0/0), delay=00:01:04, xdelay=00:01:04, mailer=esmtp, pri=30316, relay=gmail-smtp-in.l.google.com. [209.xxx.xxx.xxx], dsn=2.0.0, stat=Sent (OK 1502372147 a130si3247433qkg.282 - gsmtp)

Aug 10 09:35:47 localhost sendmail[411]: v7BCXh8B100411: [email protected], ctladdr=root (0/0), delay=00:01:04, xdelay=00:01:04, mailer=relay, pri=30015, relay=[] [], dsn=2.0.0, stat=Sent (v7BCXh8B100412 Message accepted for delivery)

  • Do you see anything in your logs when an email is sent? Have you looked at a strace or packet capture to see what happening between the message being submitted mta, and the attempt to deliver?
    – Zoredache
    Aug 9, 2017 at 19:29
  • How long EXACTLY does it take? EXACT delay in seconds may give some hints.
    – AnFi
    Aug 9, 2017 at 19:52
  • Please provide log output (/var/log/maillog or /var/log/mail.log)
    – Mike B
    Aug 9, 2017 at 23:48
  • @AndrzejA.Filip takes 1 minute Aug 10, 2017 at 13:37
  • 1
    Is it exactly 60 seconds? [75s typical DNS timeout, 60s = 2 * 30s ident lookup timeout e.g. by tcpwrapers]
    – AnFi
    Aug 10, 2017 at 18:58

1 Answer 1


Simply insert your real FQDN to /etc/mail/sendmail.cf, started with Dj, so like this: "Djmymachine.mydomain.tld" and restart sendmail.

You must log in to answer this question.

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