Aliases and domain-side wildcards
Posted on July 7, 2008
Filed Under MDaemon | 4 Comments
A quick heads up, if you create an alias like postmaster@* = bob@example.com, MDaemon will follow that instruction literally, and alias postmaster@ every single domain whether or not you host it.
If one of your users were to try emailing postmaster@example.com the mail would hit bob@example.com
Instead of using postmaster@* you should use the $LOCALDOMAIN$ macro instead. Create an alias of postmaster@$LOCALDOMAIN$ = bob@example.com to route the postmaster@ address for each of your domains, but no non-local domains, to your local administrator bob.
Comments
4 Responses to “Aliases and domain-side wildcards”
Leave a Reply
Is it possible to create a domain alias? I say this because I have a company that has changed domain, and so I would like to alias all mails (the addresses are the same) to another domain..
i.e. gwbush@domain1.com –> gwbush@domain2.com
so *.domain1.com to *.domain2.com
Francesco, yes this is possible. Create an alias of *@olddomain.example = *@newdomain.example.
You might want to make sure that the option to relay for aliases containing foreign domains is disabled though, this option can cause some side effects in this configuration.
Dave, in which file do I have to enter the alas *@old.expl = *@new.expl ?
Claudio, you can modify alias.dat manually if needed but it’s easier to just use MDaemon’s alias editor, you can enter these aliases directly in MDaemon’s alias editor.