[KLUG Members] Mail from PHP -- solved

Robert G. Brown members@kalamazoolinux.org
Mon, 19 Apr 2004 14:27:57 -0400


Thanks to all who gave tips and pointers. I was following a different 
approach in my efforts, Tand got something to work early this morning.
It seems that the crux of this problem is that someone (Apache PHP 
module? Apache? PHP itself?) takes the hostname part of the mail address
from the first dotted name that appears in /etc/hosts. I switched around 
that file so that it looks
like...

xx.yy.zz.tt	hostname.mydomain.com
127.0.0.1       localhost localhost.locldomain lo
....

And the mail was then sent out by apache@hostname.mydomain.com. Since
I used a name there that was properly configured in DNS, charter.net
accepted it.

Note to Adam: Mail had been sent from this server to other MTA's before
this whole thing came up. Apparently those are not doing the sort of 
checking that charter.net is doing.

Note to Bill H:  I will try your suggestions since they look more 
stable than my solution, which works ok, but is not too general and
seems a bit flakey.

						Regards,
						---> RGB <---