How to Install Sendmail Service on CentOS 6.5

This post will show how to install sendmail smtp service on CentOS 6.5. By default only postfix smtp service included in CentOS 6.5. Due to some reasons you will to run sendmail service instead of postfix. But the purpose of both services still the same providing SMTP email transport service and running as an email relay on your linux system.

1. Install sendmail :

[root@centos6.5 ~]# yum install sendmail -y
..
..
..
..
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package sendmail.x86_64 0:8.14.4-8.el6 will be installed
--> Processing Dependency: procmail for package: sendmail-8.14.4-8.el6.x86_64
--> Processing Dependency: libhesiod.so.0()(64bit) for package: sendmail-8.14.4-8.el6.x86_64
--> Running transaction check
---> Package hesiod.x86_64 0:3.1.0-19.el6 will be installed
---> Package procmail.x86_64 0:3.22-25.1.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================
 Package                Arch                 Version                       Repository          Size
====================================================================================================
Installing:
 sendmail               x86_64               8.14.4-8.el6                  base               717 k
Installing for dependencies:
 hesiod                 x86_64               3.1.0-19.el6                  base                20 k
 procmail               x86_64               3.22-25.1.el6                 base               163 k

Transaction Summary
====================================================================================================
Install       3 Package(s)

Total download size: 900 k
Installed size: 1.9 M
Downloading Packages:
(1/3): hesiod-3.1.0-19.el6.x86_64.rpm                                        |  20 kB     00:00
(2/3): procmail-3.22-25.1.el6.x86_64.rpm                                     | 163 kB     00:00
(3/3): sendmail-8.14.4-8.el6.x86_64.rpm                                      | 717 kB     00:06
----------------------------------------------------------------------------------------------------
Total                                                               117 kB/s | 900 kB     00:07
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : procmail-3.22-25.1.el6.x86_64                                                    1/3
  Installing : hesiod-3.1.0-19.el6.x86_64                                                       2/3
  Installing : sendmail-8.14.4-8.el6.x86_64                                                     3/3
  Verifying  : hesiod-3.1.0-19.el6.x86_64                                                       1/3
  Verifying  : procmail-3.22-25.1.el6.x86_64                                                    2/3
  Verifying  : sendmail-8.14.4-8.el6.x86_64                                                     3/3

Installed:
  sendmail.x86_64 0:8.14.4-8.el6

Dependency Installed:
  hesiod.x86_64 0:3.1.0-19.el6                    procmail.x86_64 0:3.22-25.1.el6

Complete!

2. Start Sendmail service :

[root@centos6.5 ~]# service sendmail start
Starting sendmail:                                         [  OK  ]
Starting sm-client:                                        [  OK  ]

3. Test sendmail respond on port 25 :

[root@centos6.5 ~]# telnet localhost 25
Trying ::1...
telnet: connect to address ::1: Connection refused
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 centos6.5.ehowstuff.local ESMTP Sendmail 8.14.4/8.14.4; Sun, 10 Aug 2014 20:48:52 +0800

Comments

1 Comment

  • Avatar AleisterWeber says:

    i always getting this:
    Starting sendmail: 554 5.0.0 No local mailer defined

    554 5.0.0 QueueDirectory (Q) option must be set

    [FAILED]

    Starting sm-client: [ OK ]

    what can i do?

Leave a Reply

Your email address will not be published. Required fields are marked *