On 10/9/2012 5:12 PM, Kelsey Cummings wrote:
On 10/09/12 15:42, Daniel Parthey wrote:
Marc Perkel wrote:
if the mail location doesn't exist
then I want to try a second mail location:
mail_location = maildir:/email/%d/%n:INBOX=/email/%d/%n:LAYOUT=fs
You might do this with a script which exports the MAIL environment
variable and then executes the service binary:
It will work, we do this to set the maildir location to a custom
hashed directory and muck around with the namespaces a bit.
The script is in perl - the relevant parts look like this.
#set user's maildir location for dovecot
$ENV{'MAIL'} = 'maildir:' . getmaildir($ENV{'USER'});
$ENV{'USERDB_KEYS'} .= 'MAIL';
#pass along to dovecot's next process
exec { $ARGV[0] } @ARGV;
-K
Namespaces is something I don't understand. Still wondering what
environment variables I can pick up in this script.
What I want to do is first try /fakedir/%d/%n and if that doesn't exist
I want to go to /email/%d/%n