autoconfig.cgi created does not map mail server correctly

When Virtualmin creates a virtual server, the autodiscover mail config file placed in /cgi-bin/autoconfig.cgi does not have the correct mail server names.

Example: domain.com with a mail server as mail.domain.com

This is what gets set in the file: $SMTP_HOST =domain.com $IMAP_HOST=mail.domain.com

It should be: $SMTP_HOST =mail.domain.com $IMAP_HOST=mail.domain.com

Manual edit correctly the problem, until a recheck or template update replaces the autoconfig.cgi.

Status: 
Active

Comments

It should be possible to access mail at yourdomain.com as well as mail.yourdomain.com though, right?

Also, you can configure the autoreply XML template at System Settings -> Server Templates.

I am experiencing the exact same problem. Why is that happening?