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”

  1. Francesco on February 3rd, 2010 6:19 am

    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

  2. Dave Warren on February 9th, 2010 5:18 pm

    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.

  3. Claudio Ammann on January 29th, 2011 2:45 am

    Dave, in which file do I have to enter the alas *@old.expl = *@new.expl ?

  4. Dave Warren on January 30th, 2011 10:30 pm

    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.

Leave a Reply