I wish to set up sending email from my vps - and I
have been testing
php's mail facility.
PHP mail() function by default just wrappers to sendmail; have you
checked your VPS's MTA logs to see the attempted mail deliveries.
Mail to two of my addresses (@googlemail.com, and
@ntlworld.com) work
just fine. Three out of three got through - all within 2 or 3 seconds.
Mail to my preferred address - this one - is not being delivered,
although the call to mail returns true. (three out of three lost).
Yes, as your sendmail / local MTA has accepted the email; so the issue
looks like is downstream of PHP.
The server handling my incoming mail, is running on my
firewall, with a
"dynamic" IP address, and thus the IP is in various black lists. Could
this be the reason for the non-delivery? Seems a long-shot to me. Why
should bitfolk care?
Errm ...
ianhobson.co.uk mail is handled by 5 jupiter.ianhobson.co.uk.
... but the TTL for that host is 3600 (one hour); if this is a dynamic
IP it probably should be a LOT smaller than that (typically 60 seconds
for most DynDNS services). As if you change IPs you might be trying to
relay emails to the old IP for up to an hour ... not good.
As far a I know (definitely depends on the individual setup)
blocklists tend work the other way around, blocking emails from
dynamic sources rather than not submitting to them. This might present
you with issues when trying to send emails from your jupiter server;
but not accepting from others.
Any other reason I could check out?
Look at the MTA logs at both ends or tcpdump SMTP traffic to see if
the servers are correctly talking to each other.
~Mat