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.
This machine recently had its IP changed from 10.x.x.x to 172.x.x.x.x due to an office move. As i understand it, it used to just forward mails to some MTA outside the network, but thats not possible now, it needs to forward to another MTA on the 172 network.
i checked sendmail.mc however the smart relay host parameter wasnt set at all. So i set the ip and restarted sendmail, however it is still using the old config, but i cant seem to find the old config to change it. the sendmail.mc file seems to mention a bestpoke file somewhere but again, i cant find that file.
Any suggestions most welcome, im not really that familiar with sendmail, having always used postfix, and even though this is the only sendmail box on the network, im willing to learn more about it.
If you changed sendmail.mc, you should rebuild the actual sendmail configuration file that is /etc/mail/sendmail.cf. Before doing so, I suggest to see if it works if you edit directly sendmail.cf (making a backup first). Search for the line that start with DS and add the fqdn of your smarthost like this:
Code:
DShost.domain.com
If you want to use the ip address then you should use brackets to include it:
Apologies.. yes we did set it in sendmail.cf as well, but it is still trying to use the old relay. Oddly enough i cant find any mention of this relay in any of the conf files.
If you have setup DS using a fqdn chances are that the name of the smarthost is taken from /etc/hosts or something like that, or if you use a dns, that this dns still has the old ip address of the smarthost. Try:
Code:
host smarthost.domain.com or
nslookup smarthost.domain.com
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.