macros

Michael Orlitzky michael at orlitzky.com
Sun Jul 13 03:18:24 UTC 2014


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 > $@



More information about the dovecot mailing list