<div class="markdown">
<p dir="auto">On 27 Jan 2016, at 23:56, Philip Paeps wrote:</p>
<blockquote>
<p dir="auto">While tinkering with my PGP-mystery earlier today, I discovered that my hacked up stylesheet.css has left me with a bright yellow box / frame on a cream background in some cases (partially signed messages).</p>
<p dir="auto">How would I go about changing the style of partially signed messages? I am guessing it's something like this but with different <code>type=</code> and <code>subtype=</code> parameters.</p>
<p dir="auto">div.bodypart[type=message][subtype=rfc822] { }</p>
</blockquote>
<p dir="auto">No, that would target embedded emails (“Forward as Attachment”).</p>
<p dir="auto">I think you can target a signed part like this:</p>
<pre><code>div.bodypart[type=multipart][subtype=signed] { }
</code></pre>
<p dir="auto">But the yellow border is currently hardcoded as can be seen in this part of the generated HTML:</p>
<pre><code><div class="message">
<div class="bodypart" unique_id="247672" type="multipart" subtype="mixed" disposition="inline">
<div style="border-style:solid; border-width: 1px; border-color:yellow; padding: .5em; margin: .5em 0em;">
<div class="bodypart" unique_id="247673" type="multipart" subtype="signed" disposition="inline">
</code></pre>
<p dir="auto">It was a quick hack to make sure that MailMate clearly indicates if someone has taken a signed email and extended its content with unsigned body part(s). This is essentially what often happens on the mailing list when the footer is added.</p>
<p dir="auto">I've now changed it such that you can style it with a custom stylesheet. Look for <code>div.security</code> in the default stylesheet. I haven't changed how it looks (which is pretty ugly). You are welcome to share it if you come up with something better.</p>
<p dir="auto">Off topic related security fact:</p>
<p dir="auto">Last time I checked, Apple Mail handled this incorrectly for S/MIME messages. I reported it 3 years ago and it was marked as a duplicate, but it's still an open bug. I guess that means they don't think it's important and that I can share this information publicly...</p>
<p dir="auto">Checking again I can see that this is still a problem on El Capitan. My example message was an email from an Apple employee sent to a mailing list. I extended it with some additional text and an attachment. These parts are naturally unsigned, but Apple Mail displays it like everything is signed.</p>
<p dir="auto">At least it appears it's not possible to put the unsigned content before the signed content. It doesn't trigger a warning, but Apple Mail then simply ignores that the message has signed parts at all. I just realized that it <em>is</em> possible to make the signed part appear as an attachment. By providing a filename then it's even possible to make it appear as if it's some kind of failed logo. It looks like this:</p>
<p dir="auto"><img src="cid:B0EE9917-CB68-45C8-A59E-FBC72771415A@freron.com" alt="" title="apple_mail_example.png"></p>
<p dir="auto">There are no limits with regard to the text or attachments added to this message.</p>
<p dir="auto">I haven't checked any other email clients, but I doubt it's a common issue. I'm guessing most email clients would just ignore that the email is signed and/or encrypted. Also don't interpret it as me stating that MailMate is more secure than Apple Mail. MailMate has its own issues and I know Apple has plenty of security experts much more capable than I am. (I do think one of them should fix this bug though.)</p>
<p dir="auto">Note that the Apple employee used in my example is completely unrelated to the issue itself. He's not to blame. I just needed a publicly available email to construct a convincing example.</p>
<p dir="auto">I have attached the example email if anyone wants to try it out in Apple Mail or other email clients. That should also test how MailMate handles it...</p>
<p dir="auto">...and this shows that MailMate does not like the <code>attachment</code> disposition of the <code>multipart/signed</code> body part. It is shown both inline (as it should) and as an attachment (which is shouldn't). Worse, clicking “Quick Look” shows the wrong attachment.</p>
<p dir="auto">I've fixed these bugs and I've added a new feature: The context sensitive menu now includes a “Detach Message” menu item. This extracts the attached email and puts it in the same mailbox. It is also automatically selected. This is also useful for the “digest message” issue discussed recently on the mailing list.</p>
<p dir="auto">Hold down ⌥ when clicking “Check Now” in the Software Update preferences pane to get the test release.</p>
<blockquote>
<p dir="auto">A few more comments in stylesheet.css would be helpful. :)</p>
</blockquote>
<p dir="auto">Apparently I'm too busy ranting on the mailing list :-)</p>
<p dir="auto">-- <br>
Benny</p>
</div>