Posted on 25-08-2008
Filed Under (Redhat & Fedora, Sendmail & Postfix) by Ravi Bhure

This will describe you how to set up a smarthost using sendmail. This is to send emails using your
linux server as your smtp server, and it will use your ISP email server to send all your emails through it, to the final users.

For setting up smarthost you have to add open relay smtp in your /etc/hosts

Now open /etc/mail/
and find SMART_HOST
edit with your smtp domain, example below

define(`SMART_HOST’, `’)dnl

now add belows 4 line at the end of /etc/mail/ above “MAILER(smtp)dnl”

FEATURE(`authinfo’, `hash /etc/mail/authinfo’)

save and close the file

Now follow the steps below

$ vi /etc/mail/genericstable


list your users, default is root, save and exit

now run the following command.
$ makemap hash /etc/mail/genericstable < /etc/mail/genericstable

$ vi /etc/init.d/authinfo “” “I:arun” “P:password” “M:LOGIN PLAIN”

save and exit authinfo and run
makemap hash /etc/mail/authinfo < /etc/mail/authinfo
chmod 600 /etc/mail/authinfo

Now apply all changes to to run following command

$ make -C /etc/mail

and last restart the sendmail service
service sendmail restart ; chkconfig sendmail on

Now you can send emails from command line using your external smtp server.



(0) Comments    Read More
arunbagul's photos More of arunbagul's photos
Get Adobe Flash player