Murray Collingwood
2011-Apr-21 00:12 UTC
[Dovecot] Having trouble getting Dovecot to read a ~/Maildir configuration
Hi folks Setting up a new server, hence a few software packages have been upgraded / changed. On my old server (only 2 years old) I was using Dovecot and RoundCube (web mail app) and had a good experience so was keen to use these again. The only major change is I have switched from sendmail to exim4 (which was installed by default on this Debian server). Exim4 appears to be doing the right thing, however read on and see if you can spot the error. I've tried two email clients, RoundCube (via apache) as a local connection and Evolution as a remote connection. Both appear to login to the Dovecot IMAP connection okay (log entries included further down), although they don't see any email. The INBOX is completely empty. Although when I check out /home/postmaster/Maildir/new it has many messages waiting to be read. It's like Exim4 is delivering the email into the ~/Maildir folder but Dovecot is not seeing it.... I've tried these three combinations in dovecot.conf but they give the same result: #mail_location = maildir:~/Maildir (ie this one I commented the line out to see if Dovecot would work it out automatically) mail_location = maildir:~/Maildir (I think this one should work) mail_location = maildir:~/Maildir:LAYOUT=fs (Now I'm just desperate and will try anything) The dovecot log gives no indication of any errors: This is the version I am running - it was the default version for Debian installed via apt-get: 2011-04-21 08:55:22 dovecot: Info: Dovecot v1.2.15 starting up (core dumps disabled) This connection is using Evolution email client on Linux: 2011-04-21 08:40:05 imap-login: Info: Login: user=<postmaster>, method=PLAIN, rip=122.148.149.28, lip=202.125.41.111 This connection is using roundcube via apache on the same server: 2011-04-21 08:40:41 imap-login: Info: Login: user=<postmaster>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured 2011-04-21 08:40:41 IMAP(postmaster): Info: Disconnected: Logged out bytes=39/443 And finally a look at the ~/Maildir content for my "postmaster" user: root at ds5683:/etc/dovecot# ls -al /home/postmaster/Maildir total 148 drwx------ 6 postmaster postmaster 4096 Apr 21 08:55 . drwxr-xr-x 3 postmaster postmaster 4096 Apr 19 08:12 .. drwx------ 2 postmaster postmaster 12288 Apr 21 08:40 cur -rw------- 1 postmaster postmaster 89088 Apr 21 08:40 dovecot.index.cache -rw------- 1 postmaster postmaster 2376 Apr 21 08:40 dovecot.index.log -rw------- 1 postmaster postmaster 5208 Apr 21 08:40 dovecot-uidlist -rw------- 1 postmaster postmaster 8 Apr 21 08:55 dovecot-uidvalidity -rw------- 1 postmaster postmaster 0 Apr 21 08:34 dovecot-uidvalidity.4daf5f73 drwx------ 5 postmaster postmaster 4096 Apr 21 08:56 INBOX drwx------ 2 postmaster postmaster 12288 Apr 21 09:39 new drwx------ 2 postmaster postmaster 4096 Apr 21 09:39 tmp So, can somebody help me get Dovecot to recognise the messages in this mailbox please? You can suggest anything you like.... upgrades, conf changes, low level formating of HDD... at this stage I'm ready to try anything! Cheers Murray -- Murray Collingwood Focus Computing p +61 415 24 26 24 http://www.focus-computing.com.au
Stan Hoeppner
2011-Apr-21 01:10 UTC
[Dovecot] Having trouble getting Dovecot to read a ~/Maildir configuration
Murray Collingwood put forth on 4/20/2011 7:12 PM:> And finally a look at the ~/Maildir content for my "postmaster" user: > root at ds5683:/etc/dovecot# ls -al /home/postmaster/Maildir > total 148 > drwx------ 6 postmaster postmaster 4096 Apr 21 08:55 . > drwxr-xr-x 3 postmaster postmaster 4096 Apr 19 08:12 .. > drwx------ 2 postmaster postmaster 12288 Apr 21 08:40 cur > -rw------- 1 postmaster postmaster 89088 Apr 21 08:40 dovecot.index.cache > -rw------- 1 postmaster postmaster 2376 Apr 21 08:40 dovecot.index.log > -rw------- 1 postmaster postmaster 5208 Apr 21 08:40 dovecot-uidlist > -rw------- 1 postmaster postmaster 8 Apr 21 08:55 dovecot-uidvalidity > -rw------- 1 postmaster postmaster 0 Apr 21 08:34 > dovecot-uidvalidity.4daf5f73 > drwx------ 5 postmaster postmaster 4096 Apr 21 08:56 INBOX > drwx------ 2 postmaster postmaster 12288 Apr 21 09:39 new > drwx------ 2 postmaster postmaster 4096 Apr 21 09:39 tmp > > So, can somebody help me get Dovecot to recognise the messages in this > mailbox please?Is this the only IMAP 'account' showing this odd behavior? You have tested more than one account I assume--SOP for situations like this. We first need to nail down if the problem is global or local to this one account. And yes, it seems you probably want this: mail_location = maildir:~/Maildir:LAYOUT=fs instead of standard maildir++ layout. -- Stan
Stan Hoeppner
2011-Apr-21 02:32 UTC
[Dovecot] Having trouble getting Dovecot to read a ~/Maildir configuration
Murray Collingwood put forth on 4/20/2011 8:29 PM:> Hi Stan > > I only have the one account on this server, everything else is relayed > elsewhere.If this is an SMTP relay server, I'm surprised you bothered to install an IMAP server at all. It would have been easier to simply alias postmaster@ to another account on another machine where you do store mailboxes. I.e. simply 'forward' all postmaster mail to you main account and use Sieve to sort all postmaster mail into a folder. This is exactly what I do. It's what a lot of people do, especially those handling many domains, and thus having lots of postmaster addresses.> A question about where the mail is actually supposed to be delivered to... > initially I configured Exim4 to delivery the email to ~/Maildir and I > noticed as you saw in the list directories like ~/Maildir/new and > ~/Maildir/cur, however once I configured Evolution to login to Dovecot I > noticed the directories ~/Maildir/INBOX/new and ~Maildir/INBOX/cur were > created. Should therefore Exim4 be configured to ~/Maildir/INBOX instead of > just ~/Maildir ?Configuration of maildir can be a little confusing the first time around. Given your situation/server, I'm really surprised you didn't use mbox instead. It fits this scenario much better than maildir.> Voila! I just tested this change with Exim4, restarted everything and > Evolution now shows me messages. The LAYOUT=fs was correct, and so it was > more a matter of getting Exim4 to deliver to ~/Maildir/INBOX .... a little > confusing but this was my first time with Exim4 (I've been a sendmail user > for a number of years).Setting up Dovecot LDA with EXIM: http://wiki1.dovecot.org/LDA/Exim You're probably using procmail or maildrop currently. I don't use either of these, so I'm unfamiliar with their setup WRT maildir. Should be pretty straightforward though.> RoundCube still isn't working but I'm not going to worry about that - > Evolution will be cool.Need more details to help with RC. As long as you can establish an IMAP connection to Dovecot, RC is pretty smart about figuring out where everything is even if you don't explicitly tell it.> Thanks for your help - simply confirming one setting helps.Heh, I didn't do much, but you're welcome. Are you planning on migrating all the mailboxes from the old server to this new one? -- Stan
Scott Silva
2011-Apr-21 16:07 UTC
[Dovecot] Having trouble getting Dovecot to read a ~/Maildir configuration
on 4/20/2011 5:12 PM Murray Collingwood spake the following:> Hi folks > > Setting up a new server, hence a few software packages have been upgraded / > changed. On my old server (only 2 years old) I was using Dovecot and > RoundCube (web mail app) and had a good experience so was keen to use these > again. The only major change is I have switched from sendmail to exim4 > (which was installed by default on this Debian server). Exim4 appears to be > doing the right thing, however read on and see if you can spot the error. > > I've tried two email clients, RoundCube (via apache) as a local connection > and Evolution as a remote connection. Both appear to login to the Dovecot > IMAP connection okay (log entries included further down), although they > don't see any email. The INBOX is completely empty. Although when I check > out /home/postmaster/Maildir/new it has many messages waiting to be read. > > It's like Exim4 is delivering the email into the ~/Maildir folder but > Dovecot is not seeing it.... > > I've tried these three combinations in dovecot.conf but they give the > same result: > #mail_location = maildir:~/Maildir (ie this one I commented the line out > to see if Dovecot would work it out automatically) > mail_location = maildir:~/Maildir (I think this one should work) > mail_location = maildir:~/Maildir:LAYOUT=fs (Now I'm just desperate and > will try anything) > > The dovecot log gives no indication of any errors: > > This is the version I am running - it was the default version for Debian > installed via apt-get: > 2011-04-21 08:55:22 dovecot: Info: Dovecot v1.2.15 starting up (core dumps > disabled) > > This connection is using Evolution email client on Linux: > 2011-04-21 08:40:05 imap-login: Info: Login: user=<postmaster>, > method=PLAIN, rip=122.148.149.28, lip=202.125.41.111 > > This connection is using roundcube via apache on the same server: > 2011-04-21 08:40:41 imap-login: Info: Login: user=<postmaster>, > method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured > 2011-04-21 08:40:41 IMAP(postmaster): Info: Disconnected: Logged out > bytes=39/443 > > And finally a look at the ~/Maildir content for my "postmaster" user: > root at ds5683:/etc/dovecot# ls -al /home/postmaster/Maildir > total 148 > drwx------ 6 postmaster postmaster 4096 Apr 21 08:55 . > drwxr-xr-x 3 postmaster postmaster 4096 Apr 19 08:12 .. > drwx------ 2 postmaster postmaster 12288 Apr 21 08:40 cur > -rw------- 1 postmaster postmaster 89088 Apr 21 08:40 dovecot.index.cache > -rw------- 1 postmaster postmaster 2376 Apr 21 08:40 dovecot.index.log > -rw------- 1 postmaster postmaster 5208 Apr 21 08:40 dovecot-uidlist > -rw------- 1 postmaster postmaster 8 Apr 21 08:55 dovecot-uidvalidity > -rw------- 1 postmaster postmaster 0 Apr 21 08:34 > dovecot-uidvalidity.4daf5f73 > drwx------ 5 postmaster postmaster 4096 Apr 21 08:56 INBOX > drwx------ 2 postmaster postmaster 12288 Apr 21 09:39 new > drwx------ 2 postmaster postmaster 4096 Apr 21 09:39 tmp > > So, can somebody help me get Dovecot to recognise the messages in this > mailbox please? > You can suggest anything you like.... upgrades, conf changes, low level > formating of HDD... at this stage I'm ready to try anything! > > Cheers > Murray > > >Does the folder INBOX contain anything? It might be confusing things. A legal maildir++ folder name should start with a dot.
William Blunn
2011-Apr-25 20:34 UTC
[Dovecot] Having trouble getting Dovecot to read a ~/Maildir configuration
On 21/04/2011 03:32, Stan Hoeppner wrote:> >> A question about where the mail is actually supposed to be delivered >> to... >> initially I configured Exim4 to delivery the email to ~/Maildir and I >> noticed as you saw in the list directories like ~/Maildir/new and >> ~/Maildir/cur, however once I configured Evolution to login to >> Dovecot I noticed the directories ~/Maildir/INBOX/new and >> ~Maildir/INBOX/cur were created. Should therefore Exim4 be configured >> to ~/Maildir/INBOX instead of just ~/Maildir ?It looks like your IMAP clients are configured to use a "server folder" of "INBOX" ... such a thing as you might need to do using Courier-IMAP (were you previously using Courier-IMAP?) Your IMAP clients aren't seeing this folder so are creating it. But configuring IMAP clients with a "server folder" of "INBOX" is not required with Dovecot because Dovecot does not require this "INBOX" prefix to all folders. (Though you can configure Dovecot to emulate the Courier-IMAP behaviour if you like.) Exim is delivering to the root folder, but your IMAP clients are looking in the folder "INBOX". Because your clients are prefixing "INBOX" to all folder names, you can't get "up" to the root to see the messages. Check the configuration of your IMAP clients to see if they have a "server folder" configured for "INBOX" (it may be called something other than "server folder" depending on what the IMAP client decides to call it). Configuring Exim to deliver to $HOME/Maildir/ is normal and correct. You should get messages delivered as files to the directory $HOME/Maildir/new. Configuring Dovecot with a mail location of maildir:~/Maildir is normal and correct and should cause Dovecot serve up (as the real IMAP INBOX folder, not a folder called "INBOX") the messages previously delivered by Exim using the above configuration. There should be no need to specify LAYOUT=fs, unless you actually want that. Check the configuration of your IMAP clients. Another thing you could do is to make a fresh install of Thunderbird 3.1 and see what that thinks is in that IMAP account. A fresh install of Thunderbird 3.1 will not have any spurious "server folder" configured by default and should show you all the messages in the real INBOX (not a folder called "INBOX"). Once you can see the messages in Thunderbird, you will then know that it is a configuration issue in your other IMAP clients. Regards, Bill
Julio C. Ortega
2011-Apr-25 21:25 UTC
[Dovecot] Having trouble getting Dovecot to read a ~/Maildir configuration
Murray Collingwood <murray at focus-computing.com.au> escribi?:> Hi folks > > Setting up a new server, hence a few software packages have been upgraded / > changed. On my old server (only 2 years old) I was using Dovecot and > RoundCube (web mail app) and had a good experience so was keen to use these > again. The only major change is I have switched from sendmail to exim4 > (which was installed by default on this Debian server). Exim4 appears to be > doing the right thing, however read on and see if you can spot the error. > > I've tried two email clients, RoundCube (via apache) as a local connection > and Evolution as a remote connection. Both appear to login to the Dovecot > IMAP connection okay (log entries included further down), although they > don't see any email. The INBOX is completely empty. Although when I check > out /home/postmaster/Maildir/new it has many messages waiting to be read. > > It's like Exim4 is delivering the email into the ~/Maildir folder but > Dovecot is not seeing it.... > > I've tried these three combinations in dovecot.conf but they give the > same result: > #mail_location = maildir:~/Maildir (ie this one I commented the line out > to see if Dovecot would work it out automatically) > mail_location = maildir:~/Maildir (I think this one should work) > mail_location = maildir:~/Maildir:LAYOUT=fs (Now I'm just desperate and > will try anything) > > The dovecot log gives no indication of any errors: > > This is the version I am running - it was the default version for Debian > installed via apt-get: > 2011-04-21 08:55:22 dovecot: Info: Dovecot v1.2.15 starting up (core dumps > disabled) > > This connection is using Evolution email client on Linux: > 2011-04-21 08:40:05 imap-login: Info: Login: user=<postmaster>, > method=PLAIN, rip=122.148.149.28, lip=202.125.41.111 > > This connection is using roundcube via apache on the same server: > 2011-04-21 08:40:41 imap-login: Info: Login: user=<postmaster>, > method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured > 2011-04-21 08:40:41 IMAP(postmaster): Info: Disconnected: Logged out > bytes=39/443 > > And finally a look at the ~/Maildir content for my "postmaster" user: > root at ds5683:/etc/dovecot# ls -al /home/postmaster/Maildir > total 148 > drwx------ 6 postmaster postmaster 4096 Apr 21 08:55 . > drwxr-xr-x 3 postmaster postmaster 4096 Apr 19 08:12 .. > drwx------ 2 postmaster postmaster 12288 Apr 21 08:40 cur > -rw------- 1 postmaster postmaster 89088 Apr 21 08:40 dovecot.index.cache > -rw------- 1 postmaster postmaster 2376 Apr 21 08:40 dovecot.index.log > -rw------- 1 postmaster postmaster 5208 Apr 21 08:40 dovecot-uidlist > -rw------- 1 postmaster postmaster 8 Apr 21 08:55 dovecot-uidvalidity > -rw------- 1 postmaster postmaster 0 Apr 21 08:34 > dovecot-uidvalidity.4daf5f73 > drwx------ 5 postmaster postmaster 4096 Apr 21 08:56 INBOX > drwx------ 2 postmaster postmaster 12288 Apr 21 09:39 new > drwx------ 2 postmaster postmaster 4096 Apr 21 09:39 tmp > > So, can somebody help me get Dovecot to recognise the messages in this > mailbox please? > You can suggest anything you like.... upgrades, conf changes, low level > formating of HDD... at this stage I'm ready to try anything! > > Cheers > Murray > > > > -- > Murray Collingwood > Focus Computing > p +61 415 24 26 24 > http://www.focus-computing.com.au >Hello Murray. Weird that your migration from dovecot caused this. You could try configuring a namespace for the INBOX folder (if you effectively migrated before from Courier) something like: namespace private { separator = . prefix = INBOX. inbox = yes } Greetings. -- ------------------------------- Julio C. Ortega ONUVA http://www.onuva.com