[Dovecot] $MAIL environment variable to override mail_location works in v1.2.16 but not in v2.0.7 for /usr/libexec/dovecot/imap
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
On 11.11.2010, at 18.50, Giam Teck Choon wrote:
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.
-O parameter avoids that.
I noticed v2.0.7 is not using $MAIL environment variable to override mail_location?
-o mail_location=blah
Hi Timo,
On 11/12/2010 02:53 AM, Timo Sirainen wrote:
On 11.11.2010, at 18.50, Giam Teck Choon wrote:
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.
-O parameter avoids that.
Ok :)
I noticed v2.0.7 is not using $MAIL environment variable to override mail_location?
-o mail_location=blah
Ha... so simple and tested... works!
Many thanks.
Kindest regards, Giam Teck Choon
I noticed v2.0.7 is not using $MAIL environment variable to override mail_location?
-o mail_location=blah
Ha... so simple and tested... works!
Will v1.2.16 works with the same options? Like below?
/usr/libexec/dovecot/imap -O -o mail_location=blah... ...
--------------------8<----------8<----------8<----------8<--------------------- #!/bin/sh
if [ -n "$MAIL" ] ; then
export MAIL=maildir:echo $MAIL | sed 's@:@::@g'
fi
exec "$@" -O -o mail_location=$MAIL
--------------------8<----------8<----------8<----------8<---------------------
Where $@ is actually /usr/libexec/dovecot/imap.
Thanks.
Kindest regards, Giam Teck Choon
On 11.11.2010, at 19.24, Giam Teck Choon wrote:
Will v1.2.16 works with the same options? Like below?
/usr/libexec/dovecot/imap -O -o mail_location=blah... ...
Nope.
On 11/12/2010 04:46 AM, Timo Sirainen wrote:
On 11.11.2010, at 19.24, Giam Teck Choon wrote:
Will v1.2.16 works with the same options? Like below?
/usr/libexec/dovecot/imap -O -o mail_location=blah... ...
Nope.
Thanks and already tested... it is not working for v1.
Kindest regards, Giam Teck Choon
participants (2)
-
Giam Teck Choon
-
Timo Sirainen