outgoing domain always get hostname


I’ve got virtual min setup with 2 domains, let’s say domain1.com and domain2.com along with their dns entries etc.
I’ve setup 2 email accounts, admin@domain1.com and admin@domain2.com thourgh virtual min with usernames admin.domain1 and admin.domain2.
When I’m logged in into the webmail (squirrelmail) with either admin.domain1 or admin.domain2 and try to sent an email it is always changes the from field to admin.domain1@hostname or admin.domain2@hostname rather the actual domain.
Hostname is something like somename.myispname.com

Note that these domains point to a different IP as these are setup for testing prior to migration. However, I have setup Bind to listen on local dns (/etc/resolv.conf have as 1st entry) and is resolving fine inside the machine.

Any suggestions?

Thanks a lot

Just an update…
This is happening only on via webmail. With pop the from address is displaying correctly.
However, on webmail if I set manually the from field through the squirrelmail personal folder options it is diplayed correctly but need to find a way to get the required domain correctly without editing anything.


This is a function of the mail client…not Virtualmin or the mail server. If you used the install script, Usermin (our recommended webmail client) should be configured appropriately for use in a virtual hosting environment.

SquirrelMail does have some kind of plugin for virtual domains, but I’m by no means an expert (I’ve never used Squirrel, except to test our Install Script). I think Jamie has included that plugin in the default install if you use the Install Scripts interface in Virtualmin Professional to install SquirrelMail.

Same happens on webmail of Usermin. I need to manually edit the from address in order to work.

Hi, did you tried this? (I had the same problem with ubuntu)


¨… Usermin Webmail Sends With Incorrect From: Address …

… Browse to Webmin:Usermin Configuration:Usermin Module Configuration:Read Mail page

Locate the option labeled From: address mapping file, and set it to /etc/postfix/virtual

Locate the option labeled Address mapping file format, and set it to Address to username (virtusertable)

Save it. …¨