Aliases and domain-side wildcards

A quick heads up, if you create an alias like postmaster@* =, 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 the mail would hit

Instead of using postmaster@* you should use the $LOCALDOMAIN$ macro instead. Create an alias of postmaster@$LOCALDOMAIN$ = 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 ( 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. –>

    so * to *

  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 *


This site uses Akismet to reduce spam. Learn how your comment data is processed.