Unix Administration
Wednesday, June 11, 2008
 
Sendamail Tips

Mail spool


Sendmail generally stores its queued mail in the var/spool/mqueue folder. Queued messages are messages that have not reached their final destination yet. There are two files associated with each e-mail message, one beginning with qf, the other beginning df. qf files contain the message header, df files contain the body of the mail message.

Below are the steps to follow to send a mail from unix machine.

Step 1.
Have to enable the mail option in /etc/mail/sendmail.mc file
enable the line called DEAMON_OPTION('port=smtp)
Dont change anything in config file .

Step 2.
Restart the sendmail dameon
service sendmail restart

Step 3.
Use the below command to send mail.
echo " your message "| mail -s " subject" e-mailid

You can use mailx command also to send mail.
echo "your message "| mailx -s "dada" e-mailid

Also stop the mail using this command.
/etc/init.d/sendmail stop | start

check with command mailq whether its sent or not.

To force flush the mailq, run this:

sendmail -v -d8.20 -q

Use mailq to get the mail-id
Then go to /var/spool/mqueue and delete all files with the specified mail-id on the end:
rm *

Labels:

 
Comments: Post a Comment

Subscribe to Post Comments [Atom]





<< Home

Name:

5 Words to sum up - Internet, Photography,Reading,Friends, Technology

Archives
January 2008 / June 2008 / September 2008 / November 2008 / January 2009 /


Powered by Blogger

Subscribe to
Posts [Atom]