Google apps rejecting mails from webform of same domain

ericovk

Verified User
Joined
Apr 17, 2012
Messages
228
Location
Rotterdam, Netherlands
I am having problems with Google Apps accepting the results of my mailform.

The problem:
On Google Apps I have, lets say the mailbox [email protected].
From my webserver I host a website on mydomain.com (same domain as the Google apps domain). The results of this webform is being sent with default php function of the Wordpress website (PHPMailer 5.2.10). The results are being emailed from the webserver to Google Apps' [email protected]. At least it tries to do, but my server's emailqueue is full with emails returned by Google Apps with the message:

2016-03-01 11:00:56 Received from <> R=1aah6u-0005Ji-4Y U=mail P=local S=2197 T="Mail delivery failed: returning message to sender"
2016-03-01 11:00:57 SMTP error from remote mail server after RCPT TO:<[email protected]>: host ASPMX.L.GOOGLE.COM [74.125.195.27]: 550-5.1.1 The email account that you tried to reach does not exist. Please try\n550-5.1.1 double-checking the recipient's email address for typos or\n550-5.1.1 unnecessary spaces. Learn more at\n550 5.1.1 https://support.google.com/mail/answer/6596 y127si6996218wmg.13 - gsmtp
2016-03-01 11:00:57 [email protected] F=<> R=lookuphost T=remote_smtp: SMTP error from remote mail server after RCPT TO:<[email protected]>: host ASPMX.L.GOOGLE.COM [74.125.195.27]: 550-5.1.1 The email account that you tried to reach does not exist. Please try\n550-5.1.1 double-checking the recipient's email address for typos or\n550-5.1.1 unnecessary spaces. Learn more at\n550 5.1.1 https://support.google.com/mail/answer/6596 y127si6996218wmg.13 - gsmtp
*** Frozen (delivery error message)

email body in the mailqueue says:

[email protected]
SMTP error from remote mail server after end of data:
host ASPMX.L.GOOGLE.COM [74.125.195.27]: 550-5.7.1 Unauthenticated email from mydomain.com is not accepted due
550-5.7.1 to domain's DMARC policy. Please contact administrator of
550-5.7.1 mydomain.com domain if this was a legitimate mail. Please visit
550-5.7.1 https://support.google.com/mail/answer/2451690 to learn about DMARC
550 5.7.1 initiative. gt8si36559115wjc.204 - gsmtp

I think Google isn't accepting the email because it is trying to verify the contact form sender's account details. Because the mail is being sent by PHPMailer, it needs no account details. We host other websites, also with Google Apps for email, but these sites doesn't have this problem with webforms.

How can I possibly fix this?
 
Hello,

It seems you've already got two possible solutions suggested by Google:

550-5.1.1 The email account that you tried to reach does not exist. Please try
550-5.1.1 double-checking the recipient's email address for typos or
550-5.1.1 unnecessary spaces. Learn more at
550 5.1.1 https://support.google.com/mail/answer/6596 y127si6996218wmg.13 - gsmtp

550-5.7.1 Unauthenticated email from mydomain.com is not accepted due
550-5.7.1 to domain's DMARC policy. Please contact administrator of
550-5.7.1 mydomain.com domain if this was a legitimate mail. Please visit
550-5.7.1 https://support.google.com/mail/answer/2451690 to learn about DMARC

At least try them out and see whether or not any of them solves the issue.
 
Option 1 is what I tried to explain. I guess Google apps thinks it has to send this email, but the server needs to send it, because it needs to be send from the server to the Google apps account. (I guess that's what the problem is here)

I don't know what to do about option 2, as SPF and DKIM are set.
 
Kindly provide a real domain name if you want further assistance. Without it we deal only with those messages from logs and suggestions from Google.
 
Have you removed default Mx records from directadmin and updated Google MX records?

You could miss some steps on config for Google apps so that it bounces back like that.
 
Thanks, but all MX records are pointed to Google's MX servers. I think it has something to do with this DMARC policy (I am not familiar with).

The server's mail function is working. If I change the senders email address to some other domain, than my emails are comming through.
 
I found out what the cause of this issue was. The DMARC txt record was set to p=reject and pct=100. So all email sent by the website were rejected by the DMARC record, because the actual sender of the message was my servers hostname. I found out this is default for DirectAdmin.

How can I set the sender of the website mails to actually send from the specific [email protected]?
 
What do you mean? You can download any available version of exim.conf from http://files.directadmin.com/services/ or by custombuild for free.

Default thing for you does not necessary mean default for us. And it might be a customization for us. I don't know anything of your setup and what PHP application you use. Usually if we don't like how PHP mail() adds mail headers, we use SMTP for sending emails, this helps to see sender address what we need. So if you don't want to customize exim.conf try and use SMTP with your PHP application.

If you need to customize exim.conf for any reason you should do it yourself or get someone to do it for you.
If you want to get someone to d it for you: you can try either get a free help or hire someone for this.
 
Back
Top