Page 1 of 1

phpBB emails could improve SpamAssassin reputation

Posted: Sat Dec 09, 2017 12:25 am
by andreszs
After comparing the reputation of mails sent from my site and from phpBB, I've found some issues with the phpBB registration emails that unnecessarily self-damage their reputation, specifically these:
-0.105 FROM_EXCESS_BASE64 From: base64 encoded unnecessarily
-0.999 XPRIO A X_PRIORITY header is inserted in your message Please remove the X_PRIORITY header
These warnings are shown only for phpBB emails, not my site's mails. If phpBB could fix this issues to improve the mails reputation, that would be great. 8-)

To test your forum's possibility of email being sent to spam or directly rejected, register a new user with an email provided by Mail Tester and check the results. I've got a score of 7.2 for phpBB emails, and 8.3 for my site's own emails.

Re: phpBB emails could improve SpamAssassin reputation

Posted: Sat Dec 09, 2017 2:59 pm
by stevemaury
phpBB does not send emails. It uses whatever mail service the host provides - SMTP or php sendmail.

Re: phpBB emails could improve SpamAssassin reputation

Posted: Mon Dec 11, 2017 1:48 am
by thecoalman
stevemaury wrote:
Sat Dec 09, 2017 2:59 pm
phpBB does not send emails. It uses whatever mail service the host provides - SMTP or php sendmail.
The headers are generated by phpBB.

Re: phpBB emails could improve SpamAssassin reputation

Posted: Mon Dec 11, 2017 2:26 am
by warmweer
thecoalman wrote:
Mon Dec 11, 2017 1:48 am
stevemaury wrote:
Sat Dec 09, 2017 2:59 pm
phpBB does not send emails. It uses whatever mail service the host provides - SMTP or php sendmail.
The headers are generated by phpBB.
The X_PRIO header isn't made by phpBB AFAIK, but is an extra header added by the host (or the SMTP service).

edited by warwmeer on Mon Dec 11, 2017: 9:06 am: this is wrong: the X_PRIO header is made by phpBB (cfr answer by by Paul » Mon Dec 11, 2017 8:41 am)

Re: phpBB emails could improve SpamAssassin reputation

Posted: Mon Dec 11, 2017 7:41 am
by Paul
The priority header is set by phpBB: https://github.com/phpbb/phpbb/blob/mas ... r.php#L490

The base64 encoding actually is needed, as we allow UTF8 chars within the subject, and they need to be encoded.

Re: phpBB emails could improve SpamAssassin reputation

Posted: Mon Dec 11, 2017 8:02 am
by warmweer
Paul wrote:
Mon Dec 11, 2017 7:41 am
The priority header is set by phpBB: https://github.com/phpbb/phpbb/blob/mas ... r.php#L490

The base64 encoding actually is needed, as we allow UTF8 chars within the subject, and they need to be encoded.
Ow, my bad :oops:

Re: phpBB emails could improve SpamAssassin reputation

Posted: Mon Dec 11, 2017 10:15 am
by AmigoJack
andreszs wrote:
Sat Dec 09, 2017 12:25 am
-0.105 FROM_EXCESS_BASE64 From: base64 encoded unnecessarily
Yes, phpBB always uses UTF-8 encoding, even when it is not needed. However, SpamAssassin has no reason to come up with this penalty - RFC 2045 does not favor ASCII over UTF-8.

andreszs wrote:
Sat Dec 09, 2017 12:25 am
-0.999 XPRIO A X_PRIORITY header is inserted in your message Please remove the X_PRIORITY header
Yes, phpBB always sets this header (and others) when it could omit them for "normal" priority. Did this on my installation 2 years ago, as this header's purpose is only used thru the ACP "send e-mail" module anyway.

Re: phpBB emails could improve SpamAssassin reputation

Posted: Fri Dec 15, 2017 5:24 pm
by LaxSlash1993
AmigoJack wrote:
Mon Dec 11, 2017 10:15 am
andreszs wrote:
Sat Dec 09, 2017 12:25 am
-0.105 FROM_EXCESS_BASE64 From: base64 encoded unnecessarily
Yes, phpBB always uses UTF-8 encoding, even when it is not needed. However, SpamAssassin has no reason to come up with this penalty - RFC 2045 does not favor ASCII over UTF-8.
This rule is triggered when the header is set, but the character set used in the e-mail does not require UTF-8. A conditional could be applied in phpBB to fix this to see if UTF-8 would be required, and if not, just use normal ASCII.

The logic is that it's a trick used to bypass filters that are not MIME-aware.

EDIT: https://wiki.apache.org/spamassassin/Ru ... ASE64_TEXT