[SOLVED] SENDMAIL EHLO replies with incorrect hostname! PLZ HELP!
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
I'm trying to get this mail server to work correctly..All the basics are set up. We can send and receive mail just fine, except for one thing. When we send email, some servers end up rejecting it due to our server returning the wrong hostname!
I have multiple domains set up on this machine. Mail goes through to the correct addresses and all, except the EHLO will only reply with the hostname that the machine is named.
I'll call it 'hostname.com'
So, if I send mail from 'user@anotherhostname.com', and the receiving server checks it, the EHLO says: '220 hostname.com blah blah blah'
BUT, I need it to say: '220 anotherhostname.com'
- This being a reply with the hostname according to the IP address used to access the server.
Sendmail is set up to use BIND DNS (compiled in), and 'anotherhostname.com' is entered into the DNS database on the server, however right now, all the domains are set up on our hosting provider's domain name servers.
- Can this effect this sendmail configuration???
I've looked EVERYWHERE on Google and lots of other places as well.. I've seen lots of questions about this, but I can't seem to find the answer.
So, to wrap it up, I have a server with multiple domains and need sendmail to return the correct hostname upon EHLO queries to different IP addresses.
ANY help would be GREATLY appreciated!! Thanks in advance!
Last edited by Whatever123; 03-30-2009 at 12:39 PM.
Add the following to /etc/mail/sendmail.mc and then rebuild sendmail.cf. Change to match the reverse lookup name for your MTA. They should match. Some MTA's (like mine) are very picky about this.
I have never configured sendmail with more than one IP, so I can't answer your question.
By making the change I posted, your MTA will always HELO with the name you assign. Which should match your MTA's reverse name in DNS (using a single IP).
FWIW: I host multiple domains using one IP address. I have never had a problem with "outbound" e-mail, just as long as the HELO name matches the reverse lookup name for that IP. i.e. The external IP address of my firewall.
The problem is solved! Thanks for your help.. To fix it, I ended up having to change all the MX records for each domain to the same address, and then changed the hostname of the machine to the address I set the MX records to.
Everything is working great now.. =) Just have to install SPF records now..
Last edited by Whatever123; 03-30-2009 at 12:37 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.