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=<201708101334.v7BCXh8B000411@localhost.localdomain>, relay=root@localhost

Aug 10 09:34:43 localhost sm-mta[412]: v7BCXh8B100412: from=, size=316, class=0, nrcpts=1, msgid=<201708101334.v7BCXh8B100411@localhost.localdomain>, 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: to=test_email@gmail.com, 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 '17 at 19:29
  • How long EXACTLY does it take? EXACT delay in seconds may give some hints. – AnFi Aug 9 '17 at 19:52
  • Please provide log output (/var/log/maillog or /var/log/mail.log) – Mike B Aug 9 '17 at 23:48
  • @AndrzejA.Filip takes 1 minute – Frank Martin Aug 10 '17 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 '17 at 18:58

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.