Sendmail Configuration:

advertisement
Sendmail Configuration and Automation to send mail on critical
Sendmail configuration on Linux:
HostName  i3hydlin1
1. # /etc/mail/sendmail.mc
( Comment the following two lines using dnl )
dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA') dnl
dnl # LOCAL_DOMAIN(‘localhost.localdomain’) dnl
2. Create relay in access file:
# /etc/mail/access
( IP / Hostname )
192.168.18.15
RELAY
i3hydlin1
RELAY
.
.
.
.
3. Masquerading mc file to cf file:
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
4. Start Related Services:
# chkconfig sendmail on
# chkconfig dovecot on
# service sendmail start
# service dovecot start
Testing the Sendmail :
[root@i3hydlin1 ~]# mail -v raja.ramdeep@gmail.com
Subject: Test mail
.
Cc: prajendran@i3-soft.com
Null message body; hope that's ok
raja.ramdeep@gmail.com,prajendran@i3-soft.com... Connecting to [127.0.0.1] via
relay...
220 i3hydlin1 ESMTP Sendmail 8.13.1/8.13.1; Fri, 2 May 2008 18:17:27 +0530
>>> EHLO i3hydlin1.com
250-i3hydlin1 Hello localhost [127.0.0.1], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH GSSAPI DIGEST-MD5 CRAM-MD5
250-DELIVERBY
250 HELP
>>> MAIL From:<root@i3hydlin1.com> SIZE=74 AUTH=root@i3hydlin1.com
250 2.1.0 <root@i3hydlin1.com>... Sender ok
>>> RCPT To:<raja.ramdeep@gmail.com>
>>> RCPT To:<prajendran@i3-soft.com>
>>> DATA
250 2.1.5 <raja.ramdeep@gmail.com>... Recipient ok
250 2.1.5 <prajendran@i3-soft.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 m42ClRrF014414 Message accepted for delivery
raja.ramdeep@gmail.com,prajendran@i3-soft.com... Sent (m42ClRrF014414
Message accepted for deliv
ery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 i3hydlin1 closing connection
You should get test email on your mailbox.
This document shows how to create an automation to send mail on critical alert.
Please follow the steps as given below:
Step1. Configure all the components to run under PAD as root or netcool user. You
will find I have configured PAD under root user.
Step2. Encrypt the password for the root user using nco_pa_crypt like shown below.
My password for root user and password is abcd123.
So do: nco_pa_crypt abcd123 and you will get the encrypted password as below:
DFEAAIAHFLBKCK Add the encrypted password in the ObjectServer properties as
shown below:
Step3. Restart the PAD.
Step4. Go to the Automation menu in the GUI section and then select Triggers.
In triggers select mail_on_critical and do the settings as shown in the screenshot
below
Step5. Do syntax check by clicking the tick sign shown right hand side below.
Step6. Click ok to save the settings.
Step7. Then go to Procedure section and select send_email.
Step8. Click ok to save the settings.
You should get email to the configured email when you get any critical event in the
event list.
Download