Gmail bouncing messages from phpbb3 forum

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
User avatar
mamba
Registered User
Posts: 603
Joined: Thu Jan 16, 2003 7:59 pm
Location: Australia

Gmail bouncing messages from phpbb3 forum

Post by mamba »

Gmail rejects emails sent from phpbb3 (e.g. registrations, forgotten passwords etc) based on

Code: Select all

Messages with multiple addresses in From: header are not accepted 

The core issue is non-delivery, bouncing, based on Gmail deciding that there are too many addresses in the From header. Here is the exact From header they rejected:

```
From: [email protected] Reply-To: [email protected] Return-Path: [email protected] Sender: [email protected] MIME-Version: 1.0 Message-ID: [email protected] Date: Thu, 29 Apr 2021 18:36:39 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: phpBB3 X-MimeOLE: phpBB3 X-phpBB-Origin: phpbb://mysite.com X-AntiAbuse: Board servername - mysite.com X-AntiAbuse: User_id - 1 X-AntiAbuse: Username - Anonymous X-AntiAbuse: User IP - xxx.xxx.129.144
```

SPF and DKIM are all passed, no spam flags set, domain not listed anywhere for spam
Using latest version of PHPBB
User avatar
mamba
Registered User
Posts: 603
Joined: Thu Jan 16, 2003 7:59 pm
Location: Australia

Re: Gmail bouncing messages from phpbb3 forum

Post by mamba »

I tried to register a new account using a gmail address and another account using an outlook.com address

The Outlook one came through immediately, the Gmail one failed after about 30 minutes:
host gmail-smtp-in.l.google.com [173.195.207.26]
SMTP error from remote mail server after pipelined end of data:
550-5.7.1 [172.96.189.177 13] Messages with multiple addresses in From:
550 5.7.1 header are not accepted. y16si645571qvf.97 - gsmtp
Here is the exact From: address that Outlook accepted but Gmail rejected:

Code: Select all

From: [email protected]
 Reply-To: [email protected]
 Return-Path: [email protected]
 Sender: [email protected]
 MIME-Version: 1.0
 Message-ID: [email protected]
 Date: Fri, 30 Apr 2021 04:21:12 +0000
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
Using latest version of PHPBB
User avatar
mamba
Registered User
Posts: 603
Joined: Thu Jan 16, 2003 7:59 pm
Location: Australia

Re: Gmail bouncing messages from phpbb3 forum

Post by mamba »

Solved, I think. I set the phpbb setting "Force from email address:" to No.
Then I registered a new account using gmail, and it was delivered.
Gmail is very picky it seems.

This must be happening to a number of people using phpbb.

I suggest a warning be hardcoded onto the Email Settings tab about this issue.
Using latest version of PHPBB
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26505
Joined: Fri Aug 29, 2008 9:49 am

Re: Gmail bouncing messages from phpbb3 forum

Post by Mick »

Problems using gmail, for whatever reasons, have been talked about here for years. The most reliable and easiest email setup still seems to be using an email address supplied by your host.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 5871
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Gmail bouncing messages from phpbb3 forum

Post by thecoalman »

The from field and the return-path need to match. That setting is because some server configurations will set the return-path different than From field if it's not set in the php script. This occurs with WHM/Cpanel, I don't know if happens elsewhere. Instead it will use the account email instead.

You probably have exact opposite issue and something is adding a from field. You would need to look at the email source code to determine that.
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
mamba
Registered User
Posts: 603
Joined: Thu Jan 16, 2003 7:59 pm
Location: Australia

Re: Gmail bouncing messages from phpbb3 forum

Post by mamba »

thecoalman wrote: Fri Apr 30, 2021 8:44 am The from field and the return-path need to match.
But they do. See examples above
Using latest version of PHPBB
User avatar
mamba
Registered User
Posts: 603
Joined: Thu Jan 16, 2003 7:59 pm
Location: Australia

Re: Gmail bouncing messages from phpbb3 forum

Post by mamba »

This issue is still plaguing me. If I uncheck "force from address", phpbb inserts my email address ([email protected]) and 99% of the time it works. Mail-tester.com gives me a 9/10 score, all is well.

But Gmail rejects the registration emails with the same stupid message:

Messages with multiple addresses in From: header are not accepted.

So I change back to not forcing the from address, and mail-checker.com gives me a 4/10 score, because the server I'm on at HawkHost fills in another return address e.g. [email protected] which has no MX record and does not even exist.

But Gmail accepts these emails.

So stymied.

Here is the exact source code of these bounced messages, specifically the From: field that Gmail rejects:

Code: Select all

From: <[email protected]>Reply-To: <[email protected]>Return-Path: <[email protected]>Sender: <[email protected]>MIME-Version:1.0 Message-ID: <[email protected]>Date: [email protected], 27 Jun 2021 02:22:03 +0000 
I'm thinking maybe these problems:
  1. No spaces between addresses? Surely Gmail knows how to parse that
  2. Maybe my smtp server is inserting something? It seems overkill to have :
    1. From
    2. Sender
    3. Reply-To
    4. Return-Path
Using latest version of PHPBB
User avatar
mamba
Registered User
Posts: 603
Joined: Thu Jan 16, 2003 7:59 pm
Location: Australia

Re: Gmail bouncing messages from phpbb3 forum

Post by mamba »

I asked my host about this (hawkhost.com) and they blame PHPBB. The conversation was:

I wrote:The registration emails sent from my forum software (PhpBB) are being rejected by GMail. Here is the bounced email error message

Code: Select all

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:
[email protected]
host gmail-smtp-in.l.google.com [142.250.123.27]
SMTP error from remote mail server after pipelined end of data:
550-5.7.1 [172.96.182.155 13] Messages with multiple addresses in From:
550 5.7.1 header are not accepted. w4si14612246jad.121 - gsmtp
So the error is "Messages with multiple addresses in From: header are not accepted"

Here is the From header in these emails (source code):

Code: Select all

From: <[email protected]>Reply-To: <[email protected]>Return-Path: <[email protected]>Sender: <[email protected]>MIME-Version:1.0 Message-ID: <[email protected]>Date: [email protected], 27 Jun 2021 02:22:03 +0000

I'm not sure if the lack of spaces or run-on with the Date field is causing problems, or just that your server's SENDMAIL function is appending something into the From: field.

I have Googled the Gmail error message and very few people are getting this error, so I suspect something you (the host) is doing is messing it up.
HawkHost wrote:Hello,

It seems the mail that you are trying to send is getting bounced from Gmail end as the mail contains multiple "From" fields. Please check the plugin that you are using to send mail and make sure that it is not set with multiple from fields.
I wrote:Yes, I already know there are multiple from fields. That's what I reported to you. The "plugin" I am using is PHPBB, used by thousands of people without a problem, so the issue is with the way your sendmail is set up, not with the vanilla unmodified software I am using.

I have copy-pasted the exact source code of the From field for you in my previous message. That's the exact code Google's Gmail does not like.

It could be as simple as a missing delimiter, for instance I see the From: fields run on to the Date: field without a line break, which could be a bug, and could be confusing Gmail.
HawkHost wrote:Please note that this is not any kind of server end issue. You will need to modify your plugin such that it sends mail the way Gmail accepts its. You can try editing the plugin from your end or you need to contact the plugin support or your developer regarding this issue.
Any ideas? Is this a Gmail bug, or a PhpBB bug?
Using latest version of PHPBB
User avatar
mamba
Registered User
Posts: 603
Joined: Thu Jan 16, 2003 7:59 pm
Location: Australia

Re: Gmail bouncing messages from phpbb3 forum

Post by mamba »

I'm not getting any responses, so I'm doing what others here are doing, delegating sending emails to a third party (in my case SMPT2GO)

Works like a charm. Wish I'd been told about this sooner. :x
Using latest version of PHPBB
User avatar
thecoalman
Community Team Member
Community Team Member
Posts: 5871
Joined: Wed Dec 22, 2004 3:52 am
Location: Pennsylvania, U.S.A.
Contact:

Re: Gmail bouncing messages from phpbb3 forum

Post by thecoalman »

I don't see multiple from fields. From, reply-to, return-path and sender are typically the same but they all have specific purposes. Double check the source again and see if there is another "from"
“Results! Why, man, I have gotten a lot of results! I have found several thousand things that won’t work.”

Attributed - Thomas Edison
User avatar
mamba
Registered User
Posts: 603
Joined: Thu Jan 16, 2003 7:59 pm
Location: Australia

Re: Gmail bouncing messages from phpbb3 forum

Post by mamba »

No, that's all there is. That's why it's so weird.
Using latest version of PHPBB
Paul
Infrastructure Team Leader
Infrastructure Team Leader
Posts: 28619
Joined: Sat Dec 04, 2004 3:44 pm
Location: The netherlands.
Name: Paul Sohier
Contact:

Re: Gmail bouncing messages from phpbb3 forum

Post by Paul »

Your host is most likely adding a default From to all mail send via the mail() function. This can be a setting in there php.ini (But you most likely can't override that) or a setting in their MTA. You can try to tell your host to tell that to your host. Or you can try using SMTP instead of the mail() function, as that might work well.
User avatar
mamba
Registered User
Posts: 603
Joined: Thu Jan 16, 2003 7:59 pm
Location: Australia

Re: Gmail bouncing messages from phpbb3 forum

Post by mamba »

No, the SMTP option does not work .... unless I use an external 3rd party SMTP provider, which I am doing, and it works fine. Registrations using Gmail addresses arrive almost instantly now.

HOWEVER, I think I have found another bug in PHPBB. If I go to the list of inactive users and send a "reminder" email using the inbuilt function it offers, it seems to use mail() and NOT the SMTP parameters set under the admin email setup page. The reminder email never arrives.

https://www.[yourforum].com/adm/index.php?i=acp_inactive&mode=list&st=0&sk=i&sd=d&start=0
Using latest version of PHPBB
User avatar
mamba
Registered User
Posts: 603
Joined: Thu Jan 16, 2003 7:59 pm
Location: Australia

Re: Gmail bouncing messages from phpbb3 forum

Post by mamba »

mamba wrote: Sun Jun 27, 2021 10:12 pm The reminder email never arrives.
And it does not arrive at Outlook as well as Gmail, so totally FUBAR.
Using latest version of PHPBB
User avatar
mamba
Registered User
Posts: 603
Joined: Thu Jan 16, 2003 7:59 pm
Location: Australia

Re: Gmail bouncing messages from phpbb3 forum

Post by mamba »

So could someone please confirm this is a bug please?

Test the Inactive Users reminder function, using SMTP, not mail()
Using latest version of PHPBB
Post Reply

Return to “[3.3.x] Support Forum”