I hope someone can help me with this problem. First, some background. I’m new to Webmin/Virtualmin and I have a server running CentOS 6.5 which came with Webmin installed. I then installed Virtualmin and all the associated services, and from what I’ve read it sounds like I did it the hard way.
I’ve had lots of problems getting email working along the way but now nearly everything’s working with one exception. I’m using Postfix, Dovecot, Procmail and SpamAssasin and I can send and receive on my main account and send from my virtual server accounts but not receive. For example:
Hmm, are other Virtual Servers able to send email properly? Is it just this one that’s having problems? Or do all Virtual Servers have that problem?
Also, what is the output of the command “postconf -n”?
The error you’re receiving suggests that Postfix doesn’t think it’s supposed to be handling email for that domain – but it does appear that it’s listed in the virtual file.
I only have two virtual servers set up so far - one migrated from cPanel and the other created via Virtualmin. Both can send OK but neither can receive.
OK, I finally got it working and the problem was this line in /etc/postfix/virtual:
@hostname.com hostname
I’ve removed it and everything’s working but I’m confused as to why that should mean mail sent to user@virtualdomain.com was being delivered to hostname instead?
One other question: in Webmin > Postfix > Virtual Domains I set ‘Domains to perform virtual mapping for’ to “From domain mapping tables” instead of a list of domains. Is that OK? The only problem seems to be this error in var/log/maillog:
Apr 26 15:57:28 7838 postfix/trivial-rewrite[19798]: warning: do not list domain hostname in BOTH mydestination and virtual_alias_domains
Thanks. From what I’ve been reading it sounds like I should have my hostname as something.domain.com rather than domain.com so I guess that would help with the error anyway, right? If I do that should myhostname and mydomain both be set to “something.domain.com”? And then I’d setup domain.com as a virtual server?
One other question: is there any reason why I can’t use that hostname (“something.domain.com”) as my email incoming/outgoing server name?
(I appreciate these questions are increasingly less and less about Virtualmin but it’s all new to me so I’m grateful for any help.)
I receive that notice on my own system as well, which uses “host.domain.tld” as the hostname.
I no longer remember the specific cause of that warning, but it is normal, and isn’t indicating a problem.
As far as the incoming/outgoing server name, you actually can use anything you want, so long as it resolves to your own IP address.
By default, Virtualmin creates a mail.domain.tld alias for every Virtual Server that’s setup, a lot of folks use those.
Another option is that if you install an SSL certificate into Dovecot/Postfix, you’d probably want to use the name that the SSL certificate is tied to.
So if your SSL certificate is “secure.example.com”, you’d want to use secure.example.com as the incoming/outgoing server so that it doesn’t throw an SSL warning.