Aliases and domain-side wildcards

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

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

    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. Dave, in which file do I have to enter the alas *@old.expl = *@new.expl ?

  4. 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.

  5. 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.