For configuring sendmail for using SMART HOST on Ubuntu:
- Open your configuration file:
# vi /etc/mail/sendmail.mc
- Append or modify macro that read as follows:
define(`SMART_HOST’,`smtp.yourdomain.com’)
- Replace smtp.yourdomain.com with your smtp server address. If line contains word, dnl remove the dnl word.
- Regenerate a new sendmail.cf config file with m4 command:
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
- Restart sendmail service:
# /etc/init.d/sendmail restart