Getting maildir to work properly

Red Squirrel

No Lifer
May 24, 2003
70,418
13,721
126
www.anyf.ca
I decided to switch to Maildir, but I'm getting nothing but trouble.

1) any emails that procmail puts in a folder are completely ingored by the mail cient (but they do go in the folder, in cur folder to be exact)

2) every time I log in, a folder called inbox is created inside the trash can, and it contains another folder and if I click it I get an error that it does not exist. Also another randomly generated one apears in the root, called something like INBOX^INBOX^...s^TEMPLATES but it's random, it seems. that one just disapears if I click anywhere. just VERY bothersome to have random folders created like this.

Question is, is this worth the trouble? Or should I just stick to Mbox? And at least with Mbox I don't have to worry about the inode limit.


Edit: I just tried with squirrelmail, and it seems to be less disasterous, #2 does not apply, only #1. So maybe thunderbird does not support Maildirs correctly or something. But emails in subfolders not showing up is still a very big problem that I either have to figure out how to fix, or just go back with Mboxes. Even a mbox with 5000 emails is not all that slow. The only danger is corruption.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
1) They should go into the new folder, otherwise they're already being marked as read. If you're telling procmail to put them in cur directly you shouldn't be doing that, it supports Maildir properly and should just be told to put mail in the correct Maildir.

2) Thunderbird has never supported local, direct maildir access that I know of. You should be access the mail via a mail server interface like IMAP. Evolution does support direct Maildir manipulation though.
 

Red Squirrel

No Lifer
May 24, 2003
70,418
13,721
126
www.anyf.ca
Yeah my procmail is as follows:

:0fw
| spamc

:0 H
* ^subject:.*\[SPAM\]
/home/email_redsquirrel/Maildir/spam/


The maildir is called Maildir and spam is a subfolder of it, and contains cur, new and tmp

My mail procmailrc in /etc/procmailrc is as follows, maybe I did something wrong here:

VERBOSE=on
LOGFILE=/var/log/procmail.log
ORGMAIL=$HOME/Maildir/
DEFAULT=$ORGMAIL
DROPPRIVS=yes



But I guess problem #2 is solved, I just need to get a different mail client or stick to squirrelmail. Just out of curiosity does Ms Outlook support Maildirs? (if it even supports imap) Since that's what my parants use and I'm thinking of converting them to imap. But that's just a side issue, getting these maildirs working is #1 priority now.


And and just to confirm, procmail is dropping it in the right folder.

From {removed} Sun May 8 13:21:43 2005
Subject: [SPAM] test
Folder: /home/email_redsquirrel/Maildir/spam/new/1115572903.1916_0.b 1092



Oh and another thing I just thought of, does sa-learn (spamassassin's bayes scan utility) support maildir? I can't seem to find any indication of this in the --help or man file. This is important because I upgraded to debian so I could use that tool, as RH 8 did not support it.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Back when I used procmail I didn't have a global /etc/procmailrc, but that shouldn't matter. And it should be fine as all you need to do to tell procmail that it's a Maildir is end the path with a trailing slash.

And no Outlook doesn't support Maildir, all it supports for local mail that I know of is the MS PST file format. But if you're access the mail via IMAP the local storage format is irrelevant.
 

Red Squirrel

No Lifer
May 24, 2003
70,418
13,721
126
www.anyf.ca
Yeah it's with imap, isin't that the only way? Still not sure why mail is not showing up in the folders though, been searching on google, can't seem to find anything on this problem. really weird. Does it have to be chmodded any specific way?
 

Red Squirrel

No Lifer
May 24, 2003
70,418
13,721
126
www.anyf.ca
Bahh I'll just use Mbox. Way less complications. Everything is under control now, just need to tweak spamassassin, setup bayes and I'll be all set. I was hoping to have better luck with maildir though. But from what I hear mbox has a locking mechanism so that should prevent the chances of having 2 processes fighting over the same file.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Maildir is simple and works a lot better than mbox, you're obviously missing something simple. Have you read through the docs for the mail server you're using?
 

Red Squirrel

No Lifer
May 24, 2003
70,418
13,721
126
www.anyf.ca
Yeah but it did not cover the strange problems I was having. Now everything is working smooth, and not to mention I can use sa-learn, since it does not seem to support maildir anyway. Basically the biggest account is cron, which if I let grow, get's a few thousand emails, so that's when I notice a slight decline in performance... for that account.