On Sun, Apr 2, 2017 at 6:23 PM, Craig Russell <[email protected]> wrote:
> Just because I'm curious:
>
> Which email clients send xxx.pdf as mime-type text/plain instead of 
> application/pdf???
>
> Sounds like a 1992 mail client. Or is there more to the story?

As with most things, there is more to the story.  Here's the basic
facts, with no value judgment:

1) The mail client self reports itself as "The Bat! (v4.2.36.4) Professional".

2) The content type for the attachment in question is "pdf".

3) Content types always have a slash in them

4) The content type for this attachment, as provided by the Ruby mail
gem, is 'text/plain'.

After many many months with the current secmail tool, we have never
seen this before.  And may never again.

- Sam Ruby



>> On Apr 2, 2017, at 12:28 PM, [email protected] wrote:
>>
>> This is an automated email from the ASF dual-hosted git repository.
>>
>> rubys pushed a commit to branch master
>> in repository https://gitbox.apache.org/repos/asf/whimsy.git
>>
>> The following commit(s) were added to refs/heads/master by this push:
>>       new  3342ae1   override text/plain based on extension
>> 3342ae1 is described below
>>
>> commit 3342ae1e6823fd77388056f4d46df2726d2fc67c
>> Author: Sam Ruby <[email protected]>
>> AuthorDate: Sun Apr 2 15:27:52 2017 -0400
>>
>>    override text/plain based on extension
>> ---
>> www/secmail/models/attachment.rb | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/www/secmail/models/attachment.rb 
>> b/www/secmail/models/attachment.rb
>> index ee2dcba..8d340c6 100644
>> --- a/www/secmail/models/attachment.rb
>> +++ b/www/secmail/models/attachment.rb
>> @@ -15,7 +15,7 @@ class Attachment
>>   def content_type
>>     type = headers[:mime] || @part.content_type
>>
>> -    if type == 'application/octet-stream'
>> +    if type == 'application/octet-stream' or type == 'text/plain'
>>       type = 'text/plain' if name.end_with? '.sig'
>>       type = 'text/plain' if name.end_with? '.asc'
>>       type = 'application/pdf' if name.end_with? '.pdf'
>>
>> --
>> To stop receiving notification emails like this one, please contact
>> ['"[email protected]" <[email protected]>'].
>
> Craig L Russell
> Architect
> [email protected]
> P.S. A good JDO? O, Gasp!
>
>
>
>
>

Reply via email to