sendmail configuration in centos 5

mail store at /var/spool/clientmqueue/*

service sendmail start

see log at tail -f /var/log/maillog

tail -f /var/log/cron

Install sendmail

yum install sendmail sendmail-devel
Dont forget to add the following line to your /etc/hosts.allow file:

sendmail: ALL

To test if the server started up alright, telnet to yourself on port 25 by typing telnet localhost 25 and if it is working you will
see something like this:

Connected to localhost.
Escape character is ‘^]’.
220 ESMTP Sendmail 8.9.3/8.9.3; Tue, 15 Jun 1999 21:41:46 -0400

mail -s “Hello world”

Hit the return key and you will come to a new line. Enter the text “This is a test from my server”.
Follow up the text by hitting the return key again. Then hit the key combination of Control+D to continue.
The command prompt will ask you if you want to mark a copy of the mail to any other address, hit Control+D again. Check your mailbox.
This command will send out a mail to the email id mentioned with the subject, “Hello world”.

Make it auto start service

chkconfig –list | grep on

PS: You can follow same for Ubuntu too.

Post a comment or leave a trackback: Trackback URL.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: