Hi Abishek,
I have been using sendmail and collected some information for our usage about the sendmail.
I am just sending the cut n paste from my own collections.
See if that would help you...
Thanks.
Configuration for SMTP_AUTH:
There are some options for the .cf (.mc) file which you may want to change from their default values:
DefaultAuthInfo (confDEF_AUTH_INFO)
specifies a file in which the authorization identity, the authentication identity, the secret, and the realm to be used for authentication are stored. This file must be in a safe directory and unreadable by everyone except root. It is used when sendmail acts as a client to authenticate itself to a server. For an instance
admin
admin
MySecretPassword
example.domain
Notes: all data is case sensitive (usually) and the entire line is used in each case (including any white space!).
recommended filename: /etc/mail/default-auth-info
Using sendmail as a client with AUTH
If you are using sendmail only to transfer e-mail from your local computer to a mail server that requires SMTP AUTH, follow these instructions. They assume that sendmail 8.12 or later, and other software, is already installed on your computer. You should probably be logged in as root to perform these steps.
Change directory to where your sendmail configuration files (sendmail.mc and sendmail.cf) are located, usually /etc/mail/.
Create a safe subdirectory (suggested name auth/):
# mkdir auth
# chmod 600 auth
Create a file with your authentication information (suggested name auth/client-info):
AuthInfo:your.isp.net "U:root" "I:user" "P
assword"
Generate the authentication database and make both files readable only by root:
# cd auth
# makemap hash client-info < client-info
# chmod 600 client-info*
# cd ..
Add the following lines to your sendmail.mc file, filling in your ISP's mail server:
define(`SMART_HOST',`your.isp.net')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
FEATURE(`authinfo',`hash /etc/mail/auth/client-info')dnl
Generate sendmail.cf:
# m4 sendmail.mc > sendmail.cf
Restart the sendmail daemon, e.g., (this depends on your OS):
# kill -HUP `cat /var/run/sendmail.pid`