mikel / mail

A Really Ruby Mail Library
MIT License
3.62k stars 936 forks source link

The "Mime-Version" header capitalization is considered a spam signal by rspamd #1497

Closed borama closed 1 year ago

borama commented 2 years ago

I noticed that the mail gem generates the MIME version header capitalized as Mime-Version as opposed to MIME-Version mentioned in the RFC 2045.

While this spelling is technically perfectly correct, it is specifically matched by an rspamd antispam rule called MV_CASE which effectively raises the spam score by 0.5 for all emails with such header. I traced down the original commit in rspamd, it has been there for years and seems to be included in the default configuration, but other than that I found no info about why this rule was added.

I briefly checked a few mail service providers and found that the header capitalization varies a lot:

I'll be glad to open a PR if you're interested, thanks!

mikel commented 1 year ago

Fixed in https://github.com/mikel/mail/pull/1503

borama commented 1 year ago

Thanks @mikel for taking a look at this!