[Dovecot] default_mail_env/mail_location syntax changes
Sorry, I tried to find this info on the wiki and in the docs, but couldn't quite figure it out.
Dovecot 1.0rc8 introduced this change: "mbox:/var/mail/%u" no longer works as the mail location. You'll have to specify the mail root explicitly, just like the examples always have: "mbox:~/mail:INBOX=/var/mail/%u"
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?
That is, on my system,
- inbox file: ~/Mailbox
- mail storage dir: ~/mail OR ~/Mail (it varies by user)
- all files are in mbox format
Thanks, Mike
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 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
On Thu, 2007-01-11 at 03:07 -0700, Mike Brown wrote:
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
Oh, didn't thought of that. Just replace ~ with $HOME and %u with $USER.
participants (2)
-
Mike Brown
-
Timo Sirainen