我试图让exim4从文件中读取中继主机。 我试了lsearch:
# /etc/exim4/update-exim4.conf.conf dc_relay_domains='lsearch;/etc/exim4/relay_domains'
但它会产生警告和遗漏的工作…
WARNING: using 'lookup;' constructs in /etc/exim4/update-exim4.conf.conf has never been supported!
在这种情况下man update-exim4.conf指出的是在本地设置创build/etc/exim4/exim4.conf.localmacros的macros并将macros放入其中。 你需要的macros是MAIN_RELAY_TO_DOMAINS ,所以你的本地macros文件应该包括:
MAIN_RELAY_TO_DOMAINS = lsearch;/etc/exim4/relay_domains
重新启动exim之后,您可以检查/var/lib/exim4/config.autogenerated并查看它是否已正确添加。