These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Mail cannot be delivered to virtual server users. on the new forum.
Hi, When I try to send e-mail to a virtual server user, I get a response message like: This is the mail system at host ns.hostname.com.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to postmaster.
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The mail system
<user@virtualhost.com>: Host or domain name not found. Name service
error for name=mail.virtualhost.com type=A: Host not found
and mails are not delivering. They resolve the main mail servers dns but I think then it can not deliver internally. The user@virtualhost.com is created and mapped to user.virtualhost.com in /etc/postfix/virtual map file.
Operating system Ubuntu Linux 8.04.3
Webmin version 1.500
Virtualmin version 3.76.gpl GPL
Postfix version 2.5.1
What would be the problem?
Thanks in advance,
Regards.
Howdy,
You may want to start by going into System Settings -> Re-Check Config, as that'll catch a lot of unusual things that could be going on.
You may want to verify that DNS is working properly on your server, and that your server is able to correctly resolve the domain you're using, "virtualhost.com".
-Eric
Thanks for your comment.
I have already done it and there is no problem. (i.e. .. your system is ready for use by Virtualmin.)
But after adding in /etc/postfix/main.cf that:
now I am getting:
error.
And also from inside and outside I can resolve the hostname. No problem with that also.
Anything else?
It's possible there's a hostname related problem... you'll want to make sure that your hostname is the same in all three of these:
The output of the "hostname" command (which should be in the form "host.domain.tld")
The entry for your hostname in /etc/hosts should be there, along with your correct IP address
Your hostname should also be on the mydestination line of /etc/postfix/main.cf
1) The output of the "hostname" command: ns
2) The entry for your hostname in /etc/hosts:
where XXX.XXX.XXX.XXX is the correct public IP of the server.
3)In /etc/postfix/main.cf:
Anything weird?
Yeah, it looks like your hostname isn't an FQDN... so Postfix may be getting confused when attempting to deliver messages.
My suggestion would be to run this command:
hostname ns.hostname.com
(where ns.hostname.com is your actual full system hostname)
Then restart Postfix:
/etc/init.d/postfix restart
and see if that resolves your problem.
-Eric
I did it. Nothing changed, same error. I also tried rebooting but no help.
SOLVED: I changed the hostname to ns again. ( now hostname command gives ns but hostname --fqd command gives ns.hostname.com )
I added a file /etc/postfix/local-host-names put ns in it and restarted postfix.
Now it is working.
Thanks for your help.
Regards