[Dovecot] 1.0.beta6 released - a couple pop3 issues

Ken A ka at pacific.net
Fri Apr 14 00:41:39 EEST 2006


Dovecot's pop server with pop3_lock_session = yes will wait 5 min, by
default (lock_timeout = 300) and then say "-ERR No INBOX for user."

I think the error message should come back sooner and say something more
appropriate, like "-ERR Mailbox is locked. Is another session active?".
The error message is easy to change in src/pop3/client.c. The problem 
then is that the mailbox file may not exist if this is a new user.

I also found that dovecot will create a directory if no mbox file exists
yet. This causes "Internal error occurred" messages in the log, since
the mbox should be a plain file, not a directory.

I might have something wrong in my dovecot.conf file that is causing
this though. Here's my "default_mail_env" line:

default_mail_env =
mbox:/var/spool/mail/%n:INBOX=/var/spool/mail/%n:INDEX=/dovecot_indexes/%n

Any ideas?

Thanks,
Ken A
Pacific.Net



Timo Sirainen wrote:
> On Apr 13, 2006, at 2:42 AM, Ken A wrote:
> 
>> # Keep the mailbox locked for the entire POP3 session.
>> pop3_lock_session = yes
>>
>> This doesn't seem to work yet. (linux, dovecot beta 7 with default 
>> locking)
> 
> Looks like I forgot one part of the code:
> 
> Index: src/master/mail-process.c
> ===================================================================
> RCS file: /var/lib/cvs/dovecot/src/master/mail-process.c,v
> retrieving revision 1.88
> diff -u -r1.88 mail-process.c
> --- src/master/mail-process.c   12 Apr 2006 19:40:23 -0000      1.88
> +++ src/master/mail-process.c   13 Apr 2006 00:54:28 -0000
> @@ -241,6 +241,8 @@
>                 env_put("POP3_REUSE_XUIDL=1");
>         if (set->pop3_enable_last)
>                 env_put("POP3_ENABLE_LAST=1");
> +       if (set->pop3_lock_session)
> +               env_put("POP3_LOCK_SESSION=1");
>         if (set->mbox_dirty_syncs)
>                 env_put("MBOX_DIRTY_SYNCS=1");
>         if (set->mbox_very_dirty_syncs)
> 
>> I can telnet to the server, login and then hit it with a normal pop3 
>> client and I'm still able to download mail. I'd expect to see an error 
>> message "Mailbox locked, Is another session active?"
> 
> Currently it just waits a couple of minutes for the lock and then gives 
> some error message.



More information about the dovecot mailing list