sendmail – installation and testing
sendmail – installation and testing
Sendmail is highly configurable, allowing control over almost every aspect of how email is handled, including the protocol used. Many system administrators elect to use Sendmail as their MTA due to its power and scalability.
Installation of sendmail
# yum install sendmail m4 telnet mailx sendmail-cf
Loaded plugins: rhnplugin, security
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Resolving Dependencies
–> Running transaction check
—> Package sendmail.x86_64 0:8.13.8-10.el5_11 set to be updated
—> Package sendmail-cf.x86_64 0:8.13.8-10.el5_11 set to be updated
—> Package sendmail-devel.i386 0:8.13.8-10.el5_11 set to be updated
—> Package sendmail-devel.x86_64 0:8.13.8-10.el5_11 set to be updated
—> Package sendmail-doc.x86_64 0:8.13.8-10.el5_11 set to be updated
Configuration of sendmail
# cd /etc/mail/
define(`SMART_HOST’, `mail server gateway’)dnl
- mail server gateway – use your mail server gateway.
Compile with m4 Command
# m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
Start sendmail services
# service sendmail start
Enable the Sendmail Service at startup
# chkconfig sendmail on
To put Entires in /etc/hosts file
# vi /etc/hosts
192.168.10.100 mailservergateway.com
Check for the Sendmail connectivity in the Server
[root@chat ~]# ps -ef | grep -v grep | grep -i sendmail
root 5691 1 0 Jul07 ? 00:00:02 sendmail: accepting connections
smmsp 5700 1 0 Jul07 ? 00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
Test your first email
echo “Subject: sendmail test” | sendmail -i -v -Am mytestmail@gmail.com
result of sent mail can be seen as :
esatyabca@gmail.com… Connecting to gmail-smtp-in.l.google.com. via esmtp…
220 mx.google.com ESMTP y13si95484pgg.462 – gsmtp
>>> EHLO chat.nicedial.com
250-mx.google.com at your service, [103.253.172.214]
250-SIZE 157286400
250-8BITMIME
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-PIPELINING
250 SMTPUTF8
>>> STARTTLS
220 2.0.0 Ready to start TLS
>>> EHLO chat.nicedial.com
250-mx.google.com at your service, [103.253.172.214]
250-SIZE 157286400
250-8BITMIME
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-CHUNKING
250 SMTPUTF8
>>> MAIL From:<root@chat.nicedial.com> SIZE=27
250 2.1.0 OK y13si95484pgg.462 – gsmtp
>>> RCPT To:<esatyabca@gmail.com>
>>> DATA
250 2.1.5 OK y13si95484pgg.462 – gsmtp
354 Go ahead y13si95484pgg.462 – gsmtp