Bug#596193: A possible solution (and a workaround for anyone else finding this bug)

Matthew Vernon mv3 at sanger.ac.uk
Thu Aug 13 14:27:34 BST 2020


Hi,

We encountered this issue, too - many of our systems are setup in the 
smarthost config, with /etc/mailname set to sanger.ac.uk. This mostly 
works - central LDAP means that user fred will reliably by fred at 
sanger.ac.uk, and so on.

The downside is that we can't then e.g. alias 'root' so that cron-mail 
goes to the person/team best placed to deal with it, and root at 
sanger.ac.uk gets too much automated email.

This is because:
i) qualify_domain is not a member of local_domains; so the qualified 
address root at qualify_domain is not considered by the system_aliases router
ii) in any case the smarthost router occurs before the system_aliases 
router, so even if you fix the above, it doesn't help

What we did was to change

domains = +local_domains

in the system_aliases router to

domains = +local_domains : $qualify_domain

To address point i) and then move the 
router/400_exim4-config_system_aliases block earlier in the config file 
(between router/150_exim4-config_hubbed_hosts and 
router/200_exim4-config_primary) - a similar effect can be achieved 
using the split files, obviously

I think this is a common enough configuration that providing better 
support for it in Debian would be useful - you could have a conditional 
block do the aliasing router earlier for smarthosts, or a separate 
alias-style router that just did qualify_domain, according to maintainer 
taste. But I think it's something that Debian could support more 
straightforwardly for users without much extra maintenance effort, so 
maybe Debian should do so?

Regards,

Matthew


-- 
 The Wellcome Sanger Institute is operated by Genome Research 
 Limited, a charity registered in England with number 1021457 and a 
 company registered in England with number 2742969, whose registered 
 office is 215 Euston Road, London, NW1 2BE. 



More information about the Pkg-exim4-maintainers mailing list