[Mimedefang] Re: Problem on attachment name
Ing. Andrea Vettori
mail at andreavettori.com
Sat Jan 13 03:13:30 EST 2007
I've searched the rfcs.
From rfc2183 :
disposition := "Content-Disposition" ":"
disposition-type
*(";" disposition-parm)
disposition-type := "inline"
/ "attachment"
/ extension-token
; values are not case-sensitive
disposition-parm := filename-parm
/ creation-date-parm
/ modification-date-parm
/ read-date-parm
/ size-parm
/ parameter
filename-parm := "filename" "=" value
creation-date-parm := "creation-date" "=" quoted-date-time
modification-date-parm := "modification-date" "=" quoted-date-time
read-date-parm := "read-date" "=" quoted-date-time
size-parm := "size" "=" 1*DIGIT
quoted-date-time := quoted-string
; contents MUST be an RFC 822 `date-time'
; numeric timezones (+HHMM or -HHMM) MUST be used
NOTE ON PARAMETER VALUE LENGHTS: A short (length <= 78 characters)
parameter value containing only non-`tspecials' characters SHOULD be
represented as a single `token'. A short parameter value containing
only ASCII characters, but including `tspecials' characters, SHOULD
be represented as `quoted-string'. Parameter values longer than 78
characters, or which contain non-ASCII characters, MUST be
encoded as
specified in [RFC 2184].
and from rfc2045 :
content := "Content-Type" ":" type "/" subtype
*(";" parameter)
; Matching of media type and subtype
; is ALWAYS case-insensitive.
type := discrete-type / composite-type
discrete-type := "text" / "image" / "audio" / "video" /
"application" / extension-token
composite-type := "message" / "multipart" / extension-token
extension-token := ietf-token / x-token
ietf-token := <An extension token defined by a
standards-track RFC and registered
with IANA.>
x-token := <The two characters "X-" or "x-" followed, with
no intervening white space, by any token>
subtype := extension-token / iana-token
iana-token := <A publicly-defined extension token. Tokens
of this form must be registered with IANA
as specified in RFC 2048.>
parameter := attribute "=" value
attribute := token
; Matching of attributes
; is ALWAYS case-insensitive.
value := token / quoted-string
token := 1*<any (US-ASCII) CHAR except SPACE, CTLs,
or tspecials>
tspecials := "(" / ")" / "<" / ">" / "@" /
"," / ";" / ":" / "\" / <">
"/" / "[" / "]" / "?" / "="
; Must be in quoted-string,
; to use within parameter values
So it seems to me that unless the file name contains tspecials, it's
legal to have the filename as a quoted string on the name parameter
of Content-Type and unquoted string on filename parameter of Content-
Disposition.
So I think it's a mimedefang/MIME handling bug that when unquoted
string are used on Content-Disposition filename parameter they are
truncated...
Who should I contact to solve this bug ?
Thank you
Il giorno 12/gen/07, alle ore 17:00, Ing. Andrea Vettori ha scritto:
> Any hint ?
>
> Is it a mimedefang/MIME handling bug ?
>
> Or is it Apple Mail break some specification ?
>
> Please help!
>
> Thank you.
>
>
> Il giorno 10/gen/07, alle ore 13:25, Ing. Andrea Vettori ha scritto:
>
>> Hi,
>> I've a problem with mimedefang (version 2.58) with SpamAssassin 3
>> and f-secure antivirus on Linux.
>>
>> The problem occours only when the email comes from an Apple Mail
>> client.
>>
>> [snip]
>>
>> The message sent from Apple Mail does trigger a tmpfail error on
>> the antivirus because the antivirus find different names between
>> the name on content-type and the name on content-disposition. I
>> feel this problem can be caused by the absence of the quotes on
>> the Apple Mail message. On the temporary file on which the
>> antivirus is run, the name is trucated.
>
> --
> Ing. Andrea Vettori
> Consulente per l'Information Technology
>
>
>
--
Ing. Andrea Vettori
Consulente per l'Information Technology
More information about the MIMEDefang
mailing list