Problems sending emails from PHP with Google for Domains

elbarto

Verified User
Joined
Oct 8, 2008
Messages
133
Hi guys.

A while ago a client asked me to configure his domain's MX to use Google for domains. No problem there. I did it and it's working fine.

The thing is that a couple of days ago my client discovered that his website's contact form had stopped working and he was not receiving any message in his google account.

After doing some debugging we cheked that all php, the mail server and his script were working fine. After a while I realized that the problem was that when he send an email using PHP, Exim realized that the account was local and delivered it without it ever leaving the local server.

Code:
2009-05-04 19:06:34 1M1A3G-0004k6-C3 <= [email protected] U=apache P=local S=781 T="[Contacto] fsdfsd" from <[email protected]> for [email protected]
2009-05-04 19:06:34 1M1A3G-0004k6-C3 => webmaster <[email protected]> F=<[email protected]> R=virtual_user T=virtual_localdelivery S=907

So what I saw there was that the [email protected] was an existing account on /etc/virtual/domain.com/passwd. I asked my client to remove all his accounts from DA, since he will be working with Google. After he did so, the /etc/virtual/domain.com/passwd file was empty. But the problem persists. The log changed a little, but the base problem seems to be the same.

Code:
2009-05-04 20:23:31 1M1BFi-0005K1-GZ <= [email protected] U=apache P=local S=782 T="[Contacto] fsdfsd" from <[email protected]> for [email protected]
2009-05-04 20:23:31 1M1BFi-0005K1-GZ ** [email protected] F=<[email protected]> R=virtual_aliases:
2009-05-04 20:23:33 1M1BFi-0005K1-GZ Completed

I also told him to remove any aliases that he could have, and it's still the same. The /etc/virtual/domain.com/aliases file has this:
Code:
user:user
*: :fail:

(where "user" is the actual username which I changed for privacy).

How can I tell Exim not to assume any account @domain.com is local? I think I could remove the whole /etc/virtual/domain.com directory, but I think it wouldn't be a nice thing to do.
 
You have to go in the dns settings in directadmin and uncheck the box that says use local mail on this server. Its some setting to that effect I forgot the exact wording.
 
On what user level would that be? I went to "DNS Administration" on the admin level and didn't find anything like that. I also went to the domain administration as the user who owns the domain and couldn't find it either.
 
Its user level under the mx records settings part.
 
Oh thanks. I didn't see it because I hadn't enabled the DNS Control for that user.
I will ask my client to check again his form.
Thanks scsi.
 
Oh thanks. I didn't see it because I hadn't enabled the DNS Control for that user.
I will ask my client to check again his form.
Thanks scsi.

That means you must have edited the dns manually to change the MX records.

Unchecking the box removes the domain from the /etc/virtual/domains file.

I cannot begin to count the number of times this has already been discussed.
 
Actually it's an external DNS, my client is not using he's server's DNS.
 
Actually it's an external DNS

Still you have to tell the server that mail should not be delivered locally when mail is being sent from that server. This is not a new concept.

It looks like it took about 3.5 hours for you to get the answer by posting the question here. Searching the forum would have gotten you the answer in a few minutes.
 
I understand. I did search the forum, but probably wasn't searching for the right term.

For me it wasn't critical to wait 3.5 hours to get the answer. And next time someone has the same problem and searches the forum with similar terms than the ones I used, he might find this post.
 
Back
Top