[SOLVED] Mails are being received on host.domain.com but not on domain.com
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Mails are being received on host.domain.com but not on domain.com
Hello Fellows,
Few months ago, I did setup a mail server and I faced a problem.
Simply, I could receive emails sent to xxx@hostname.website.com but I couldn't get them when they are pointed to xxx@website.com.
After long googling (several days) I could solve that problem.
(Then why you are here?)
Alright, the same problem is going on, but on another setup, another box.
And, to be honest, I'd like to be pointed to where should I look to solve this out, so I can solve it quickly if I faced it any time in the future.
...are your DNS setup, and your mail server's setup. For the problem you describe, it could reside in either, but is most likely in the second. Find the documentation for your mail server and read how to set up different domains.
Find the documentation for your mail server and read how to set up different domains.
It's only one domain..
By the way, when I send to root@domain.com, I get bounce message:
<root@domain.com>: host mail.domain.com[xx.xx.xx.xx] said: 550 5.7.1
<root@domain.com>... Relaying denied. IP name possibly forged
[zz.zz.zz.zz] (in reply to RCPT TO command)
While, I don't get it and I receive the mail when I send to root@mail.domain.com
Well, not really. Your mail server is probably set to only accept mail destined to (sub)domain mail.domain.com. What you need to do is configure it to receive mail destined to domain.com as well.
I'm not sure exactly how to do this in sendmail but if I recall correctly, you need to add the line "domain.com" to local-host-names file.
You're getting the error message because your server doesn't understand it is supposed to accept mail to domain.com. It's trying to relay the message to a domain it considers external and relaying is denied by default.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.