Daemon :
sendmail
To start the daemon :
# startsrc -s sendmail -a "-bd -q30m"
where
bd - To start the sendmail as a SMTP mail relay router
q - Is the interval in which the sendmail daemon processes the saved messages
To start the daemon automatically after the system boot:
a. # vi /etc/rc.tcpip
b. Uncomment the below line
start /usr/lib/sendmail "$src_running" "-bd -q${qpi}"
To display the status of the daemon :
# lssrc -s sendmail
# ps -ef | grep sendmail
To stop the daemon :
# stopsrc -s sendmail
# kill -1 `cat /etc/sendmail.pid`
Configuration File:
/etc/sendmail.cf - Where the hostname, Relay server name,... are stored.
Alias File :
/etc/aliases - Where the group(alias) to member mapping is stored.
To Add the hostname in the sendmail configuration :
a. Vi /etc/sendmail.cf
b. Change "#DwYourHostName" to "Dw{hostname of local server}"
c. # refresh -s sendmail
To Add the mail (relay) server in the sendmail configuration :
a. Vi /etc/sendmail.cf
b. Change "#DSrelayhostname" to "DS{hostname of the Relay Server}"
c. # refresh -s sendmail
To send the mails,
# echo "Test Message" | sendmail -v raja@server1.domain.com
If you add any alias in /etc/aliases file, then do the following
# sendmail -bi
This will make the sendmail daemon to re-read the aliases file.
To display the list of messages in the mail queue :
# mailq (or) # sendmail -bp
Directory containing log files and temp files associated with messages in the mail queue :
/var/spool/mqueue
To delete the first 1000 messages in the root's mail queue :
# mail -u root , then enter "d 1-1000"
To start the daemon :
# startsrc -s sendmail -a "-bd -q30m"
where
bd - To start the sendmail as a SMTP mail relay router
q - Is the interval in which the sendmail daemon processes the saved messages
To start the daemon automatically after the system boot:
a. # vi /etc/rc.tcpip
b. Uncomment the below line
start /usr/lib/sendmail "$src_running" "-bd -q${qpi}"
To display the status of the daemon :
# lssrc -s sendmail
# ps -ef | grep sendmail
To stop the daemon :
# stopsrc -s sendmail
# kill -1 `cat /etc/sendmail.pid`
Configuration File:
/etc/sendmail.cf - Where the hostname, Relay server name,... are stored.
Alias File :
/etc/aliases - Where the group(alias) to member mapping is stored.
To Add the hostname in the sendmail configuration :
a. Vi /etc/sendmail.cf
b. Change "#DwYourHostName" to "Dw{hostname of local server}"
c. # refresh -s sendmail
To Add the mail (relay) server in the sendmail configuration :
a. Vi /etc/sendmail.cf
b. Change "#DSrelayhostname" to "DS{hostname of the Relay Server}"
c. # refresh -s sendmail
To send the mails,
# echo "Test Message" | sendmail -v raja@server1.domain.com
If you add any alias in /etc/aliases file, then do the following
# sendmail -bi
This will make the sendmail daemon to re-read the aliases file.
To display the list of messages in the mail queue :
# mailq (or) # sendmail -bp
Directory containing log files and temp files associated with messages in the mail queue :
/var/spool/mqueue
To delete the first 1000 messages in the root's mail queue :
# mail -u root , then enter "d 1-1000"
No comments:
Post a Comment