Sendmail Configuration in AIX

Brief about mail configuration:-
Consider that, whenever we schedule some jobs or some automated jobs needs to be completed in a server which runs in many hours in background at the end we should know the status about automated job; we suppose to login the server to come know the status of scheduled one. If we could configure send mail and attach the necessary logs send it to user the user can know the status without login the server or don’t what to rush office to check the status. Please find a brief about send mail utility.
Sendmail is the utility to send and receive emails in the same system or other domains by using SMTP server in the same network. Send mail has two interfaces one is mail another one is mhmail; mail command is the normal bin command in AIX which is available to all users in the system.
Send mail uses a bellmail program function which takes care to deliver emails local system users. Sendmail is the process which is started as in subsystem mode to send/receive email.
All the mails stored under /var/spool/mail directory , under that unix mail file will be created with corresponding user name as a file with ownership as a user name and group owner as mail. All the mail control files are stored in /var/spool/mqueue directory.
STEP 1:- Add the relay ( SMTP server ) entry in /etc/hosts file. This can be performed by a SMTP server administrator.
STEP 2:- From your local server, telnet to SMTP server with SMTP port number 25
#telnet 25
STEP 3:- Once the SMTP port open take the backup of sendmail.cf file
1
STEP 4:- Edit the sendmail.cf file in “DS” put your SMTP server IP save and come out
4
STEP 5:- Start your sendmail service
“startsrc -s sendmail -a “-bd -q30m””
5
STEP 6:- After sendmail service started check the Process ID in sendmail.pid file which is located in /etc/mail/ directory.
6
STEP 7:- Check send mail service
7
STEP 8:- Duplicate send mail instance are not supported, you would be get below error if you try to start the send mail service.
8
STEP 9:- After starting check the 25 port status by using netstat command
9
STEP 10:- Test your mail utility by sending a test mail
STEP 11:- You can read your mails in your mailbox by using mail command
11
SETP 12:- To check the content of mail queue you can use mailq command.
STEP 13:- After your entire configuration if send mail is not working mean there is possibility of sendmail.cf file change can be restored from “/usr/lpp/bos.net/inst_root/etc/mail/sendmail.cf” and take a backup before replacing the cfg file from original location.
13
Send mail configuration has been done successfully.

Leave a Comment