Ticket #230 (closed Bugs: fixed)

Opened 21 months ago

Last modified 19 months ago

Invalid cache filenames created from POP message UIDs

Reported by: krastatter Owned by: octo
Priority: normal Milestone: 2.0
Component: LogicMail Version: 1.9.1
Keywords: Cc: krastatt@…
Blocked By: Blocking:

Description (last modified by octo) (diff)

Hello, I'm trying to use LogicMail 1.9.1.208 on my Blackberry 9650 Verizon OS 5.0.0.732. I can connect to my POP inbox just fine and I can see all of the message headers listed in the INBOX. However, the icon next to the each of the headers are "closed envelopes with a corner cut off" instead of complete envelopes. Selecting a message only displays it's header and a blank message body.

Here are some data. I suspect that item 2 is the cause of the issue.

  1. Looking at the blackberry log, I first see several of these that I think appear when a message is downloaded:
    Name: LogicMail
    GUID: 6bc611e33074e780
    Time: Sep 06, 2010 15:01:45
    Unable to write message to cache
    invalid character in name
    
  2. When I try to view a message, this appears in the error log:
    Name: LogicMail
    GUID: 6bc611e33074e780
    Time: Sep 06, 2010 21:21:47
    Unable to read token: file:///SDCard/BlackBerry/logicmail/cache/d6ab693c2e2e038c/d6ab693c2e2e038c/<AANLkTi=HmeCMneW-U+BHamLyPLs11xN5x45CxOty6bqC@mail.gmail.com>.msg
    invalid character in name
    
    (I suspect that the root cause of the problem is here.)
  1. I can see that there is a empty directory on my SD card called "file:///SDCard/BlackBerry/logicmail/cache/d6ab693c2e2e038c/d6ab693c2e2e038c/"
  1. All of the permissions are set to Allow except for "Security Timer Reset=Deny" (company policy)
  1. I can read e-mail with LogicMail 1.1.0 just fine.

I've been using LogicMail since around version 1.0.3 and this is my first attempt at the 1.9.x branch.

Change History

comment:1 Changed 21 months ago by octo

  • Status changed from new to accepted
  • Owner set to octo
  • Summary changed from POP headers downloaded OK, but body of message is empty to Invalid cache filenames created from POP message UIDs
  • Milestone set to 2.0

First, thanks for the useful bug report. The exact cause of this problem is obvious from it, and have renamed the ticket accordingly. :-)

Out of curiosity, do you know what POP server software is running on the server you're connecting to?

Now for my description of the issue, and how I need to fix it:
It appears as though POP message UIDs can contain characters that are invalid for use in filenames. To fix this, the MailFileManager needs to use an encoding (such as URL encoding) for converting between message UIDs and filenames. Since IMAP message UIDs are purely numeric, adding the encoding step will be a complete pass-thru for those messages.

comment:2 Changed 21 months ago by octo

  • Description modified (diff)

comment:3 Changed 21 months ago by krastatter

  • Cc krastatt@… added

Out of curiosity, do you know what POP server software is running on the server you're connecting to?

I'm connecting to a Time Warner Cable POP server. When I telnet to port 110 on it, I see this version message:

AVG POP3 Proxy Server 9.0.845/9.0.851 [271.1.1/3111]

comment:4 Changed 21 months ago by octo

  • Status changed from accepted to closed
  • Resolution set to fixed

This should now be fixed.

comment:5 Changed 21 months ago by octo

  • Status changed from closed to reopened
  • Resolution fixed deleted

Okay, this issue does not appear to be fixed. Apparently the chosen URL Encoding makes heavy use of the "%" character, which is also not allowed in filenames.

I'll have to figure out which special characters are allowed, and modify the encoding scheme accordingly.

comment:6 Changed 21 months ago by octo

Okay, hopefully build 210 fixes this once and for all. :-) I'll let you close this ticket after testing it.

comment:7 Changed 20 months ago by krastatter

The good news is that I no longer see the :

"Unable to write message to cache

invalid character in name"

errors (or any other errors) in the log when LogicMail is downloading a header. For example, looking at the log I can see a message header downloaded without errors:

Name: LogicMail GUID: 6bc611e33074e780 Time: Sep 13, 2010 19:00:46 [RECV] +OK 6360 <02F1B6525D340971@…>

The bad news is that the ".msg" files are still not being written to the SD card even though I don't see any error messages in the log. I still get the "Unable to read token" when I click on a message:

Name: LogicMail GUID: 6bc611e33074e780 Time: Sep 13, 2010 19:23:52 Unable to read token:  file:///SDCard/BlackBerry/logicmail/cache/ d6ab693c2e2e038c/d6ab693c2e2e038c/ !3C02F1B6525D340971!40mylibrary.org!3E.msg File not found

comment:8 Changed 20 months ago by octo

Is this error on just certain messages, or on all messages? If its on certain messages, are they big ones? You might want to try going into the advanced account settings and increasing the setting for max lines per message. (the default is 400, which might be too low)

I have noticed the same file-not-found log message you still see myself, recently, but it hasn't caused any problems. I'll have to do more investigation.

comment:9 Changed 20 months ago by krastatter

Is this error on just certain messages, or on all messages?

All messages.

increasing the setting for max lines per message. (the default is 400

I've tried various settings such as 400, 1000, 4000 and 8000 without effect.

Suggestion: I've opened a test e-mail account on Roadrunner's POP server and I sent it a single plain text message. LogicMail 1.9.210 was able to connect to the POP sever and read the message's header but it did not display the message body. I could send you the login credentials for this dummy account and will be able to reproduce the problem.

comment:10 Changed 20 months ago by octo

Since I use RoadRunner, and technically already have access to a RoadRunner POP server (just needed to get my password reset, since I use that account every 4th blue moon), I was just able to test it myself.

As it turns out, I forgot to call my UID-to-filename encoding method in one place, where it was flushing stale messages from the cache. So it was actually creating the file, then accidentally deleting it, then blowing up when it tried to read it.

So I've checked in a fix for the error, as well as a couple other minor fixes that should prevent similar errors from actually causing failures. Hopefully the build you grab in the morning should work again.

comment:11 Changed 19 months ago by krastatter

The first time I click either a "text/plain" or "text/html" e-mail, I can read them. The second and subsequent times I click on a "text/plain" e-mail, I can still read it.

The second time I click on a "text/html" e-mail, I only see the header.

Thanks for the progress! I'm able to once again use LogicMail to read my POP mail. Should I leave this bug open or close it and create a new one?

comment:12 Changed 19 months ago by octo

  • Status changed from reopened to closed
  • Resolution set to fixed

That would be a totally unrelated issue, so I'd create a separate bug for it.

Note: See TracTickets for help on using tickets.