lumbee Posted July 3, 2012 Share Posted July 3, 2012 Hey folks. I have a legacy LAMP app that I have recently became responsible for. The app does alot of email notifications, and I am trying to troubleshoot issues where emails are being lost or not sent. We think it is an issue where the app is sending email to fast for our barracuda server to handle. To that end we have set-up a relay server that we hope will act as a buffer between the barracuda server, and the app. The issue I am having is getting the app to talk to the relay server rather than the barracuda server. I have the mail configuration files in the app and they look like...http://pastie.org/4192951 You can see here the mail server is set-up to point to 'localhost'. This app is being run on a shared hosting provider (greengeeks) and uses CPanel. In cpanel I have tried adding MX entries for the domain and subdomain to point to the relay server, but mail still goes to our main (barracuda) server. Additionally I have tried substituting 'localhost' with the ip/domain of the relay server, and still no cigar...nothing gets mailed. I have ensured that the relay server has an exception for the ip address of the app server, and that it is properly forwarding mail to the barracuda server. Bear in mind I am a developer, but not a php guy. Any info you could pass my way on how an app like this would/should handle mail in an environment like this would be appreciated. Thanx in advance!!! Quote Link to comment https://forums.phpfreaks.com/topic/265157-handling-mail-localhost-on-a-shared-vps/ Share on other sites More sharing options...
xyph Posted July 3, 2012 Share Posted July 3, 2012 If you're using localhost, the mail is probably being sent through your shared hosting account. There's a good chance these are being throttled. Shared hosts generally don't like the idea of massive email activity. Have you contacted greengeeks about this yet? Have you set up a From directive in the mail's header? Hosts should send any failure notices to the email specified there. I'm a little confused though, you jump between referencing your own server and the outside shared hosting server too often. Quote Link to comment https://forums.phpfreaks.com/topic/265157-handling-mail-localhost-on-a-shared-vps/#findComment-1358814 Share on other sites More sharing options...
lumbee Posted July 3, 2012 Author Share Posted July 3, 2012 ...thanx for the reply...I have chatted with greengeeks with mixed results on the quality of information I am getting. I guess it would be worth submitting a ticket. I guess I assume that they are going to say 'its your app'. There is definitely no mail server configured on their side. Is a 'from directive' a php or an apache/server setting? Quote Link to comment https://forums.phpfreaks.com/topic/265157-handling-mail-localhost-on-a-shared-vps/#findComment-1358815 Share on other sites More sharing options...
xyph Posted July 3, 2012 Share Posted July 3, 2012 They don't have a mail server configured? How did your app work prior to adding those MX records? Quote Link to comment https://forums.phpfreaks.com/topic/265157-handling-mail-localhost-on-a-shared-vps/#findComment-1358827 Share on other sites More sharing options...
lumbee Posted July 3, 2012 Author Share Posted July 3, 2012 MX records were configured prior to my meddling, but they pointed to our root domain which is pointed to the barracuda server on port 25. However, I what effect the MX records have on mail settings. Even when I changed the MX records to point to our relay server (rather than barracuda) mail is still being sent to the barracuda server. Quote Link to comment https://forums.phpfreaks.com/topic/265157-handling-mail-localhost-on-a-shared-vps/#findComment-1358830 Share on other sites More sharing options...
xyph Posted July 3, 2012 Share Posted July 3, 2012 I'm not sure you're entirely up to speed with the systems you're using. From what I've read, greengeeks do offer SMTP with their web hosting. If your script is running on greengeeks, and using localhost as the mail server, chances are greengeeks are the ones responsible for sending out your emails. If emails aren't coming through, the SMTP server doing the sending would be the first place I'd check. Quote Link to comment https://forums.phpfreaks.com/topic/265157-handling-mail-localhost-on-a-shared-vps/#findComment-1358859 Share on other sites More sharing options...
lumbee Posted July 3, 2012 Author Share Posted July 3, 2012 You are correct, greengeeks does not host smtp servers, we are using out own smtp server, that is the baracuda server I spoke of. All mail from the application goes to localhost, and from there it checks the MX records, where I have the relay server configured. Quote Link to comment https://forums.phpfreaks.com/topic/265157-handling-mail-localhost-on-a-shared-vps/#findComment-1358896 Share on other sites More sharing options...
mikosiko Posted July 3, 2012 Share Posted July 3, 2012 how the php.ini looks like for the section [mail function] , and [sendmail] on the sendmail.ini ? ... do you have access to those files on greengeeks?... otherwise ask them to provide you that information... could be possible that they did change the sedmail parameters to direct the mails to you server. Quote Link to comment https://forums.phpfreaks.com/topic/265157-handling-mail-localhost-on-a-shared-vps/#findComment-1358929 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.