Closed X-Mailer or User-Agent header missing from Xenforo 2.3 outgoing emails

apydo

Member
Licensed customer
Affected version
2.3.12
Hello,

Currently Xenforo v2.3.12 outgoing emails are missing X-Mailer or User-Agent header.
It gets catched by antispam / email security software such as Rspamd and raises the spam score of the email.

In this specific situation (emails sent by an automatic system) I suppose User-Agent header does not apply but X-Mailer does.

I suggest adding the following header in all emails generated and sent by Xenforo to improve ham score:
X-Mailer: Xenforo

Best regards,
Artur
 
How are you sending emails? Your server's built-in php? SMTP? 3rd party mail API?
 
It gets catched by antispam / email security software such as Rspamd and raises the spam score of the email.
Code:
-- Detects messages missing both X-Mailer and User-Agent header
local has_ua = 'header_exists(User-Agent)'
local has_xmailer = 'header_exists(X-Mailer)'
reconf['MISSING_XM_UA'] = {
  re = string.format('!%s && !%s', has_xmailer, has_ua),
  score = 0.0,
  description = 'Message has neither X-Mailer nor User-Agent header',
  group = 'headers',
}
Source
Rspamd (if we're talking about the same thing) scores this as 0.0
Curious to know what antispam you're talking about.

These aren't required fields to be included in email headers as far as I know.
This isn't an issue we've seen after processing tens of thousands of emails per month.
(Using Amazon SES for reference in this case)
 
Rspamd (if we're talking about the same thing) scores this as 0.0
That's right but one can change the default value to avoid poorly forged emails.
These aren't required fields to be included in email headers as far as I know.
It is not. However it may be an indication about from where the email comes.
I don't think it's a big deal to add it.
 
PHP built-in mail.

Are you sure it's the headers in the emails that is causing emails to be marked as spam - or is it perhaps the IP address of your server that is being used as the spam signal? This will especially be likely if you're on shared hosting.

There's a very good reason why it is generally recommended to use either an external SMTP server or a 3rd party email API where you can manage the reputation of your sending IP address. I spend a lot of time and money maintaining my email deliverability - I send nearly 100,000 emails per month from my forums and I live off the income I get from them, so deliverability is very important to me.
 
Are you sure it's the headers in the emails that is causing emails to be marked as spam
I said "it raises spam score of an email". Maybe I should say "it may raise the spam score".

Anyway, if it is too hard to add this header in Xenforo I found a way to get it added by Postfix for outgoing emails.
If one is interested look at "postfix header checks PREPEND".
 
Automated triage: As designed

XenForo has never added an X-Mailer header to outgoing email, so this is a request for new behaviour rather than a bug. It's better suited to the suggestions forum. In the meantime, an add-on can add custom headers to outgoing mail.

This is an automated assessment. A member of staff may review and update it.
 
Back
Top Bottom