Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 26th August 2005, 16:22
Roman Roman is offline
Junior Member
 
Join Date: Aug 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Recompile PHP after Sendmail reconfigured ?

Hi,

Initially couldn't send out mail through my website (php), because sendmail smtp settings default to 127.0.0.1. Thought I fixed that and was confident that sendmail works fine. Now I can send emails out using Evolution, but still can't send out emails through my website.
In sendmail.mc I changed
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
to
DAEMON_OPTIONS(`Port=smtp,Name=MTA')dnl
and did m4 /etc/mail/sendmail.mc > /etc/sendmail.cf after that.
Do I need to recompile PHP to make it work? If yes, are there any special things I need to add to --with options to make this work.

Thanks,
Roman
Reply With Quote
Sponsored Links
  #2  
Old 26th August 2005, 16:28
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,581
Thanks: 792
Thanked 4,980 Times in 3,901 Posts
Default

Quote:
Originally Posted by Roman
Hi,

Initially couldn't send out mail through my website (php), because sendmail smtp settings default to 127.0.0.1. Thought I fixed that and was confident that sendmail works fine. Now I can send emails out using Evolution, but still can't send out emails through my website.
In sendmail.mc I changed
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
to
DAEMON_OPTIONS(`Port=smtp,Name=MTA')dnl
and did m4 /etc/mail/sendmail.mc > /etc/sendmail.cf after that.
Do I need to recompile PHP to make it work? If yes, are there any special things I need to add to --with options to make this work.
Recompilation of PHP is not nescessary. Have you checked you php.ini for the correct mail settings?
Reply With Quote
  #3  
Old 26th August 2005, 16:58
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Quote:
Originally Posted by Roman
Hi,

Initially couldn't send out mail through my website (php), because sendmail smtp settings default to 127.0.0.1. Thought I fixed that and was confident that sendmail works fine. Now I can send emails out using Evolution, but still can't send out emails through my website.
In sendmail.mc I changed
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
to
DAEMON_OPTIONS(`Port=smtp,Name=MTA')dnl
and did m4 /etc/mail/sendmail.mc > /etc/sendmail.cf after that.
Do I need to recompile PHP to make it work? If yes, are there any special things I need to add to --with options to make this work.

Thanks,
Roman

Was sendmail installed when you compiled PHP? If not, PHP's mail() function doesn't work, and you have to re-compile PHP.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #4  
Old 26th August 2005, 17:36
Roman Roman is offline
Junior Member
 
Join Date: Aug 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

FAlko,

Thanks for the answer. As you remember a week or so ago I was struggling with PayFlow Pro and you've been a great help to fix it. Since I reconfigured and recompiled php so many times, I am not really sure if Sendmail was installed or not. Is it possible to see this in phpinfo.php?
Can you please take a look at www.rcbazaar.com/phpinfo.php.
Hope I don't have some really weird stuff in there.

Thanks,

Roman
Reply With Quote
  #5  
Old 26th August 2005, 17:46
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Looks ok. And it also shows the path to sendmail so I guess it had been installed when you compiled PHP. Your problem must be somewhere else...
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 26th August 2005, 20:37
Roman Roman is offline
Junior Member
 
Join Date: Aug 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Falko,

Sendmail was initially installed as a part of FC4 installation where you only have to check "Mail server". Then I recompiled PHP, removed sendmail using yum(because wasn't working) and installed it back using yum.
Is it possible that something was kept from initial install and is now kicking my ass?

Thanks,

Roman
Reply With Quote
  #7  
Old 26th August 2005, 22:33
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,581
Thanks: 792
Thanked 4,980 Times in 3,901 Posts
Default

Quote:
Originally Posted by Roman
Falko,

Sendmail was initially installed as a part of FC4 installation where you only have to check "Mail server". Then I recompiled PHP, removed sendmail using yum(because wasn't working) and installed it back using yum.
Is it possible that something was kept from initial install and is now kicking my ass?
Thats unlikely, but you can try to recompile php now with your working sendmail setup.

Have you tried to set error reporting in PHP to E_ALL, did you get any
PHP errors when you try to send mail? Are there any errors or messages
in the mail log, when you try to send an email with PHP?
Reply With Quote
  #8  
Old 27th August 2005, 03:35
Roman Roman is offline
Junior Member
 
Join Date: Aug 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Now I am really confused. I went to /var/spool/mail/root and found ALL the emails. But all of them had this text::
"The original message was received at Sun, 21 Aug 2005 18:54:11 -0500
from localhost.localdomain [127.0.0.1]

----- The following addresses had permanent fatal errors -----
<tekkpro@yahoo.com>

----- Transcript of session follows -----
<tekkpro@yahoo.com>... Deferred: Connection timed out with mx4.mail.yahoo.com.
Message could not be delivered for 5 days
Message will be deleted from queue

--j7R0rwns001943.1125105963/rcbazaar.com
Content-Type: message/delivery-status

Reporting-MTA: dns; rcbazaar.com
Arrival-Date: Sun, 21 Aug 2005 18:54:11 -0500

Final-Recipient: RFC822; tekkpro@yahoo.com
Action: failed
Status: 4.4.7
Remote-MTA: DNS; mx4.mail.yahoo.com
Last-Attempt-Date: Fri, 26 Aug 2005 20:26:03 -0500

--j7R0rwns001943.1125105963/rcbazaar.com
Content-Type: message/rfc822

Return-Path: <nobody@rcbazaar.com>
Received: from rcbazaar.com (localhost.localdomain [127.0.0.1])
by rcbazaar.com (8.13.4/8.13.4) with ESMTP id j7LNsB88024885
for <tekkpro@yahoo.com>; Sun, 21 Aug 2005 18:54:11 -0500
Received: (from nobody@localhost)
by rcbazaar.com (8.13.4/8.13.4/Submit) id j7LNsBF0024884;
Sun, 21 Aug 2005 18:54:11 -0500
Date: Sun, 21 Aug 2005 18:54:11 -0500
Message-Id: <200508212354.j7LNsBF0024884@rcbazaar.com>
To: tekkpro@yahoo.com
Subject: roman recommends this site
MIME-Version: 1.0
From: "sales@rcbazaar.com" <sales@rcbazaar.com>
Content-type: text/plain; charset=iso-8859-1

Your friend roman (rruperts@yahoo.com) has recommended this site to you.
http://www.rcbazaar.com/proddetail.php?prod=HELI004 "

Hope I understand this correctly. On my website I collect Name, fromEmail, toEmail and the message. When I click send email, which should be sent from "fromEmail" to "toEmail", all I get is a new entry in /var/spool/mail/root.
I would appreciate your help.

Thanks,
Roman
Reply With Quote
  #9  
Old 27th August 2005, 09:17
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,581
Thanks: 792
Thanked 4,980 Times in 3,901 Posts
Default

Quote:
Originally Posted by Roman
Now I am really confused. I went to /var/spool/mail/root and found ALL the emails. But all of them had this text::
"The original message was received at Sun, 21 Aug 2005 18:54:11 -0500
from localhost.localdomain [127.0.0.1]

----- The following addresses had permanent fatal errors -----
<tekkpro@yahoo.com>

----- Transcript of session follows -----
<tekkpro@yahoo.com>... Deferred: Connection timed out with mx4.mail.yahoo.com.
Message could not be delivered for 5 days
Message will be deleted from queue

--j7R0rwns001943.1125105963/rcbazaar.com
Content-Type: message/delivery-status

Reporting-MTA: dns; rcbazaar.com
Arrival-Date: Sun, 21 Aug 2005 18:54:11 -0500

Final-Recipient: RFC822; tekkpro@yahoo.com
Action: failed
Status: 4.4.7
Remote-MTA: DNS; mx4.mail.yahoo.com
Last-Attempt-Date: Fri, 26 Aug 2005 20:26:03 -0500

--j7R0rwns001943.1125105963/rcbazaar.com
Content-Type: message/rfc822

Return-Path: <nobody@rcbazaar.com>
Received: from rcbazaar.com (localhost.localdomain [127.0.0.1])
by rcbazaar.com (8.13.4/8.13.4) with ESMTP id j7LNsB88024885
for <tekkpro@yahoo.com>; Sun, 21 Aug 2005 18:54:11 -0500
Received: (from nobody@localhost)
by rcbazaar.com (8.13.4/8.13.4/Submit) id j7LNsBF0024884;
Sun, 21 Aug 2005 18:54:11 -0500
Date: Sun, 21 Aug 2005 18:54:11 -0500
Message-Id: <200508212354.j7LNsBF0024884@rcbazaar.com>
To: tekkpro@yahoo.com
Subject: roman recommends this site
MIME-Version: 1.0
From: "sales@rcbazaar.com" <sales@rcbazaar.com>
Content-type: text/plain; charset=iso-8859-1

Your friend roman (rruperts@yahoo.com) has recommended this site to you.
http://www.rcbazaar.com/proddetail.php?prod=HELI004 "

Hope I understand this correctly. On my website I collect Name, fromEmail, toEmail and the message. When I click send email, which should be sent from "fromEmail" to "toEmail", all I get is a new entry in /var/spool/mail/root.
I would appreciate your help.

Thanks,
Roman
Yes, this is the spool directory of your MTA (sendmail) where PHP puts your email messages for delivery. This shows us that PHP is working correctly. The errors above show you that yahoo is not accepting the messages from your MTA. Maybe your server is on a DSL line with a dynamic IP? Many large email providers did not accept emails from dynamic IP's anymore.
Reply With Quote
  #10  
Old 27th August 2005, 16:02
Roman Roman is offline
Junior Member
 
Join Date: Aug 2005
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

I have a router sitting on a static IP (216.188.249.98) and server connected to the router and assigned the 192.168.1.2. In order to see my website inside the firewall (router) I have to type 192.168.1.2 and not www.rcbazaar.com. Linksys told me that this is OK, but I really think there must be a way to work around this. Our mail accounts are hosted outside our intranet with a web hosting company, which is also holding our DNS record.
Is it possible that all the problems with sendmail are actually DNS problems and how can I test this?

Appreciate you help !

Roman
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[error] an unkown filter was not added: PHP Arien Installation/Configuration 12 7th October 2006 14:17
PHP not working jefash General 10 28th May 2006 08:48
Cannot compile new PHP with apxs olli Installation/Configuration 11 4th March 2006 15:32
Multiple domains jysse Installation/Configuration 2 10th August 2005 11:22
Apache + PHP lola Server Operation 1 25th April 2005 13:41


All times are GMT +2. The time now is 15:56.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.