MyBB Community Forums

Full Version: SpamAssassin and "X-Priority" email header
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
It appears that by default, MyBB's mailer includes an "X-Priority" header in its post notification emails.

Usually, this isn't an issue, however there is a SpamAssassin test ("XPRIO_URL_SHORTNER") which scores the combination of this header and a URL shortener.

I noticed it with a YouTube URL, which apparently is classified as a "short URL".
In that case, it was enough to push the board notification over SpamAssassin's default spam score.

That particular board uses a gmail email address as the "From" address, which gives it 3.0 SpamAssassin points, so they don't have much breathing space, spam-FP-wise. Sad

Is there a simple way to turn off the "X-Priority" header?
Hi,

make a backup copy of the file /inc/class_mailhandler.php

Now open it with Notepad++ or similar software.

Find:
$this->headers .= "Content-Transfer-Encoding: 8bit{$this->delimiter}";
$this->headers .= "X-Priority: 3{$this->delimiter}";
$this->headers .= "X-Mailer: MyBB{$this->delimiter}";
$this->headers .= "MIME-Version: 1.0{$this->delimiter}";
line 343

and delete the line:

$this->headers .= "X-Priority: 3{$this->delimiter}";

Now save it Without BOM, and it'll be as you want.

Remember you'll have to do this everytime the file it's updated.
Mine includes the weird address: 132 Boll Green Dr, Interlachen, FL 32148 at the end of the line and I can't seem to remove it.

I have no idea what kind of spam is this ... it's either BassTrackerBoats is drunk or something else happened with the mailer.
(2019-09-18, 06:34 PM)NoRules Wrote: [ -> ]and delete the line:

$this->headers .= "X-Priority: 3{$this->delimiter}";

NoRules: thanks. Smile
I did find that when I grepped The Source, while investigating.

The board where this is a problem, is run by Muggles, so that feels like a risky burden to place on them.

I poorly phrased my original question.
I should have asked: how about making that header optional, or removing it entirely? Smile
It feels like an artifact of an intention to do something with priorities, but now it's just Code cruft.

P.S. tunescool: I do not understand what relationship there is between your post and this topic. Sad
Hello,
Please excuse me if I am unclear or in the wrong category ...

Our Problem:
If someone sends a private message, the users receive an email with the information that someone has sent a PM. The problem with many users (including me) is that they end up in the spam folder. An attempt was made to set up exceptions in the email program without success. Mail from mybb is still recognized as SPAM
Could Post #2 from NoRules be our solution?

Thx for your anser!
Greets,
blongso
^ removing that line might help. make that change & check for a few days ...

some prefer changing the priority value to 2
$this->headers .= "X-Priority: 2{$this->delimiter}";
Hello .m.,
I changed it. I will give feedback :-)

Greets,
blongso

edit: A user feedback: No change :-(
(2020-02-25, 05:49 PM)blongso Wrote: [ -> ]Hello .m.,
I changed it. I will give feedback :-)

Greets,
blongso

edit: A user feedback: No change :-(

blongso, if you post the complete headers from one that was quarantined, I can take a look.
Please redact the "From" & "To" headers.

Note: I'm an email security engineer.