Re: Question on how to set attachment rules

Michael Yount <[email protected]> Fri, 24 Jul 2009 16:44:04 -0700
Newsgroups gmane.mail.majordomo.majordomo2.devel
Message-ID <[email protected]>
Unless something extremely unusual is happening, the 
"application/pgp-signature" attachment is one part of a multipart 
message.  Therefore, the content type for the whole message should be 
"multipart/signed" or something similar.  Do you have a sample message 
on hand?  If so, what is the top-level content type for that message?

RFC 1847 says the following about multipart/signed:

> The multipart/signed content type contains exactly two body parts.
>    The first body part is the body part over which the digital signature
>    was created, including its MIME headers.  The second body part
>    contains the control information necessary to verify the digital
>    signature.  The first body part may contain any valid MIME content
>    type, labeled accordingly.  The second body part is labeled according
>    to the value of the protocol parameter.
The attachment_filters setting isn't sophisticated enough to distinguish 
a signed HTML body from a signed plain text body, so you have to choose 
whether or not to "keep" all signed messages intact.

Michael
 
Steven W. Orr wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 07/24/09 16:43, quoth Michael Yount:
>   
>> What is the content type of a message with a PGP signature?
>>     
>
> As I said below:
> Content-Type: application/pgp-signature; name="signature.asc"
>
>   
>> Clearly, for a signature to be valid, the related parts of the message
>> cannot be altered, so the "keep" example you cited is applicable to your
>> situation.
>>     
>
> When you sign with PGP you have the option of signing the whole message or
> just the body. Not all mail readers support verifying the whole message and I
> would never want to support a signature that depended on preserving all of the
> attachments.
>
> Also, the help text confused me because I don't understand the context of what
> is meant by "multipart/signed" or if it's relevant to what I'm asking.
>
> Your question is good though. The better way to ask is to say this:
>
> I do not want to support html and that if html is sent, it should be converted
> to text. I want to preserve the pgp key if the user sent plain text but if a
> conversion occurs then the value of the attached signature is useless. So
> basically I think I'm answering my own question. If I want to support html
> then I might worry about a pgp signature, but if a conversion happens then why
> bother?
>
> I'm still curious what was meant by multipart/signed.
>
>   
>> Michael
>>
>> Steven W. Orr wrote:
>> I currently have attachment_rules and attachment_filters settings as:
>>
>> configset listname attachment_rules <<ENDAAM
>> text/plain | require
>> ENDAAM
>>
>> configset frambors attachment_filters <<ENDAAL
>> text/plain | allow
>> /./ | discard
>> text/html | format
>> text/enriched | format
>> ENDAAL
>>
>> I would like to support PGP signature attachments so that they are not
>> stripped out.
>>
>> A typical PGP signature attachment will look like this
>>
>> Content-Type: application/pgp-signature; name="signature.asc"
>> Content-Description: OpenPGP digital signature
>> Content-Disposition: attachment; filename="signature.asc"
>>
>> Also, I see this line before the first MIME header.
>> This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
>>
>> Is there something I can do to allow these through?
>>
>> Also, in the help configset_attachment_filters verbage, it says something
>> about signed messages, but I'm not clear if this is on a different topic.
>>
>> [The keep action
>> ---------------
>> The keep action causes a body part to be passed untouched.  If the body
>> part has subparts, those also will remain untouched.  For example,
>> to allow a signed message to be posted without alterations, use the
>> following rule:
>>
>> multipart/signed | keep]
>>
>> Does this help me?
>>
>> TIA
>>
>>     
>
> - --
> Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
> happened but none stranger than this. Does your driver's license say Organ ..0
> Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
> individuals! What if this weren't a hypothetical question?
> steveo at syslang.net
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.10 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkpqIOQACgkQRIVy4fC+NyTaSQCbBjJQNIVFYsCf4lTnga86PkZ+
> WR8AnRT5ydqUn/V0o0fa0xKUc3qxiarL
> =QuT8
> -----END PGP SIGNATURE-----
>
>