ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Configuring sendmail on Jaguar
Subject:   Help please ! Probably very simple
Date:   2002-09-28 08:33:58
From:   propix99
Hello everyone,


Firts I would like to thank every contributor of this site. Numerous time I found the answer I was looking for in either MacDecCenter articles or Forums. Thanks to all of you !


I've configure Sendmail according to this article, and everything seems fine. Using the console, I am able to send email without any issue :


MAIL LOG :
Sep 28 10:57:49 propix sendmail[477]: gethostbyaddr(192.168.1.102) failed: 3
Sep 28 10:57:49 propix sendmail[477]: g8SEvnTN000477: from=propix, size=85, class=0, nrcpts=1, msgid=<200209281457.g8SEvnTN000477@propix.homeip.net>, relay=propix@localhost
Sep 28 10:57:51 propix sendmail[479]: g8SEvnTN000477: to=propix99@yahoo.com, ctladdr=prop (501/20), delay=00:00:02, xdelay=00:00:02, mailer=esmtp, pri=30059, relay=mx2.mail.yahoo.com. [64.157.4.82], dsn=2.0.0, stat=Sent (ok dirdel)


I am having some problem when PHP is using Sendmail . I use the following to test :


<?
$fd=popen("/usr/sbin/sendmail -t","w");
fputs($fd, "To: propix99@yahoo.com");
fputs($fd, "From: admin@propix.homeip.net");
fputs($fd, "Subject: Test Message From Propix");
fputs($fd, "X-Mailer: PHP4");
fputs($fd, "Testing.");
pclose($fd);
?>


and the email never reach it's destination. The mail log is as follow :


Sep 28 11:19:18 propix sendmail[483]: gethostbyaddr(192.168.1.102) failed: 3
Sep 28 11:19:18 propix sendmail[483]: g8SFJI4A000483: from=www, size=112, class=0, nrcpts=0, msgid=<200209281519.g8SFJI4A000483@propix.homeip.net>, relay=www@localhost


I believe the problem is from the relay ("relay=propix@localhost" , succesfull from the console vs "relay=www@localhost" not successfull from PHP)


I understand that the "www" is set in the apache configuration , but even changing it to an existing user does not do the trick.


Any suggestion would be greatly appreciated


Thanks !