mail() fails - php4, sendmail, suse



I've spent a couple of days on this and I'm to the "bang-my-head
'gainst the monitor and babble in tongues" mode.

First - SuSE Pro 9.3, Linux 2.6.11.4-21.7, Apache 2.0.53, PHP 4.3.10

I have sendmail running on the local server - mail from unix (1) mail
and mutt work locally on the server. This is, specifically, sending
mail to a localhost user or another user off on the net somewhere
works fine.

When I try either simple, or complex, mail() functionality via PHP, it
silently fails. And, by silently, I mean that there are no error
messages in the PHP log (logging of all messages is enabled), sendmail
log, or /var/log/messages or /var/log/warnings. The mail() returns a
FALSE indicating that the php->sendmail handoff never occurs. I've
even tried forcing the return address but that's not working either.
Stable applications, like OSCommerce for example, also fail under this
configuration.

/etc/php.ini is correctly configured and the sendmail_path is defined
correctly. As a matter of fact, the results are the same whether or
not sendmail_path is implicitly or explicitly configured. Currently:

; For Unix only. You may supply arguments as well (default: "sendmail
-t -i").
sendmail_path = '/usr/sbin/sendmail -t -i'
....
safe_mode = Off

I've tried mutltiple sendmail configurations but this was a waste of
time for the reason that sendmail is never seeing the email handoff
from php.

This was working under my 9.2 install - but w/the upgrade to 9.3, it is
failing again. I say "again" because when I upgraded to 9.2 from 9.1,
it failed and my mature-memory(tm) has prevented me from recalling what
exactly I did to address the issue.

Google'ing has turned up a lot of ideas, but no solution and it would
appear that I'm not the only one suffering with this problem.

Thanks in advance...I need this functionality in OSCommerce, but I
figure that, whatever is causing the little dink scripts to fail, is
also causing the big-bore scripts to fail. Figure out what's causing
the little guy to barf on his shoes and I should have the solution,
right?

--Mike

example (failing) code using mail():
$msg = "whatever\n";

$msg .= "Sender's Name:
$sender\n";
$msg .= "Sender eMail:
$email\n";
$msg .= "Message:
$message\n\n";

$to = "mike@xxxxxxxxxxx";
$subject = "shallop.com
feedback email";
$mailheaders = "From:
Shallop.com Website\n";
$mailheaders .= "Reply-To:
$email\n\n";
$ret =
mail($to,$subject,$msg,$mailheaders);
echo "mail() returned: " .
($ret? "TRUE" : "FALSE");
--> always returns FALSE
--> in debugging, I successfully return (display) all variables used in
mail():

mail() returned: FALSE
To: mike@xxxxxxxxxxx
Subject: shallop.com feedback email
Msg: eMail Successfully Sent - Thank you! Sender's Name: mike Sender
eMail: foo@xxxxxxx Message: test for displaying form vars.
Headers: From: Shallop.com Website Reply-To: foo@xxxxxxx

.



Relevant Pages

  • No AUTH available / No secret found in database
    ... We are using Sendmail 8.13.4/8.13.4 and Cyrus-SASL 2.1.19. ... authentication configuration information to the .mc file, ... Somehow, I managed to add something else to the configuration, either ... dnl # General defines ...
    (comp.mail.sendmail)
  • Re: sendmail configuration
    ... While you have the generics enabled this is effected by the masquerading functions. ... Most complex sendmail configurations are done through the proper configuration of the cascading rules. ... Hence why you will get better results with the sendmail lists. ...
    (freebsd-questions)
  • Re: Help - Stalled Swing Migration
    ... windows event viewer. ... Secure Web Configuration ... I've never had this wizard fail on me before. ... event log that's relevant and I include below the later part of the ceiw ...
    (microsoft.public.windows.server.sbs)
  • Re: We need a new subject- bug fixes
    ... you install fedora. ... Sendmail does give you the opportunity to use a pre-built configuration. ... machines are not going to be an Internet mail server. ...
    (Fedora)
  • Re: We need a new subject- bug fixes
    ... you install fedora. ... If we haven't established yet that email isn't very useful unless some machines accept mail over the network, let's do that now to make it clear that is a needed configuration choice. ... And this relates to how easy it is to change the sendmail ... machines are not going to be an Internet mail server. ...
    (Fedora)