hrworksindia mailing list
Apply the targeted routing fix
Your configuration already provides /etc/exim.routers.pre.conf before lookuphost. This is the correct place to catch Majordomo aliases without changing ordinary mail routing.
First check the include:
cat /etc/exim.routers.pre.conf 2>/dev/nullIf it has no existing Majordomo router, add:
cat >> /etc/exim.routers.pre.conf <<'EOF'
majordomo_aliases_pre:
driver = redirect
allow_defer
allow_fail
domains = lsearch,ret=key;/etc/virtual/domainowners
data = ${if exists{/etc/virtual/${domain_data}/majordomo/list.aliases}{${lookup{$local_part}lsearch{/etc/virtual/${domain_data}/majordomo/list.aliases}}}}
file_transport = address_file
group = daemon
pipe_transport = majordomo_pipe
retry_use_local_part
no_rewrite
user = majordomo
EOFValidate and test:
exim -bV >/dev/null || exit 1
exim -bt it_team@hrworksindia.com
exim -bt bum@hrworksindia.comBoth should resolve through majordomo_aliases_pre, not lookuphost.
If that succeeds, restart Exim:
systemctl restart exim
systemctl status exim --no-pager -lThen send a test message to it_team@hrworksindia.com and inspect:
tail -n 80 /var/log/exim/mainlog
Comments
Post a Comment