ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    What Happens If You Alias An Entire Domain in Postfix Email Server?

    IT Discussion
    postfix email linux ubuntu rhel centos debian
    1
    1
    364
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      This doesn't come up often, and the issue with that is that few people know what will happen when you do this.

      So the question is what actually happens if you add something like...

      @myemaildomain.com [email protected]

      Into Postfix's alias file? Well, it's pretty simple, but not necessarily easy to track down. This is a domain alias and from my testing, the order of precedence is not what we would expect. And that makes all of the different here.

      First, we need to understand that the alias file is actions before the mailbox file (it has to be, if you think about it.) So if the alias file hijacks something in the mailbox file, the mailbox rules never get touched. That's critical because it is easy to look in your mailbox and feel that things are configured for local delivery, and with no per-user alias in the alias file, we might think that things will still go there.

      Second, in the alias file the individual aliases are actioned before the domain alias. This is good, but ultimately confusing if you test an email in the domain and it works, but has an alias, it will also potentially lead you down a rabbit hole of troubleshooting that you don't want to do. So if you make an alias for an individual user, that will work normally, and only once individual account aliases are actioned is the domain alias actioned. Ultimately this makes sense as a mechanism if you think about it, but it is not really what we would expect if only approaching this casually.

      So what we find is that a domain alias will not affect individual aliases, but will effectively disable all mailbox configurations for the domain in question. A powerful tool, but one you want to use carefully as the results are often not what people are thinking that they wanted to do.

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post