Changing email server name for virtual domain and loggin with user credentials and not email address

Let’s say I create a new domain called mydomain.com on Virtualmin. It then automatically creates DNS entries for email like MX with name mail.mydomain.com . Is there a way I can effectively change names for receiving and sending email to mx.mydomain.com and smtp.mydomain.com? How?

Also, for an old application I need to log into this email server using a username without and email account. The objective is that the old app can send an email through security@mydomain.com by logging in to smtp.mydomain.com but using credentials (i.e. userforemail / passwordforemail). Is there a way I can do that under Virtualmin?

Thanks a lot in advance

SYSTEM INFORMATION
OS type and version Ubuntu 24.04.1
Webmin version 2.202
Virtualmin version 7.30.2

I have the same problem with some of my clients - they have to use old email client software which does not support even encrypted passwords.

One option is to mis-configure the Virtualmin ecosystem to support obsolete email client software and doing so makes the entire system vulnerable. The other option is to use middleware that enables the client to use legacy email client software but at the same time does not require a downgrade of the Virtualmin ecosystem to older and insecure protocols.

If you wish to hire a consultant to help you with implementing such middleware, you could hire me or @tpnsolutions.

Follow Virtualmin > System Settings > Server Templates > DNS for domain > Hostname for MX record and you can change mail.${DOM} to mx.${DOM}.

Pass on the other questions.

1 Like

Thanks but (I am quite new to Virtualmin) does this change this for all new domains? Can this be configured as per virtual domain or once it is under production?

If you note it like mx.${DOM} it will be configured per domain.

I think I did not explain myself… I mean, if I do that, all domians I create later will have an email server in the form mx… Right? So I cannot create a domain and then assign to it whatever I like as the email subdomain (mx, smtp, whatever)…

Thanks

You can set whatever you want… Just follow the path to the settings and set it up from there…

mx.mydomain1.com
f-up.mydomain2.com
liam.mydomain3.com

Before you create a new server, you would need to go back into the settings and change the name again. Not sure if it would affect the servers you created so far. I never had this use-case and probably never will. So give it a go and try yourself.

Understand. Thanks!

For individual domains, the records shouldn’t be modified int he Server Templates (that’s mostly for newly created domains in the future). You can change the DNS Records for any domain just by selecting the domain and changing it is DNS Settings.

@kankamuso Note that changes need to be consistent. If you change the A record mail.domain.tld to mx.domain.tld, you must also change your MX record, since mail.domain.tld won’t exist anymore.

You may find that simply adding a new A record formx.domain.tld is simpler. In that case, the MX record doesn’t need to change. mail.domain.tld will continue to work for receiving mail, but your weird old mail clients can still connect to the name they expect.

1 Like

Thanks a lot, Joe,

So If I just modify mail.domain.tld to mx.domain.tld the system will still be able to manage mail effectively without doing anything else (like changing BIND)?

Finally, any suggestions for loging in using username (without @) and password to the smtp server?

Bests,

Jose

The actual FQDN name doesn’t matter, as long as it has a A record. Once it has a A record then you can point the MX record to it.

If you keep reading, you’ll see I made a recommendation to do something else, and that the something else I suggested would mean you wouldn’t need to change anything for other mail stuff to keep working unchanged.

You should keep post to a single question.
You could use webmin user and groups section and clone the user you created for the login and make the username is without @ and make use it uses same ID number, group and home directory.

Make new topics for new problems.

https://forum.virtualmin.com/guidelines

Username format is a configurable option, though you should beware that usernames can’t conflict, so if you have a user named joe in virtualmin.com and a user named joe in cloudmin.com, one of them must have a domain extension. Usermin will automatically accept either form of username, assuming you browse to the domain the user is in.

If you have any follow up questions about usernames, make a new topic.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.