Content-Type: text
Matthias Andree
matthias.andree at gmx.de
Mon Jul 21 03:54:58 CEST 2003
David Relson <relson at osagesoftware.com> writes:
> Apparently some mailers generate invalid Content-Type headers.
> Specifically, "Content-Type: text" has been seen. It's invalid because
> the spec (rfc2045) requires 'type "/" subtype. (See below for a quote
> from rfc2045).
>
> Currently bogofilter requires the slash and will skip a mime part whose
> content lacks the slash. It has been suggested that bogofilter be
> changed to accept messages with non-conformant lines.
>
> The question is: Should bogofilter continue to require the slash, or
> not?
No slash -> spamicity := 1.
<ducks & runs for cover>
Seriously, we should accept text and treat it as text/plain. Any other
types that we guess shall be application/octet-stream.
> Note also that a subtype specification is MANDATORY -- it may not be
> omitted from a Content-Type header field. As such, there are no
> default subtypes.
Grounds enough to reject such junk. If paper could flash, this word
would flash & make loud noises (so-called disco mode).
Postfix header_checks (regexp and pcre compatible):
/^Content-Type: text$/ REJECT RFC-2045 violation. Get your mailer fixed.
--
Matthias Andree
More information about the Bogofilter
mailing list