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