Mail slow and timeout is due to sendmail slow, but sendmail slow and how to solve it?
The first step: Of course, check the log:
Vim/var/log/maillog
June 5 23:26:20 localhost sendmail[1206]: My unqualified host name (localhost) unknown; Sleeping for retry
June 5 23:27:20 localhost sendmail[1206]: Unable to qualify I own domain name (localhost)--Using short name
June 5 23:27:20 localhost sendmail[1206]: r65frkmm001206:from=nobody, size=187, Class=0, Nrcpts=1, msgid=<20130705152 7.r65frkmm001206@localhost> a relay=nobody@localhost.
June 5 23:27:20 localhost sendmail[1207]: r65frkba001207:from=<nobody@localhost>, size=398, Class=0, Nrcpts=1, MSG Id=<201307051527.r65frkmm001206@localhost>, PROTO=ESMTP, Daemon=mta, Relay=localhost [127.0.0.1]
June 5 23:27:20 localhost sendmail[1206]: r65frkmm001206:to=aaa@gmail.com, Ctladdr=nobody (99/99), delay=00:00:00, Xdela y=00:00:00, Mailer=relay, pri=30187, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=sent (r65frkba001207 message Accepted for delivery)
June 5 23:27:22 localhost sendmail[1209]: starttls=client, relay=gmail-smtp-in.l.google.com, Version=tlsv1/sslv3, Verify=fail, Cipher=rc4-sha, bits=128/128
June 5 23:27:25 localhost sendmail[1209]: r65frkba001207:to=<aaa@gmail.com>, ctladdr=<nobody@localhost> ( 99/99), delay=00:00:05, xdelay=00:00:05, MAILER=ESMTP, pri=120398, relay=gmail-smtp-in.l.google.com. [74.125.129.26], dsn=2.0.0, stat=sent (OK 1373038045 qn3si5112247pbc.62-gsmtp)
June 5 23:30:01 localhost sendmail[1212]: My unqualified host name (localhost) unknown; Sleeping for retry
Step two: Add a domain name to the hosts table
#hostname
Vim/etc/hosts
Add as follows
:: 1 localhost localhost.localdomain localhost6 localhost6.localdomain6 your domain name
If it doesn't work out the way it is,
Check that the php.ini settings are correct
Cat/etc/php.ini | grep Sendmail_path
The right result should be something like this.
Sendmail_path = Sendmail-t-I.
Check if the SendMail is installed
Which SendMail
Normal results should look like this.
/usr/sbin/sendmail
If the path above does not find SendMail
Check to see if the package is installed
Yum List Installed | grep sendmail