Unable to send mail using sendmail, getting timed out error in maillog


Hi All

We are using sendmail for email notifications in centos 7, we observed that, there are many pending mails in mailq. In the maillog, it says " Deferred: Connection timed out with aspmx3.googlemail.com".

i ran “sendmail -v -q” to flush the pending mails, but no use. Please help me in this issue.



can you plz share what you configured in your configuration file sendmail.mc
and also once check your dns entries in /etc/resolve.conf

If you want to flush the mail queue just follow the below steps

# cd /var/spool/mqueue/
# ls
# rm *


Hi Raghu,

We didn’t edit sendmail.mc file, it has the default entries, and it is observed that, when we run “sendmail -q” command, all the mails are going at a time.


Did you configured MX server host name or ip in sendmail configuration file…?

if not, then add the mx sever ip in sendmail.mc and restart the sendmail service

#vim /etc/mail/sendmail.mc

dnl # be sent out through an external mail server:
dnl #
dnl define(SMART_HOST',’[XX.XX.XX.XX]’)dnl
dnl #
define(confDEF_USER_ID', ``8:12'')dnl dnl define(confAUTO_REBUILD’)dnl

save the file restart the service

#/etc/init.d/sendmail restart

without configuring send mail you are not allowed to send mails from your server.

Problem in send email notification for ssh root login


It looks like that you are having with DNS, or you did not add SPF record to your DNS management.
Hope this help.

(I’m using postfix as MTA on CentOS 6.6, it runs good)