Linux under the PHP mail or sendmail send mail slow solution

Source: Internet
Author: User
Tags dsn

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&gt, 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.