Hastymail2

Hastymail2 is an Open Source IMAP webmail client written in PHP. Our focus is compliance, usability, security, and speed.

Hastymail 2

avatar
Phantom Entries in Folder List

Hi Jason,

I don't know if this is my misudnerstanding of the protocol, a bug, a configuration error or something weird with my host's IMAP server.

I'm trying to create mail folders outside of the INBOX, that is, at the same level of hierarachy as the INBOX on the folder list. There doesn't appear to be a way to do this from within Hastymail, so I'm accessing the storage on my mail account directly and creating directories manually.

Hastymail reads the directories fine and displays them, but then it also reports a phantom file in addition to the mail folder. For example,

FILED/Test File

is the mailbox in the FILED folder, but Hastymail is also reporting:

FILEDNILTest File

Which I can't hide using the folder manager.

It woudl appear the problem has something to do with the path deliminator because Hastymail is reported a NIL. But I may just be doing things wrong as far as creating folders and mailboxes. Do they all have to be under the INBOX in IMAP.

Any suggestions would be most appreciated.

Cheers!

Rob

Reply /Quote
avatar
Re: Phantom Entries in Folder List

Rob,

   The IMAP protocol is flexible when it comes to folder hierarchy rules. Various IMAP servers supply folder information in slightly different ways. Some of this is dependent on the underlying mailbox storage type. It can make a client writers job a bit of a pain at times. If not done properly creating folders via the cli can have unusual effects, so that might be related to what you are seeing. It is possible that the IMAP server itself has a problem with the folder and is reporting something weird to hastymail, or it could be we are not handling it properly.

   The first thing to do is find out what IMAP server you are using. Clicking on the Hm2 icon in the upper left of the hastymail interface loads the "About" page. There you will find an IMAP server section which should identify the software. Next try enabling the show_imap_debug and full_imap_debug options in your config. After logging in scroll down below the interface and there should be a bunch of debug information. In the "Full response data" section the third entry (index 2) has the IMAP server response to the LIST command. This is what we use to build the folder hierarchy with. It does appear that it could be a delimiter problem, have you tried explicitly setting the IMAP delimiter in your hastymail config? Also, what do you have set for the imap_folder_prefix option?

If you don't want to post this information in the forums you can email me at jason@hastymail.org or open a bug in the tracker. Thanks again for the feedback. 

Jason

 

Reply /Quote
avatar
Re: Phantom Entries in Folder List

Hi Jason,

Okay, I've done some exploring and I think I know what the problem is, but I don't know how to solve it.

My IMAP server's delimiter in NIL. This is permitted by the protocol.

Where it's a problem is when I want to create nested folders. I can't create nested folders in Hastymail, and I don't know if that's a Hastymail limitation or a problem created by my server.

In the IMAP library, it's possible to override the default delimiter, but my fiddling with it hasn't resulted in any success.

When I manually create mailboxes, that just confuses everything.

Hopefully that better suggests a plan of action.

Cheers,

Rob

 

 

Reply /Quote
avatar
Re: Phantom Entries in Folder List

 Below is the string my server responds with in response to the CAPABILITY command. I can't figure out what server software is running from this.

 

* CAPABILITY IMAP4REV1 LITERAL+ IDLE UIDPLUS NAMESPACE CHILDREN MAILBOX-REFERRALS BINARY UNSELECT ESEARCH SCAN SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND SASL-IR LOGIN-REFERRALS A2 OK CAPABILITY completed

 

 

Reply /Quote
avatar
Re: Phantom Entries in Folder List

I can't tell either. Can you enable the show_imap_debug, then the show_full_debug options in your config, login to hastymail, then copy/paste me the results? The debug info will show below the interface. It should help identify what is going on. Btw, I was looking at a courier IMAP test system the other day and I remembered that with that IMAP server all folders are subfolders of the INBOX. By setting the imap_folder_prefix to INBOX hastymail then is able to display these subfolders as if they were peers to the INBOX rather than subs. Not sure that is relevant to what you are experiencing or not.

You can send the debug to jason@hastymail.conf

Thanks,
Jason

Reply /Quote
avatar
Re: Phantom Entries in Folder List

Hi Jason,

I've e-mailed the  debug info to you. Sorry for the delay. I go tbusy then sick.

I figured out how to create nested folders in Hastymail. When asking for a new folder name, I enter "test1/test1a" which creates the folder test1a in the folder test1.

Thanks for all your help.

Rob

 

Reply /Quote
avatar
Re: Phantom Entries in Folder List

Creating folders that way indicates that / is your delimiter (and the debug output confirms this). Your folder page should have a select box after the folder name field to select the parent folder (test1 in your example). Does that work to create subfolders? Looking at the debug you sent I would say you could be runing UW IMAP, since it uses a very filesystem like approach to IMAP folders. The list output shows files that are obviously not intended to be accessed via IMAP, like .cshrc for example. I would recommend creating a folder to hold all IMAP folders and using the imap_folder_prefix option in the hastymail2.conf file. The example in the config for UW assumes the folder you create is named mail.

Hope that helps,
Jason

Reply /Quote
avatar
Re: Phantom Entries in Folder List

Thanks Jason, you hit it on the head.

Before I saw your message I confirmed with my ISP that it was UW IMAP.

With your guidance in setting the configuration options correctly it now appears to work as it should.

Sorry to have taken your time on what was really a configuration error on my part.

Cheers!

Rob

 

Reply /Quote
avatar
Re: Phantom Entries in Folder List

I'm glad things are working correctly now. Thanks for the feedback, we appreciate the support.

Take care,
Jason

Reply /Quote
avatar
Re: Phantom Entries in Folder List

Jason,

We have been running RC6 for about a month and HM2 just keeps getting better.

However, like the first poster in this thread, I see this same "NIL" non-entry in the folder file list that was reported.  I do not remember seeing this before, and as you remember, we had some problems managing the large number of folders we have, leading to your elegant "select all" X solution at the top of the lists.  I think I would have noticed the "NIL" entries then if I had seen them (they do stand out), so I have a feeling that this is new. 

We do use UW imap, but we have been running the same version on the same server for years now. 

For an example of the problem, in my root directory I have three subdirectories named "predict_extrap", "flexbin", and "ccc.  This is how they appear in the folder select list:

 

predict_extrap

predict_extrap/a.out
predict_extrap/tstburg.for
predict_extrapNILtstburg.for

flexbin
flexbin/NOTES
flexbinNILNOTES

ccc
ccc/a.out
ccc/t.for
cccNILt.for

All 3 directories are flagged as "hidden", and appear in a greyed-out text.  The "NIL" entries are in the normal black text, probably because they are not marked as "hidden", however the checkboxes "hidden" and "Check for new mail" are greyed out and not checkable for those "NIL" names.  As you can see, the "NIL" name has the "NIL" where the "/" was on a previous entry, and the fake name continues to a matching previous full name. 

Note that these are existing folders, several years old, and were not created by hm2. 

I actually have more than 30 subdirectories, and several of them have subdirectories, and I get a "NIL" list entry for every level of each sub[sub]directory.

I have kept the previous RC releases available, and I will re-install a previous one and see what the folder list looks like.  Once you solved the folder management selection and we set ourselves up I hadn't needed to visit the folder page. I will do that this weekend and let you know what I find out.

 

Anyway, congrats on RC6, a nicely crafted, and from our experience, solid piece of software. 

Warren Kolar

 

 

Reply /Quote
avatar
Re: Phantom Entries in Folder List

Warren,

   Good to hear from you again, I hope you are doing well. I would love it if you could give the latest code a try and see if your phantom folders remain. The list of changes since RC6 is significant and I hope to get RC7 out soon (if I can just find some free time!). You can grab the latest SVN here:

http://hastymail.svn.sourceforge.net/viewvc/hastymail/trunk/hastymail2.tar.gz?view=tar

Take Care,
Jason

Reply /Quote
avatar
Re: Phantom Entries in Folder List
Jason,

Thanks, I am doing fine, I hope all is well with you.  RC7 already out - you have been busy.

 I am so sorry for being so late with my tests.  This is such a minor thing that I am almost embarrassed to follow up.  However as a programmer I know that sometimes minor things can illuminate other unknown issues. At any rate, I have now loaded RC7 and the "nil" files remain.

The change seems to have occurred going from RC5 to RC6, and is still present in RC7.

Here is my test setup.

-----------------------------------

Machine A: has RC1 through RC7 trees in /srv/www/htdocs, rc files in /etc/hastymail2/hastymail2.rc_1 through 7

Machine B: has RC7 tree in  /srv/www/htdocs

1) Set both machines hastymail2 tree to RC7, hastymail2.rc file to RC7

Login to both machines at same time

    Result: Both show "nil" filenames on folder option page (as described in the earlier post)

2) Change Machine A hastymail2 tree to RC5, hastymail2.rc file to RC5

Login to both machines A and B at same time

     Result: Machine A (RC5) does not have "nil" filenames on folder page

      Machine B (RC7) does show "nil" filenames on folder page

3) Change Machine A hastymail2 tree to RC7, hastymail2.rc file to RC7

Login to both machines at same time

     Result: Both now show "nil" filenames on folder page

----------------------------------

Notes:

Both machines are talking to the same uw imap server at the same time.

I only renamed the hastymail2 trees and copied the matching rc files to change versions. I did not do anything else - like rebuild anything or reset parameters.

 ----------------------------------

 The "nil" files do not seem to cause any problems.  We now are all using hastymail2 to access our internal mail server and have not had any real problem since ... actually it has been stable for us since RC1!  That is a nice reflection on your hard work and craftsmanship.

Thanks again.

Warren Kolar

 

 

Reply /Quote
avatar
Re: Phantom Entries in Folder List

Warren,
   As always it is great to hear from you again, and thanks for your kind words. Sorry that this problem is persisting. UW is a bit of a pain when it comes to folders :) Just to make sure that the problem can not be solved via configuration changes could you send a copy of your RC7 hastymail2.conf file to jason@hastymail.org? I need to setup a few test environments this weekend to address this and another recently reported bug but before I do it would be great to be able to replicate you config so that I am properly reproducing the conditions.

Hope the seismic services biz is treating you well :)
Take care,

Jason

Reply /Quote
avatar
Re: Phantom Entries in Folder List

Jason,

I just sent my conf files to you.  I hope enjoying your weekend has a much much much higher priority than this.  (This is back-burner stuff, way back).

Thanks again for your time.

Warren 

Reply /Quote
avatar
Re: Phantom Entries in Folder List

After spending some time debugging this I wanted to share the results with the forums. You can correct this problem by setting the imap_folder_delimiter_override value in your hastymail.conf file to the delimiter ("/" for UW IMAP). Note that current release version have a typo in the config file and the setting does not actually work unless corrected because the setting name itself is spelled incorrectly (there is one extra "r" in "override"). The correct setting should be:

imap_folder_delimiter_override = /

Thanks to everyone for their feedback and patience to help get this worked out.

Jason

Reply /Quote
Get Hastymail at SourceForge.net. Fast, secure and Free Open Source software downloads