In trying to have a perfect set of instructions for how to go from blank virtual machine to having and configured virtualmin mail server, I apparently got a little copy-and-paste happy (and/or my “I can clone it and change these things” wasn’t as slick as I’d hoped) and now I have a wrong name in some places (specifically the name of the other/example server) in my “instructions-made” Virtualmin. I noticed in mail logs that I have stuff like this:
Dec 11 13:04:04 <mail.info> correct-server-name.com correct-server-name opendkim[3618096]: 3C1C153AA0: DKIM-Signature field added (s=INCORRECT-TEMPLATE-SERVER-NAME, d=INCORRECT-TEMPLATE-SERVER-NAME.com)
Dec 11 13:06:05 <mail.info> correct-server-name.com correct-server-name postfix/local[3924325]: 1E47053AA8: to=<"customer@customer-domain.com"@INCORRECT-TEMPLATE-SERVER-NAME.com>, orig_to=<customer@customer-domain.com>, relay=local, delay=6.5, delays=0.39/0/0/6.1, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME)
My dashboard system hostname is correct, as is the hostname if I type “hostname”, as is my networking “Hostname and DNS Client” and “Host Addresses” under “Webmin” “Networking”
The setting that I see in:
Webmin > Postfix Mail Server > General Options
has: $myhostname, template-or-bad-paste.com, localhost
And I see that as well for my /etc/postfix/main.cf (along with the above line):
myhostname = template-or-bad-paste.com
If I change that first one and reload it doesn’t crash but a couple of minutes later I re-ran the Virtualmin Configuration Check and it failed on that “$myhostname, template-or-bad-paste.com, localhost” line and said that it would cause bouncing. I change that line back (but not the myhostname line) and ran the config again and it was happy. I noticed on my way in to re-change the configuration that some mail had accumulated in the queue which is unusual (it went away once I change back… not sure if that was a cause-and-effect).
Looking for my “template-or-bad-paste” recursively in /etc/* I see several more examples…
This one worries me because I don’t want to confuse headers but I don’t want to change this and break DKIM signing:
/etc/dkim-keytable:default %:template-or-bad-paste:/etc/dkim.key
This one is probably not a big deal (I bet I backed-up and restored the 000-443 site that gets you shuffled off else where if you hit the server in a browser without a correct name):
/etc/dkim-keytable:1763496429110411 000-443-default.domain.com:template-or-bad-paste:/etc/dkimkeys/1763496429110411.dkim-key
This I don’t know what to make of, I thought maybe it was a log but there’s just the one file that directory (in spite of there being several Let’s Encrypt domains):
/etc/letsencrypt/accounts/acme-v02.api.letsencrypt.org/directory/da48e34a857661ecd7825eb90be27553/meta.json:{"creation_dt": "2025-11-17T17:12:43Z", "creation_host": "template-or-bad-paste.com"}
This one is worrying too and I’m afraid to change it without knowing what it implies (maybe changing this and changing the “Postfix Mail Server > General Options” passes the configuration check)?:
/etc/mailname:template-or-bad-paste.com
This one is obviously from “Postfix Mail Server > General Options”
/etc/postfix/main.cf:mydestination = $myhostname, template-or-bad-paste.com, localhost
Proftp is disabled so I don’t care about these:
/etc/proftpd/ssh_host_rsa_key.pub:ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCHrX+s4aSF0KbaX/tbXdgHQaf/3MR17njGF5m7uvtD+FBXfRfcUfTaEUDwRtnI3Bo57I6bXXM0oMVcRjXUlW0flMDBRxdiZpynQDlQMyncBlitlO8HemF+9A5Kw9+zlDN39byU3KYPOzkBnGadv2VLKPFAezaKIFLiINdaAESfEbCd5BujcdeJkYEgnqgg6RSZHk7LjUQZrV6Fas4vEp40CuKhruthcTNsjqxqYdiMgyycPaSigAT2Kca1wS3Zw6/UUFFeCTfGl/QNt8C0JJi9ql9q2M6Czj7KcmcfBSOo7fYAYJWRKdDxmCR4oLOlfKbjOAXKgpLLak3LdK8I/tZp5UBLUQ8v86RRjjPiaOp8NkG3WddBozhTfIpTCNEfidZH+rVCLLyz+FaaotwUwtgF8y3zDqZ89C90TDc39YPT6tKQKjHwJ0KMLNmRaRegpOSkUy6qYyvQ4QPTyVLKGg1jLqS4nT7PftlPBNJS28bHpUuU+dv9FFrXYZazF7O2IKM= root@template-or-bad-paste.com
/etc/proftpd/ssh_host_ecdsa_key.pub:ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHByNTYAAABBBCm71pZpt26QviK1nBDyA0m5hJAfTR6hVsC3KeE4FMpr339NoNCjUCo7C42XpZ/Fn0NAgPUhXRCTNTi9/wTK/dM= root@template-or-bad-paste.com
SSH though I obviously do care about:
/etc/ssh/ssh_host_rsa_key.pub:ssh-rsa AAAAB3NzaC1yc2EAAAADAQBBAAABgQC/XAF1mLCYhQ6/iKBW9dmg27RJKtm6HvXhNRG0lrD3TJCxfIXdyoCWi71ctNiZrlqhSvaUw5Ffhp0ftsTkFysnZEX6ooSVlSvasQgD/HwWEx90LJJRQ6d3KgI3W7ePnkaBD8EBYsVn7ALKD8Eprv+uqXpos4dpLLbSG+ewgf4R1AuihcmIE1P2ni/2YTch7+j8qBRtNZdYruco8tEn2Bka7NwsZboHMrBRp89pYbOLhlilxwOsgO4MvB3Ctn57Ox8eounIImAPAorTHXZ8RuFwJoNx31J5vqriZO5U9IveExp69+0Rkx6ogkGhxuAMw+IFB+oScSHtoAGkqp9NkH1U2YQu1weyiiVjdaZS/mqWghJnSwwv2H5XZHDb3GrVmfoJE1cQGhzyNC5OuXJxB5/b0rTbzWxrla2/x0f56pPyUDsKHHqMcsEqZHV8O7ZPiwXkohR7thx5dBaW39CCKET+79osUXgH3wjwydp+OZ0C229Xjis6FRCb4WEfspRlWWs= root@template-or-bad-paste
/etc/ssh/ssh_host_ecdsa_key.pub:ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBKDJCJu8yB3ZEyBaESSJXAZxRh34fI6Z1/OR9F1p7shvfv807ZIxwPxtzGxa9EI8InSk15KQu1QX2G1PI83aHo0= root@template-or-bad-paste
/etc/ssh/ssh_host_ed25519_key.pub:ssh-ed25519 AAAAC3NzaC1lZDI1NTE5BAAAIEg8DcNK6SDSPP4d7e3YFGmQUYXhnNt2SwrYDrO5Jp2H root@template-or-bad-paste
Any idea how I can safely untangle all this (particularly if any of it is in Webmin/Virtualmin somewhere and not down to editing config files, restarting services, and seeing what happens)?
Thanks.
| SYSTEM INFORMATION | |
|---|---|
| OS type and version | Ubuntu 24.04 |
| Virtualmin version | 7.50 |