Solved

PHP sendmail messages disappear

Posted on 2010-11-09
7
412 Views
Last Modified: 2012-05-10
This is continuation of another question asked a couple of days ago. I was originally getting errors when trying to submit from a contact form. As suggested by one of the experts I installed postfix on the Ubuntu 10.04 server and I stopped getting the error page. Now after modifying the php.ini file for apache as suggested I still don't receive any messages. I uncommented the Unix sendmail line and added the path to sendmail with the -t and -i flags but I still don't get any messages or errors. I also checked the mail.err file and don't see any errors.
0
Comment
Question by:jdcreece
  • 4
  • 2
7 Comments
 
LVL 5

Expert Comment

by:tiago_aviz
ID: 34098396
There aren't any errors, but does the log mail.log show that the emails are being received in postfix from php?

Second question: can your server resolve the mx records for any given destination email address? E.g.: dig mx hotmail.com show any results that locate the mx records?

Third question: is your server allowed to connect on outbound servers on the 25 port in order to deliver mails?
0
 

Author Comment

by:jdcreece
ID: 34098516
Right after postfix install I see where I received the messages in the var/mail directory, but didn't get to my real mail server. That was before I modified the php.ini. I have since reverted the php and don't see any change.

Dig pulls up correct dns info.

I can connect to my real mail server from the webserver on port 25. They are on the same subnet.
0
 
LVL 5

Accepted Solution

by:
tiago_aviz earned 500 total points
ID: 34098528
Can you dig dns records for the destination email address? If you can, it means something is still incorrect on php.
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

by:jdcreece
ID: 34098623
Yes
0
 
LVL 10

Expert Comment

by:TRW-Consulting
ID: 34099407
You say you have received some messages in /var/mail.  Can you look at them to see what's in there?  There may be some bounce messages that can point to the solution.  If so, post what the errors are.
0
 

Author Closing Comment

by:jdcreece
ID: 34099988
It ended up being the domain I chose to send the mail to in the contactengine script and when setting up postfix (I have them set the same.) In the future I will make sure to choose a different domain than the one I am sending to. The web server isn't going to be used as a mail server other than php functions. I guess I need to make sure I shore the sucker up now to make sure it's not abused by spammers.
0
 

Author Comment

by:jdcreece
ID: 34099993
TRW, I didn't see any bounce messages just the ones I submitted from the contact form on the site.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

Suggested Solutions

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now