Page 1 of 1

problem between php and sendmail

Posted: Sat Dec 20, 2003 1:53 pm
by bouboul
Hi, I have been trying to get PHP to send out using my Sendmail configuration and it's not happening., while in my php.ini i can see that php is configured in such a way that it should work with sendmail (sendmail_path = /usr/sbin/sendmail -t -i)

in maillog i'm getting :


Dec 28 11:54:08 dyn-10-213 sendmail[1633]: hBS9s8GJ001633: from=apache, size=62, class=0, nrcpts=1, msgid=<200312280954.hBS9s8GJ001633@dyn-10-213.nur.local>, relay=apache@localhost
Dec 28 11:54:08 dyn-10-213 sendmail[1635]: hBS9s8r7001635: SYSERR(root): hash map "Alias0": unsafe map file /etc/aliases.db:
Permission denied
Dec 28 11:54:08 dyn-10-213 sendmail[1635]: hBS9s8r7001635: from=<apache@dyn-10-213.nur.local>, size=340, class=0, nrcpts=1, msgid=<200312280954.hBS9s8GJ001633@dyn-10-213.nur.local>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Dec 28 11:54:08 dyn-10-213 sendmail[1633]: hBS9s8GJ001633: to=root@dyn-10-213.nur.local, ctladdr=apache (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30044, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (hBS9s8r7001635 Message accepted for delivery)
Dec 28 11:54:08 dyn-10-213 sendmail[1636]: hBS9s8r7001635: SYSERR(root): hash map "Alias0": unsafe map file /etc/aliases.db:
Permission denied
Dec 28 11:54:08 dyn-10-213 sendmail[1636]: hBS9s8r7001635: to=<root@dyn-10-213.nur.local>, ctladdr=<apache@dyn-10-213.nur.local> (48/48), delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30576, dsn=5.3.0, stat=unknown mailer error 1
Dec 28 11:54:08 dyn-10-213 sendmail[1636]: hBS9s8r7001635: hBS9s8r7001636: DSN: unknown mailer error 1
Dec 28 11:54:08 dyn-10-213 sendmail[1636]: hBS9s8r7001636: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31600, dsn=5.3.0, stat=unknown mailer error 1
Dec 28 11:54:08 dyn-10-213 sendmail[1636]: hBS9s8r7001636: hBS9s8r8001636: return to sender: unknown mailer error 1
Dec 28 11:54:08 dyn-10-213 sendmail[1636]: hBS9s8r8001636: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32624, dsn=5.3.0, stat=unknown mailer error 1
Dec 28 11:54:08 dyn-10-213 sendmail[1636]: hBS9s8r7001636: Losing ./qfhBS9s8r7001636: savemail panic
Dec 28 11:54:08 dyn-10-213 sendmail[1636]: hBS9s8r7001636: SYSERR(root): savemail: cannot save rejected email anywhere




here are the code i've writtten :

<?php
$to = "root@dyn-10-213.nur.local";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
if (mail($to, $subject, $body))
{
echo("<p>Message sent!</p>");
}
else
{
echo("<p>Message delivery failed...</p>");
}
?>

how can i solve this problem ?

Posted: Sat Dec 20, 2003 2:16 pm
by Derfel Cadarn
Have you tried it using an existing e-mail-adress instead of that root@dyn-10-213.nur.local address?
Or have you tried it from an external server (I mean: not being your own pc)?

And do you promise you're not developing a spam-script? :D