note 92527 added to function.mail
| From: | php at caves dot org dot uk | Date: | Tue, 28 Jul 2009 14:12:40 +0000 |
| Subject: | note 92527 added to function.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-158822@lists.php.net to get a copy of this message | ||
Problem: mail disappearing; not being sent
There are many reasons why your mail might fail to be sent, but one particularly obscure reason is
as follows.
You must take extra care if the machine that is sending the mail also operates mail forwarding for
your domain and you are sending mail to a user at that domain. In this situation, it is common for
the MTA to avoid doing a "proper" MX look-up because it "knows" that there is a
local list of mail-forwarding rules. This saves resources, and normally shouldnt be a problem, of
course.
HOWEVER, if you deliberately alter your MX record to point to a mail server hosted elsewhere and,
e.g. update your mail forwarding rules at that location, AND the server that sends your
PHP-generated mail "decides" that it will save resources by not checking the MX record
THEN it will use your old set of forwarding rules because it is ignoring your MX record.
If an appropriate forwarding rule does not exist locally, then the mail may be dropped without
generating any error (i.e. no "bounce" message).
The symptom of the problem is that mail to certain users at your domain will be wrongly delivered or
not delivered at all.
An obscure problem, perhaps, but one that I have experienced, and which took a long time to solve!
----
Server IP: 87.124.35.190
Probable Submitter: 83.104.168.235
----
Manual Page -- http://www.php.net/manual/en/function.mail.php
Edit -- https://master.php.net/note/edit/92527
Del: integrated -- https://master.php.net/note/delete/92527/integrated
Del: useless -- https://master.php.net/note/delete/92527/useless
Del: bad code -- https://master.php.net/note/delete/92527/bad+code
Del: spam -- https://master.php.net/note/delete/92527/spam
Del: non-english -- https://master.php.net/note/delete/92527/non-english
Del: in docs -- https://master.php.net/note/delete/92527/in+docs
Del: other reasons-- https://master.php.net/note/delete/92527
Reject -- https://master.php.net/note/reject/92527
Search -- https://master.php.net/manage/user-notes.php