[Dovecot] default_mail_env/mail_location syntax changes

Mike Brown mike at skew.org
Thu Jan 11 10:07:27 UTC 2007


Timo Sirainen wrote:
> On Wed, 2006-12-06 at 16:39 -0700, Mike Brown wrote:
> > If I need a custom INBOX location but the default behavior of
> > using the first of [/ or ~/mail or ~/Mail] having a .imap subdirectory,
> > how do I go about specifying that?
> 
> This has never been possible directly, but you could do this yourself
> with a script:
> 
> mail_executable = /somewhere/imap.sh
> 
> #!/bin/sh
> if [ -d ~/Mail ]; then
>   export MAIL=mbox:~/Mail:INBOX=~/Maildir
> else
>   export MAIL=mbox:~/mail:INBOX=~/Maildir
> fi
> exec /usr/local/libexec/dovecot/imap
> 

Timo-

This does not work. "~" "%u" "%h" etc. are not being parsed.

export MAIL=mbox:~/Mail:INBOX=/var/mail/%u

The first person to check their mail causes a folder named "~" to be created 
in /usr/local/etc (where the script lives) and a subfolder named Mail created 
in it. These are owned by root. They also cause an mbox file named "%u" to be 
created in /var/mail and used as the inbox. It is owned by that user, so no 
one else can check their mail after that because they try to use the same file 
as their mbox.

This is with dovecot 1.0rc15 on FreeBSD, installed via the ports collection.

Am I doing something wrong?

Mike


More information about the dovecot mailing list