WordPress Mail – VPS CentOS 6.2

I recently re-installed centos on the VPS and almost forgot that I needed sendmail on the server to send out my daily backups. The backup is run from a plugin called WordPress Database Backup.

Installation is fairly easy with the following steps:

Check if sendmail has been installed

 [root@sdb ~]# rpm -qa sendmail
[root@sdb ~]#

if it is, update to the latest version

yum update sendmail

Else, let’s install it.

yum install sendmail


[root@sdb ~]# yum install sendmail
Loaded plugins: fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
epel/metalink                                            |  16 kB     00:00
* base: mirror01.th.ifl.net
* epel: mirror01.th.ifl.net
* extras: mirror01.th.ifl.net
* ius: mirrors.ircam.fr
* rpmforge: www.mirrorservice.org
* updates: mirror01.th.ifl.net
base                                                     | 3.7 kB     00:00
epel                                                     | 4.0 kB     00:00
epel/primary_db                                          | 4.4 MB     00:00
extras                                                   | 3.5 kB     00:00
ius                                                      | 2.2 kB     00:00
ius/primary_db                                           |  71 kB     00:00
rpmforge                                                 | 1.9 kB     00:00
updates                                                  | 3.5 kB     00:00
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
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
Is this ok [y/N]:

Y to continue, the installation will complete.

Start Sendmail

service sendmail start

Accept incoming mail

You will need to modify the file in /etc/mail/local-host-names through vi

vi /etc/mail/local-host-names

Add your server hostnames to accept mail from.

In my scenario, it would be gulshan.beejan.com

Restart Sendmail Service

service sendmail restart

Testing was done, and it worked. =)

Gulshan Yashveer Beejan

Gulshan holds a BSc(Hons) Computer Science with Distributed systems from the City University of London. He is currently working at DSOGroup(Mauritius) as a Linux Administrator on SaaS Solutions. More about Gulshan

Leave a Reply

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