Site emails not sending to same URL

dingbat5000

New member
Joined
Oct 13, 2009
Messages
4
We recently moved from a Plesk set up and bought a CentOS / DirectAdmin set up. We have many users who use GoDaddy for their URL and email. Their A Records are set to our server so their DNS and MX records remain with GoDaddy to use their space rather than us charging them for it.

Our main issue is that when their site email is set to [email protected] for the site www.domain.com, any generated emails sent using PHP's mail() function don't go anywhere. They end up in the MailQueue and get stuck.

I've tried deleting the MX records for their domain on our DA server but mail still doesn't send.

Any ideas?

Eric
 
This has been discussed many times in our forums.

You should first turn on DNS Management for the users who own the domains for which you need this fixed.

Then log into each of those users (you can do this from admin or reseller level without a password) and click on MX Records and follow the instructions on the resulting page. This needs to be done for each domain.
 
I read all the posts I could find and none of them solved my issue. DNS management didn't accomplish anything as the server was still trying to send internally first and failing to get the emails out of the server.

I was able to fix it by editing the Exim.conf and removing any localhost searching and forcing it to check remotesmtp for all domains on the server.
 
The method I explained in my post above was written specifically to solve the issue about which you wrote. And it works. If you don't want to do it, fine. Editing Exim.conf is fine, though a brute-force fix that will break if you forget and update exim.conf, or if you try to add local email for a domain.

I'm the maintainer of the DirectAdmin exim.conf file, and there's a new version coming out shortly. However now you've limited yourself to only maintaining exim.conf yourself.

Jeff
 
My issue is the DNS management didn't work. I tried deleting MX records all together which didn't work and when I set the MX to godaddy's MX settings (which I got from a client login panel) the server still tries to send it locally first and it gets stuck in the Mail Queue.

Is there a way with Exim to check external smtp first and then internal so that local emails would work? We have over 220 websites that use this method right now and I want the correct solution for the future. I agree that brute-force isn't smart but for now we needed the clients happy.
 
I suppose you can rewrite your exim.conf file to do anything you want. For most of us under most circumstances it would be a waste of time and resources to do an MX lookup for a locally hosted domain. It's easy enough for you to follow my instructions on how to remove local domains from the list of domains for which exim.conf does a local delivery but for some reason you're ignoring that.

Of course if you don't like the decisions I made when I wrote the exim.conf file you can certainly write your own.

Jeff
 
Can you give me a link to your original thread or instructions? I obviously didn't find the one you are referring too. I would rather do it right. What I hacked was based on what I could find on this forum and google and obviously I didn't find yours.
 
It's post #2 of this thread.

It's in other places as well, but no reason for either of us to search elsewhere.

The key is the MX Records link, which only appears if DNS Management is on for the domain.

Afterwards you can turn DNS Management off again.

Jeff
 
My issue is the DNS management didn't work. I tried deleting MX records all together which didn't work and when I set the MX to godaddy's MX settings (which I got from a client login panel) the server still tries to send it locally first and it gets stuck in the Mail Queue.

You probably did not uncheck the box under Local Mail Server which states:

Use this server to handle my emails.
If not, change the MX record and uncheck this option
 
Back
Top