Skip to content
Nigel Metheringham edited this page Nov 29, 2012 · 2 revisions

Q0418


`Navigation(siblings)`_


Q0418

Question

I want to use a default entry in my alias file to handle unknown local parts, but it picks up the local parts that the aliases generate. For example, if the alias file is

luke.skywalker: luke
ls: luke
*: postmaster

then messages addressed to luke.skywalker end up at postmaster.

Answer

The default mechanism works best with virtual domains, where the generated address is not in the same domain. If you just want to pick up all unknown local parts and send them to postmaster, an easier way to do it is to put this as your last router:

unknown:
  driver = redirect
  data = postmaster
  no_verify

Another possibility is to put the redirect router for these aliases after all the other routers, so that local parts which are user names get picked off first. You will need to have two aliasing routers if there are some local parts (e.g. root) which are login names, but which you want to handle as aliases.

It might also be possible to solve this dilemma by aliasing the accounts that should not be covered by the wildcard to themselves as this takes precedence over the wildcard. Adding

luke: luke

to the alias file might solve the problem.


Clone this wiki locally