Does dovecot support any form of macros? I would like to share configuration file between several servers. Configs are different only in tiny aspects.
Somethine like:
dovecot-server.conf (different on each server):
%define ID 55 %define SOMETHING SELECT FROM * WHERE something %define MECHANISMS digest-md5
dovecot-main.conf (common, shared config) !include dovecot-server.conf
user_query = ${SOMETHING} AND id=${ID}
auth_mechanisms = plain login ${MECHANISMS}
etc
-- Arkadiusz Miśkiewicz, arekm / maven.pl
On 07/11/2014 03:59 AM, Arkadiusz Miśkiewicz wrote:
Does dovecot support any form of macros? I would like to share configuration file between several servers. Configs are different only in tiny aspects.
As a last resort, you can use make
to accomplish this.
dovecot-server.conf.sh
id=55 something="SELECT FROM * WHERE something" mechanisms="digest-md5"
dovecot-main.conf.sh
source ~/dovecot-server.conf.sh
cat <<EOF user_query = ${something} AND id=${id} auth_mechanisms = plain login ${mechanisms} EOF
makefile
dovecot-main.conf: dovecot*.conf.sh ./dovecot-main.conf.sh > $@
participants (2)
-
Arkadiusz Miśkiewicz
-
Michael Orlitzky