[RCD] How to fix incorrect CT-declaration "text/x-mail" for .eml attachments?
vesely at tana.it
Mon Dec 31 15:10:57 CET 2012
On Mon 31/Dec/2012 12:15:24 +0100 Michael Heydekamp wrote:
> Am 29.12.2012 12:29, schrieb Alessandro Vesely:
>> On Sat 29/Dec/2012 01:24:24 +0100 Michael Heydekamp wrote:
>>> According to RFC 2821, it should indeed read "Return-Path:" (although the
>>> text itself contains a lot of matches also for "Return-path" and even
>>> "return-path", see https://www.ietf.org/rfc/rfc2821.txt).
>> In either case, strings are *case insensitive* and their character set
>> is US-ASCII.
> Oh, is this really the case? If so, then ALL headers (not only Return-Path)
> should be checked case-insensitive by finfo (which does currently not
> happen, AFAICS).
Right. I'd say case sensitivity, line terminations, and possibly regex
support are required for recognizing text files. Libmagic was designed
for binary ones.
> Can you point to the statement in any RFC where this is clearly stated? I
> couldn't find anything in 2821 and it's predecessors/successors. All
> statements about case (in)sensitivity refer to SMTP commands, local parts
> and domains only.
RFC 2821 is indeed focused on SMTP. RFC 2822 does the message format,
and has a corresponding statement about case sensitivity:
Formally, the clear statement is part of the ABNF specification, that
both specifications use. It says:
ABNF strings are case insensitive and the character set for these
strings is US-ASCII.
rulename = "abc"
rulename = "aBc"
will match "abc", "Abc", "aBc", "abC", "ABc", "aBC", "AbC", and
Preceding documents, such as RFC 821, RFC 822, and the MIME series of
RFCs, refer to the BNF defined in RFC 822 (STD 11), which is also fairly
clear, albeit it doesn't mention all possible combinations:
When matching any other syntactic unit, case is to be ignored.
For example, the field-names "From", "FROM", "from", and even
"FroM" are semantically equal and should all be treated ident-
More information about the dev