Hi, I am trying to setup Exim to use MariaDB for lookups. I would like to inject values for the DB connection from environment variables into the configuration file. This is what I am trying to do as a test:
keep_environment = MARIADB_SERVER # MYSQL_SERVER = mariadb MYSQL_SERVER = ${env{MARIADB_SERVER}{$value} fail} MYSQL_USER = exim MYSQL_PASSWORD = eximpw MYSQL_DB = mail hide mysql_servers = MYSQL_SERVER/MYSQL_DB/MYSQL_USER/MYSQL_PASSWORD together with a lookup like this: domainlist local_domains = ${lookup mysql{SELECT name FROM domains}} However, when trying this Exim throws these errors: 2025-03-25 15:34:58 2025-03-25 14:34:58 failed to expand "${lookup mysql{SELECT name FROM domains}}" while checking a list: lookup of "SELECT name FROM domains" gave DEFER: MYSQL connection failed: Unknown server host '${env{MARIADB_SERVER}{$value} fail}' (-2) which makes me think that string expansion wasn't done. -bP shows the relevant options as: exim exim -bP |grep -i -e mysql -e mariadb keep_environment = MARIADB_SERVER mysql_servers = ${env{MARIADB_SERVER}{$value} fail}/mail/exim/eximpw and -be successfully expands the string: exim -be 'mysql_servers = ${env{MARIADB_SERVER}{$value} fail}/mail/exim/eximpw' mysql_servers = mariadb/mail/exim/eximpw Any idea what I am doing wrong? Many thanks in advance. Best regards, Frank. -- ## subscription configuration (requires account): ## https://lists.exim.org/mailman3/postorius/lists/exim-users.lists.exim.org/ ## unsubscribe (doesn't require an account): ## exim-users-unsubscr...@lists.exim.org ## Exim details at http://www.exim.org/ ## Please use the Wiki with this list - http://wiki.exim.org/