Template variable $DOM is not expanded in...

...Server Template / Mail for Domain / Mail aliases for new users / mode "Email address".

I put "example@${DOM}" there, but the variable is not replaced with the domain name when I add a new mailbox user for a domain that uses the template. Same applies to "$DOM".

I'm unsure if this is a bug or intentional... So I labeled this as "support request" rather than bug report. :)

Status: 
Closed (fixed)

Comments

That could be a bug ..

What exactly did you enter in the "Mailbox name" and "Destination address" columns?

I think you're looking at the wrong section. :)

The two column names you mentioned are from the "Mail aliases for new domains" section... I was talking about "Mail aliases for new USERS", the one above that.

The "new users" one does not have column titles. In the dropdown box I chose "Email address", and as destination I tried "example@${DOM}" and "example@$DOM".

Ah, I see now .. that field doesn't currently allow variable substitution at all, which is an oversight.

I will fix this in the next Virtualmin release (3.82).

I just noticed a potential follow-up bug for this:

The data I configure in Mail Aliases for new users does not end up, as I had expected, in the field Additional email addresses of Edit Mail and FTP users / -username- / Email settings, but in the field Mail forwarding settings / Forward to other addresses.

So it is not setting up an alias, but a forwarding. Either the label of the function is incorrect, or it is a bug that it ends up in "Forward". :)

Thanks, the wording is wrong here .. I will fix that.

Automatically closed -- issue fixed for 2 weeks with no activity.