Alias domains sometimes take over Usermin mail address

Hello!

Hope things are going well!

I am noticing an issue where when domains have had a domain alias created for them (without own email, just alias domain of parent server) and then we login to Usermin the From address and the address at the top left on the account is the email as if it was the alias domain rather than the parent domain. I don't know what exactly causes this but have noticed on multiple occasions that it has happened and I cannot reproduce it at will.

For example, let's say we have the following:

The server itself: server1.theserveritself.com

The parent domain: theparentdomain.com

The first alias domain: thefirstaliasdomain.com

The second alias domain: thesecondaliasdomain.com

In Usermin the top left account says support@thesecondaliasdomain.com.

If I disable mail for the alias domain (thesecondaliasdomain.com) it will switch the email that shows on the top left in Usermin and the From address to a different alias domain (support@thefirstaliasdomain.com). If I then disable mail on thefirstaliasdomain.com it will switch it back to the main domain (support@theparentdomain.com) and then I can then re-enable it on the alias domains and it will so far stay as the parent domain.

What should happen is that it should always be the parent domain. I don't know why the alias domains take it over.

I also noticed that when an email originated from the server to one of these parent addresses it gets caught in a mail forwarding loop:

<support.theparentdomain@server1.theserveritself.com> (expanded from
    <support@theparentdomain.com>): mail forwarding loop for
    support.theparentdomain@server1.theserveritself.com

Like I said I cannot reproduce the issue now. If I go in now and create an alias domain the email stays as the parent domain just fine. So I'm not sure what other information you might need, or maybe this was just a bug which was partially resolved in the past.

Another issue is I can't change the From Name of the person. It seems to be locked into some old name and I'm not sure where to change it. I'm not sure if this is related but I thought it could possibly be so wouldn't hurt to mention.

Thanks!

Status: 
Active

Comments

Usermin tries to work out the From: address for a user by looking at aliases that deliver to him in the /etc/postfix/virtual file. This problem could happen if the entry for the alias domain somehow appears ahead of the entry for the parent domain in that file (which should never happen under normal operation, as the alias domain always gets created later).

I didn't get a notification from your reply for some reason so sorry for my late response.

Thanks for the info, will keep that in mind if it happens again, might be easier to fix by just editing that file instead of disabling mail for all of them. I didn't modify that file myself so I wonder what happened or how they could have gotten in the wrong order. Maybe we will just never know.

Thanks again =)

So was the order actually incorrect?