exim4 and catchall mailbox

Of course there are millions of posts with similar content. But instead of storing a bookmark in one browser, I prefer to collect such knowledge at a central place.

In case you are working with Debian Wheezy and exim4 and want to create a mailbox, that gets all emails to unknown addresses, the following has to be done:

  1. edit /etc/exim4/exim4.conf.template and look for router/400_exim4-config_system_aliases
  2. change line data = ${lookup{$local_part}lsearch{/etc/aliases}} to
    data = ${lookup{$local_part}lsearch*{/etc/aliases}}
  3. add all valid users to /etc/aliases (like heinz: heinz)
  4. call update-exim4.conf
  5. restart exim4 /etc/init.d/exim4 restart


  • You need to insert all local users to /etc/aliases, but this could be managed during user creation
  • This does not work in case you set dc_use_split_config to ‘true’