We have moved to a new Sailfish OS Forum. Please start new discussions there.
4

Mail program adds .bin to end of filename.pdf

asked 2017-04-26 17:37:43 +0300

MJolla gravatar image

There is some kind of bug in mail software. My payroll report is pdf file (only file where this bug is recognized) and when I download that mail attachment which is pdf-file after downloading that attachment I click open file and Sailfish says that unsupported file. Then when I find right file with file browser i noticed that file name is filename.pdf.bin so somehow my phone adds .bin after these files. When I use file browser to rename file to pdf I can open file normally. It's quite annoying that you can view it as fast as should and you have to locate file and rename before opening.

And yes I know it propably badly created pdf, but it works with every other systems and even with Sailfish when drops that .bin from filename. Why Sailfish adds .bin to filename. This isn't so bad bug because it's only two times month when I get these pdf files. Every other pdf files is ok and works normally.This has been allways, but now I get angry enought to write here.

edit retag flag offensive close delete

Comments

1

With another mailer (thunderbird, or whatever) where you have this email, may you look for the source of the email (CTRL+U in thunderbird for instance) and copy paste the result here, without private information and without the data for the attachment ?

Damien Caliste ( 2017-04-26 18:05:01 +0300 )edit
2

Delivered-To: XXXXXXXX@gmail.com Received: by 00.00.00.00 with SMTP id j14csp302635ioi; Wed, 26 Apr 2017 04:48:06 -0700 (PDT) X-Received: by 00.00.00.00 with SMTP id l202mr12691566lfe.147.1493207286068; Wed, 26 Apr 2017 04:48:06 -0700 (PDT) Return-Path: xx@xxxi.fiReceived: from eilopu.iki.fi (eilopu.iki.fi. [212.16.98.57]) by mx.google.com with ESMTPS id 1si1492459lji.180.2017.04.26.04.48.05 for pejkallio@gmail.com(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 26 Apr 2017 04:48:06 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning xx@xx.fi does not designate 212.16.98.57 as permitted sender) client-ip=00.00.00.00; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning xx@xx.fi does not designate 00.00.00.00 as permitted sender) smtp.mailfrom=xx@xx.fi Received: from smtp-out-node1.seclan.com (smtp-out-node1.seclan.com [109.70.160.97]) by eilopu.iki.fi (8.15.2/8.15.2) with ESMTPS id v3QBlwPg004064 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for xyx@xx.fi; Wed, 26 Apr 2017 14:48:05 +0300 (EEST) Message-Id: 201704261148.v3QBlwPg004064@eilopu.iki.fiReceived: from xx.fi (unknown [109.70.163.162]) by smtp-out-node1.seclan.com (Postfix) with ESMTP id B401F9D359 for xyx@xx.fi; Wed, 26 Apr 2017 14:47:58 +0300 (EEST) MIME-Version: 1.0 From: "XXXXXX" xx@xx.fiTo: xyx@xx.fi Date: 26 Apr 2017 14:47:58 +0300 Subject: Palkkalaskelmasi kaudelta 8/2017 Content-Type: multipart/mixed; boundary=--boundary_135_fbd09803-a28a-44a1-bd02-82c3913247f5

----boundary_135_fbd09803-a28a-44a1-bd02-82c3913247f5 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable

Liitteen=E4 henkil=F6n XXXXXXXXXXXXX palkkalaskelma kaudelta 8/2= 017.=0D=0A=0D=0AT=E4m=E4 on palkkaj=E4rjestelm=E4st=E4 automaatti= sesti luotu viesti, =E4l=E4 vastaa t=E4h=E4n. ----boundary_135_fbd09803-a28a-44a1-bd02-82c3913247f5 Content-Type: application/octet-stream; name="Palkkalaskelma 8 2017.pdf" Content-Transfer-Encoding: base64 Content-Disposition: attachment

JVBERi0xLjQNCjEgMCBvYmoNCjw8IC9UeXBlIC9DYXRhbG9nDQovUGFnZXMgMyAwIFIN Ci9QYWdlTW9kZSAvVXNlTm9uZQ0KL091dGxpbmVzIDIgMCBSDQo+Pg0KZW5kb2JqDQoN CjIgMCBvYmoNCjw8IC9UeXBlIC9PdXRsaW5lcw0KL0NvdW50IDANCj4+DQplbmRvYmoN XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX bnQgMQ0KPj4NCmVuZG9iag0KDQo0IDAgb2JqDQo8PCAvVHlwZSAvUGFnZQ0KL1BhcmVu dCAzIDA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XXXXXXXXXXXXXXXXXXXXXXXXXXxX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXxX L1Jvb3QgMSAwIFIgPj4NCnN0YXJ0eHJlZg0KODQ1Ng0KJSVFT0Y= ----boundary_135_fbd09803-a28a-44a1-bd02-82c3913247f5--

MJolla ( 2017-04-26 23:15:23 +0300 )edit
2

Thank you, that's interesting.

With exactly these sources, I forwarded the message to my email account, but I cannot reproduce, the file is saved as PDF on my phone. But looking at the code for application/octet-stream content type (as declared in the mail), there may be one reason for the code to append .bin.

Indeed, in QMF qmailmessage.cpp#6295, the test is not done case insensitive as everywhere else. If the comparison fails, then `.bin is indeed appended. With the sources you've sent, the comparison succeeds so it may not be the reason.

If you have a terminal access on the phone (developer mode activated), you may try the following:

  • cd ~/.qmf/mail
  • grep "boundary_135_fbd09803" *, will give you the name of the file where the mail is stored locally on device.
  • cat this_file_name will show you the mail structure. If application/octet-stream is not fully lower case, then bingo, otherwise, I need to find another reason…
Damien Caliste ( 2017-04-27 00:46:04 +0300 )edit
1

i experience same behavior with jpgs=( saving from mail client leads to jpg.bin files

virgi26 ( 2017-04-27 02:49:19 +0300 )edit

I checked that reason wasn't the pdf file, because I downloaded that with computer and send it again to same email address and it works as it shoul be. So there's maybe something in mail structure which creates this bug or something else.

Here's end of that file: Date: Wed, 26 Apr 2017 11:47:58 +0000 Subject: Palkkalaskelmasi kaudelta 8/2017 Content-Type: multipart/mixed; boundary=--boundary_135_fbd09803-a28a-44a1-bd02-82c3913247f5 MIME-Version: 1.0

----boundary_135_fbd09803-a28a-44a1-bd02-82c3913247f5 Content-Type: TEXT/PLAIN; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; size=181

----boundary_135_fbd09803-a28a-44a1-bd02-82c3913247f5 Content-Type: APPLICATION/OCTET-STREAM; NAME="Palkkalaskelma 8 2017.pdf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; size=11952

----boundary_135_fbd09803-a28a-44a1-bd02-82c3913247f5--

MJolla ( 2017-04-27 07:30:04 +0300 )edit

1 Answer

Sort by » oldest newest most voted
5

answered 2017-04-27 17:48:13 +0300

updated 2017-05-02 21:08:27 +0300

I've opened a mer bug to follow the issue and submitted a merge request with the patch.

For those who wants to test, I've compiled a patched RPM of the messaging framework used for email handling. The md5sum of it is 842a5a9985f430cc9e07e0b7972c5634, install it with pkcon install-local libqmfclient1-qt5-4.0.4+git61+bin.20170427142707.1.g12a9722-10.19.1.jolla.armv7hl.rpm. Stop and restart the Jolla email client. When a new mail is coming, check that the PDF file is saved with the proper name.

Use at your own risk. To restore the previous version, in a terminal, run pkcon install libqmfclient1-qt5, it should download the official version from Jolla repository and install it again.

Edit: created a package for 2.5.0.x OS version. Its md5 is 2b9d77b9f64501521d414160bccb429f

edit flag offensive delete publish link more

Comments

@Damien Caliste, I am not sure all of this is actually a bug. My local landline telecom provider manages to send invoices the same way (PDF attachment, but also declaring it as "application/octet-stream", basically meaning "some data of no type"). On a MacOS machine at work, it opens in a text viewer (the default application for "some data of no type") when double-clicked in the e-mail application. It is a matter of declaring a proper content type.

What I consider a bug though is mangling with the file name when MIME explicitly gives you a name. And well spotted, it is caused by an all-caps MIME type declaration, which is perfectly valid. Your patch is very welcome!

Maus ( 2017-04-28 01:01:14 +0300 )edit

Should I have the newest Sailfish? I'll get fatal error "Fatal error: nothing provides libQt5Core.so.5(Qt_5) needed by libqmfclient1-qt5-4.0.4+git61+bin.20170427142707.1.g12a9722-10.19.1.jolla.armv7hl " I have 2.0.5.6 .

MJolla ( 2017-04-29 08:31:25 +0300 )edit

@MJolla thank you for testing, but sorry, yes the RPM was built for latest Sailfish with Qt 5.6. I don't have the 2.0.5.x SDK anymore. I'll see next week if it is still available for download and try to build a package for this version.

Damien Caliste ( 2017-04-29 09:44:36 +0300 )edit

Good Work Damien! I tested this with Jolla1 with 2.1.0.11 and it fixes that issue. So it would be nice to get in in my Intex also. Newest sailfish was unable to use with Intex (Jolla C software) so I have to use 2.0.5.6.

MJolla ( 2017-04-29 10:17:12 +0300 )edit
2

I'm happy this patch actually solve your problem. I'll try to create an RPM for 2.0.5.x next week. Besides, this is IMHO a good example of the advantage of Open Source : minor issues that are not tracting enough attention may stay uncorrected for a long time in closed source development depending on work force in the development company, while with Open Source there is still the hope that someone may look at it. Even if I often complain about the UI being closed source, I thank Jolla for using Open Source backend for almost everything on SFOS.

Damien Caliste ( 2017-04-29 23:07:49 +0300 )edit
Login/Signup to Answer

Question tools

Follow
3 followers

Stats

Asked: 2017-04-26 17:37:43 +0300

Seen: 527 times

Last updated: May 02 '17