Aliases and domain-side wildcards

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.

CC BY-NC-ND 4.0 Aliases and domain-side wildcards by Dave Warren (everything-mdaemon.com) is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

5 Replies to “Aliases and domain-side wildcards”

  1. 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. 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, 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.

  4. this is a bit old but though I add to it, I’m using Mdaemon 13.x and found out you also needed to make sure the domains been forwarded are also in your main domain list.

Leave a Reply

Your email address will not be published. Required fields are marked *

*