Mail failure - malformed recipient address

Get help with installation and running phpBB 3.3.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
User avatar
P_I
Community Team Member
Community Team Member
Posts: 2353
Joined: Tue Mar 01, 2011 8:35 pm
Location: Western Canada 🇨🇦
Contact:

Mail failure - malformed recipient address

Post by P_I »

A new member has registered on my board with an username of P@n@m@. The board is configured with Account activation By User (email verification).

Checking our email account it is showing Mail failure - malformed recipient address
Mail failure email wrote:A message that you sent contained one or more recipient addresses that were
incorrectly constructed:

=?US-ASCII?Q?P@n@m@?= <[email protected]>: malformed address: @m@?= <[email protected]> may not follow =?US-ASCII?Q?P@n

This address has been ignored. There were no other addresses in your
message, and so no attempt at delivery was possible.

------ This is a copy of your message, including all the headers. ------

To: =?US-ASCII?Q?P@n@m@?= <[email protected]>
The initial registration and email failure occurred when the board was running phpBB 3.3.5.

The board was updated last night to 3.3.7 and through ACP I did a Force reactivation. The same failure email is received.

Is the username valid from phpBB's point of view? If so why does the mail system believe there is a malformed address?
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Mail failure - malformed recipient address

Post by 3Di »

Seems to me quite obvious. :)
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
P_I
Community Team Member
Community Team Member
Posts: 2353
Joined: Tue Mar 01, 2011 8:35 pm
Location: Western Canada 🇨🇦
Contact:

Re: Mail failure - malformed recipient address

Post by P_I »

Care to explain because it isn't to me.

The username is P@n@m@ and the email address provided is [email protected]. The email address is valid. So it appears to me that phpBB still is having problems in 3.3.7 with encoding email headers.
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Mail failure - malformed recipient address

Post by 3Di »

P_I wrote: Sun Mar 20, 2022 2:17 pm So it appears to me that phpBB still is having problems in 3.3.7 with encoding email headers.
Indeed, it is obvious to my eyes, see:
=?US-ASCII?Q?P@n@m@?= <[email protected]>: malformed address: @m@?= <[email protected]> may not follow =?US-ASCII?Q?P@n
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
Noxwizard
Support Team Leader
Support Team Leader
Posts: 10551
Joined: Mon Jun 27, 2005 8:41 pm
Location: Texas, USA
Name: Patrick Webster
Contact:

Re: Mail failure - malformed recipient address

Post by Noxwizard »

You're running into this issue: https://tracker.phpbb.com/browse/PHPBB3-16932
[Support Template] - [Read Before Posting] - [phpBB Knowledge Base]
Do not contact me for private support, please share the question in our forums.
User avatar
P_I
Community Team Member
Community Team Member
Posts: 2353
Joined: Tue Mar 01, 2011 8:35 pm
Location: Western Canada 🇨🇦
Contact:

Re: Mail failure - malformed recipient address

Post by P_I »

Thanks. Saved me the trouble of opening a ticket. I’ll take a look at the workaround and hopefully this will get resolved in the next update.
Normal people… believe that if it ain’t broke, don’t fix it. Engineers believe that if it ain’t broke, it doesn’t have enough features yet. – Scott Adams
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: Mail failure - malformed recipient address

Post by 3Di »

I had proposed a PR proposing a switch in ACP, dedicated. After a long time I decided to close it as I had no feedback. That ticket was unknown to me anyway.
🆓 Free support for our extensions also provided here: phpBB Studio
🚀 Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity º PhpStorm's proud user º Extensions, Scripts, MOD porting, Update/Upgrades
merouleau
Registered User
Posts: 7
Joined: Fri Nov 26, 2004 2:03 pm

Re: Mail failure - malformed recipient address

Post by merouleau »

I just added a comment to the ticket indicating that the issue remains. I'm continuing to maintain the simple hack described in the ticket of setting $is_ascii to false in all cases. Does anyone know what that breaks?

From my perspective, phpBB has always allowed @ signs in usernames, so the worldwide base of usernames accumulated over the past two decades now includes many (thousands? tens of thousands?) with that attribute. A regression was introduced in the past year with the following effects:
  1. Many existing users can no longer receive email notifications.
  2. New users are allowed to register usernames that cannot receive activation messages, so they cannot complete the registration process.
So I'm curious. Why is the regression allowed to remain? Why wouldn't the team simply back the offending code out? What are the benefits of keeping the broken code in place?
merouleau
Registered User
Posts: 7
Joined: Fri Nov 26, 2004 2:03 pm

Re: Mail failure - malformed recipient address

Post by merouleau »

Lest we continue to think this issue insignificant, I just did this calculation for the forums that I administer:

select count(*) from phpbb_users where username like "%@%" /
select count(*) from phpbb_users


1.6% of our forum members have usernames containing the @ character!

I think this is common because users have become accustomed to using email addresses as usernames. Clearly, a significant number of users are not sensitive to (or aware of?) the obvious privacy issue.

As a rough estimate of worldwide phpBB users, I found a list of the busiest phpBB forum sites at https://www.wappalyzer.com/technologies ... ards/phpbb. One of them, forum.mikrotik.com, accounts for 1% of total traffic and self-reports 155K users. If I assume that users and traffic are roughly proportional, I get an order of magnitude estimate of 15M total phpBB users. 1.6% of 15M is 240,000.

So I think I greatly underestimated ("thousands? tens of thousands?") the number of affected users in this morning's post.
merouleau
Registered User
Posts: 7
Joined: Fri Nov 26, 2004 2:03 pm

Re: Mail failure - malformed recipient address

Post by merouleau »

A fix is in the works for 3.3.9 - details in the issue. It's a one-line fix that's easy to install manually in 3.3.7 or 3.3.8 if you don't want to wait.

Thanks to Marc for the patch!
Post Reply

Return to “[3.3.x] Support Forum”