Here's how it's done in sendmail-
- Create a new file in the /etc/mail directory
vim /etc/mail/service.switch
####### start of file #########
hosts files
aliases files
####### end of file ###########
- We add the "relay host" IP to sendmail.mc
vim /etc/mail/sendmail.mc
define(`SMART_HOST',`192.168.2.250')dnl
### obviously, replace the relay host address based on your requirements
### end ###
m4 /etc/mail/senmdmail.mc > /etc/mail/sendmail.cf
service sendmail restart
NOTE: Make sure there is no dnl in the beginning of the line. The compiler will treat any starting with dnl as a comment.And it's done. Now our mail server will not do any DNS queries and forward all outgoing mail to smart host located at 192.168.2.250.
Hope this helps :)
0 comments:
Post a Comment