LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   reconfiguring forwarding with sendmail Centos4.6 (https://www.linuxquestions.org/questions/linux-server-73/reconfiguring-forwarding-with-sendmail-centos4-6-a-688276/)

dxangel 12-04-2008 06:59 AM

reconfiguring forwarding with sendmail Centos4.6
 
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.

Thanks.

bathory 12-05-2008 02:06 AM

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:
Code:

DS[xx.xx.xx.xx]

dxangel 12-08-2008 05:28 AM

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.

:/

bathory 12-08-2008 05:56 AM

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

and see what they give.


All times are GMT -5. The time now is 08:56 PM.