php mail() function not working

Keith Mastin kmastin-PzQIwG9Jn9VAFePFGvp55w at public.gmane.org
Mon Oct 6 23:31:43 UTC 2003


> On Sun, 2003-10-05 at 17:25, Keith Mastin wrote:
>> redhat-7.3
>> apache-1.3.27-3
>> php-4.1.2
>
>> Here's the code:
>> contact.php:
>> <?php
>> mail("info-PzQIwG9Jn9VAFePFGvp55w at public.gmane.org",
>> "Contact form test",
>> "$comments"
>> );
>
> This is a long shot, but maybe you need a valid From header, given in
> the fourth argument to mail()?  I've read that some MTA's puke if they
> don't get it, though it doesn't really jive with your log entry.

As it turned out, it had nothing to do with the code. Postfix-2.0.15
wasn't accepting mail from apache, failing with a permission error to
write to the postdrop directory. We mucked around with it for a while, and
finally came to the conclusion that the only way for this to work now is
to add the user apache to the postfix and postdrop groups. I'm still
unsure of all the security implications here, but I'm sure there will be
something.

In the end, I compiled php-4.3.2 from sources as it's not available for
this version of redhat. I got an updated php version and a questionable
permissions configuration out of the deal.



--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list