Escape Character Required for atachment names

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
porcupine
Normal user
Normal user
Posts: 40
Joined: 2007-03-12 09:02

Escape Character Required for atachment names

Post by porcupine » 2016-09-06 10:34

Hi Guys,

I recently started to use eM Client and noticed some strange behavior. After some log investigation, it turns out that I had a rogue email that caused the IMAP session to exit. I contacted the eM Client support team and reported the issue. They have concluded it is because the attachment filenames presented by hMailServer are not escaped correctly when there is a double-quote in the filename (admittedly this attachment has an obscure filename):

Code: Select all

"attachment" ("FILENAME" "STI NEWS;"SERVICE TAX REGISTRATION PROCEDURE & DOCUMENT REQUIRED WEF 01.03.2015"plus 3 more.eml"))
should be

Code: Select all

"attachment" ("FILENAME" "STI NEWS;\"SERVICE TAX REGISTRATION PROCEDURE & DOCUMENT REQUIRED WEF 01.03.2015\"plus 3 more.eml"))
Full logs attached.

I am using: hMailServer 5.6.5 - Build 2367

eM Client has the best IMAP IDLE support I have seen, it really provides a "push email" experience. Shame that its only free for 1 email account and non-commercial use. Thunderbird has lost the plot for IMAP IDLE since v14 and even then it was a bit flakey.

Thanks

Alex
Attachments
porcupine_server_log_1.zip
(2.45 KiB) Downloaded 57 times

User avatar
mattg
Moderator
Moderator
Posts: 20281
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Escape Character Required for atachment names

Post by mattg » 2016-09-09 10:59

I just tried to create such a file to test, and windows won't let me create a file named

STI NEWS;"SERVICE TAX REGISTRATION PROCEDURE & DOCUMENT REQUIRED WEF 01.03.2015"plus 3 more.eml

Windows errors saying that a filename can't contain any of the following characters
/\:*?<>"|


googling I see that this is a long held Microsoft standard >> https://msdn.microsoft.com/en-us/librar ... s.85).aspx
porcupine wrote:Thunderbird has lost the plot for IMAP IDLE since v14 and even then it was a bit flakey.
Interesting observation.

I use Thunderbird extensively and find IMAP IDLE works great. What issues had you experienced?
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

porcupine
Normal user
Normal user
Posts: 40
Joined: 2007-03-12 09:02

Re: Escape Character Required for atachment names

Post by porcupine » 2016-09-09 12:16

The attachment in this particular email is an email that was forwarded as an attachment. The quotes are in the subject of that forwarded email so it could actually contain all of the non-supported characters. This then impacts on how hMailServer delivers the encapsulating email and its attachments to the client. Thunderbird, Outlook, Roundcubemail and Squirrelmail seem to be able to cope with this, eM Client cannot, which is why I went to the eM Client devs first. Out of the 30,000 emails in my mailbox I had 2 like this, its rare but real. I've been running hMailServer for 10 years so these odd emails might have crept in a long time ago.

I started noticing that incoming email alerts in Thunderbird were not as good as my phone, so I did some checking with internet connections, TB settings, hMailServer itself (performance/caching etc), TTL's yada yada... then regressed TB back to older versions and eventually found v14 was pretty much OK. eM Client proved to be better still, although its a shame its not free and frankly I prefer the TB user interface.

User avatar
mattg
Moderator
Moderator
Posts: 20281
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: Escape Character Required for atachment names

Post by mattg » 2016-09-10 00:45

porcupine wrote:Thunderbird, Outlook, Roundcubemail and Squirrelmail seem to be able to cope with this, eM Client cannot...
I think therein lies your answer, despite what the devs of eM Client say
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
SorenR
Senior user
Senior user
Posts: 3228
Joined: 2006-08-21 15:38
Location: Denmark

Re: Escape Character Required for atachment names

Post by SorenR » 2016-09-10 15:07

Could the problem be similar to this ??

viewtopic.php?f=10&t=15394

I'm not sure but could it be this standard ???
https://www.ietf.org/rfc/rfc2047.txt

Anyways, we need to see the mime headers of the email in order to correlate it to the IMAP statement...
SørenR.

“With age comes wisdom, but sometimes age comes alone.”
- Oscar Wilde

porcupine
Normal user
Normal user
Posts: 40
Joined: 2007-03-12 09:02

Re: Escape Character Required for atachment names

Post by porcupine » 2016-09-16 05:00

Not sure on the exact match of that issue, that one seems related to spaces in the file names.

I have attached the full email, its not very big, it won't cause sleep to occur during analysis :-)

As I have now removed the problem email(s) from my mailbox and I have revert to using the latest Thunderbird, the IMAP IDLE feature appears to now be working as expected. Coincidence perhaps...
Attachments
porcupine_email_1a.zip
(14.27 KiB) Downloaded 44 times

Post Reply