[Dovecot] $MAIL environment variable to override mail_location works in v1.2.16 but not in v2.0.7 for /usr/libexec/dovecot/imap
Giam Teck Choon
dovecot.org at choon.net
Thu Nov 11 20:50:09 EET 2010
Hi,
For the past day, I have been researching about making dovecot to
support mailfront (http://untroubled.org/mailfront/) imapfront-auth
natively and able to use mailfront imapfront-auth with dovecot imap
v1.2.16 without starting any dovecot related services and no
/etc/dovecot.conf file is required.
More information about this can be read at:
http://lists.untroubled.org/?list=bgware&cmd=showthread&month=201011&threadid=elpfjlnilcganfkokehg
However, same trick can't be used for dovecot v2.0.7. First error is
/etc/dovecot/dovecot.conf must be exists so I just simply touch
/etc/dovecot/dovecot.conf with empty content to bypass that error. I
noticed v2.0.7 is not using $MAIL environment variable to override
mail_location?
I have read the following:
http://wiki2.dovecot.org/MailLocation
Any idea to override mail_location setting? I have tried various
setting of environment variables such as below:
--------------------8<----------8<----------8<----------8<---------------------
#!/bin/sh
# $MAIL, $HOME, $MAILDIR, $MAILBOX are the same in mailfront
# imapfront-auth
if [ -n "$MAIL" ]; then
# make dovecot imap escape colon by replacing single : to ::
export MAIL=maildir:`echo $MAIL | sed 's@:@::@g'`
fi
export USERDB_KEYS="$USERDB_KEYS mail"
# For knowing all env. uncomment the below line and
# see /tmp/imapd-log.txt
# printenv >>/tmp/imapd-log.txt
exec "$@"
--------------------8<----------8<----------8<----------8<---------------------
The above script is being placed between imapfront-auth and dovecot imap
(/usr/libexec/dovecot/imap).
Thanks for any kind assistance.
Kindest regards,
Giam Teck Choon
More information about the dovecot
mailing list