How to Start / Stop / Restart Exim Service on cPanel Server

Exim is an mail transfer agent (MTA) used on linux/cPanel servers. It is an open source MTA developed at University of Cambridge

Exim configuration file is in location /etc/exim.conf


How to check status of Exim service on linux/cPanel Servers

Login to your linux server via SSH as root and type the below command to check exim service status.

Command to check status of exim service on linux server :
service exim status
/etc/init.d/exim status


root@server [~]# service exim status
exim (pid 896807 513014) is running...

OR

root@server [~]# /etc/init.d/exim status
exim (pid 896807 517332 516546 516538 516530 516505 514909) is running..

The exim service is running on the above server and you can also see the PID of exim service. If exim service is not running on the server then it will show "exim is stopped"

root@server [~]# /etc/init.d/exim status
exim is stopped

root@server [~]# service exim status
exim is stopped


How to Stop exim service on cPanel/Linux server :

The below command will stop exim service on the linux server

command to stop exim service on Linux server :
service exim stop

/etc/init.d/exim stop

root@server [~]# service exim stop
Shutting down exim: [ OK ]
Shutting down spamd: [ OK ]

OR

root@server [~]# /etc/init.d/exim stop
Shutting down exim: [ OK ]
Shutting down spamd: [ OK ]



How to start exim service on cPanel/Linux server

The below command will start exim service on the linux server

command to start exim service on Linux server :
service exim start
/etc/init.d/exim start

root@server [~]# service exim start

Starting exim: [ OK ]
Starting spamd: [ OK ]

OR


root@server [~]# /etc/init.d/exim start
Starting exim: [ OK ]
Starting spamd: [ OK ]



How to restart exim service on cPanel/Linux server :

Command to restart exim service on cPanel server :
Service exim restart

/etc/init.d/exim restart


root@server [~]# service exim restart
Shutting down exim: [ OK ]
Shutting down spamd: [ OK ]
Starting exim: [ OK ]
Starting spamd: [ OK ]

OR

root@server [~]# /etc/init.d/exim restart
Shutting down exim: [ OK ]
Shutting down spamd: [ OK ]
Starting exim: [ OK ]
Starting spamd: [ OK ]



How to restart exim service through WHM

1. Login to your WHM (Webhost Manager) as root


2. Click on "Mail Server (Exim)" under "Restart Services"

Home » Restart Services » Mail Server (Exim)

3. Mail Server (Exim)
Are you sure you wish to restart this service?

Click on "Yes" to restart the exim service

You will see the below when exim is restarted


======================== ==========
Waiting for “exim” to restart ………waiting for “exim” to initialize ……
…finished.

Service Status
exim (/usr/sbin/exim -q) running as mailnull with PID 620946 (process table check method)

Startup Log
Starting exim: [ OK ]
0 processes (antirelayd) sent signal 9
Starting spamd: [ OK ]

Log Messages
2015-10-16 08:06:09 exim 4.85 daemon started: pid=620929, -q1h, listening for SMTP on port 25 (IPv6 and IPv4) port 26 (IPv6 and IPv4) port 587 (IPv6 and IPv4) and for SMTPS on port 465 (IPv6 and IPv4)

exim restarted successfully.
======================== =============



cPanel script to restart exim service :

You can restart exim on cPanel server using cPanel script /scripts/restartsrv_exim

root@server [~]# /scripts/restartsrv_exim
Waiting for exim exim
finished.

Service Status
exim (/usr/sbin/exim -bd -q60m -oP /var/spool/exim/exim-daemon.pid) running as mailnull with PID 587196 (process table check method)

Startup Log
Starting exim: [ OK ]
0 processes (antirelayd) sent signal 9
Starting spamd: [ OK ]

Log Messages
2015-10-16 07:52:55 exim 4.85 daemon started: pid=587154, -q1h, listening for SMTP on port 25 (IPv6 and IPv4) port 26 (IPv6 and IPv4) port 587 (IPv6 and IPv4) and for SMTPS on port 465 (IPv6 and IPv4)

exim restarted successfully.