Solved

PHP sendmail messages disappear

Posted on 2010-11-09
7
421 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
Connect further...control easier

With the ATEN CE624, you can now enjoy a high-quality visual experience powered by HDBaseT technology and the convenience of a single Cat6 cable to transmit uncompressed video with zero latency and multi-streaming for dual-view applications where remote access is required.

 

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Link failure 16 60
check mysql insert 12 38
EditableGrid how to fetch rows from MySql in php 14 44
Convert php array to comma seperated list 19 31
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…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
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…

685 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