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.
Distribution: Debian,Slackware,FreeBSD,CentOS,Red Hat,Windows Server 2008
Posts: 133
Rep:
Sendmail
Hello,
I have a VPS that hosts a website, in this website there is a link to tell a friend about the website, that it sends an email. the problem is that when trying to send an email to an account under the domain of the same of website, lets say:
my website: domain1.com
if the link is sent to someemail@domain1.com it fails.
if the link is sent to someemail@whateverelsedomain.com it succeeds.
the server has sendmail configured, I checked /etc/mail/local-host-names and I removed the domain name from there but the problem still exists I tried to make email routing via /etc/mail/mailertable, also didnt work I tried to add another domain in /etc/mail/mailertable for a testing purpose and It worked but for my domain its not working.
If I try to send an email to a user under the system it works, the problem is that It appears to sendmail that it hosts the domain, even when there is no entry in /etc/mail/local-host-names.
Distribution: Debian,Slackware,FreeBSD,CentOS,Red Hat,Windows Server 2008
Posts: 133
Original Poster
Rep:
this is the output User unknown, I watched this before in /var/spool/mail/root, My domain has a valid MX record and it works well, I straced it, with strace and it queries about the MX, But I dont know why It keeps lookin at that it hosts the email and not a relay service.
If I understand well your problem, your mailserver is on a different host, but the host running the webserver thinks it's local?
You could use /etc/mail/virtusertable to do something like that:
Code:
someemail@domain1.com someemail@[x.x.x.x]
where x.x.x.x is the ip of the MX server for your domain. Or use its hostname without the square brackets.
Don't forget to run
If I understand well your problem, your mailserver is on a different host, but the host running the webserver thinks it's local?
You could use /etc/mail/virtusertable to do something like that:
Code:
someemail@domain1.com someemail@[x.x.x.x]
where x.x.x.x is the ip of the MX server for your domain. Or use its hostname without the square brackets.
Don't forget to run
I have a similar problem... and that should work, but my domain uses Google Accounts Mail, so the MX is aspmx.l.google.com, I don't see how that would resolve to the full address (me@example.com).
Distribution: Debian,Slackware,FreeBSD,CentOS,Red Hat,Windows Server 2008
Posts: 133
Original Poster
Rep:
Thank you its working now. I couldnt figure out that we can put a variable(%1). so I tried mailertable and didnt wor.but now its working,
thanks again.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.