Jump to content

Handling mail (localhost) on a shared VPS


lumbee

Recommended Posts

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!!!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

...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?

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.