Pages

Saturday, September 27, 2014

exim log, mailq and remove


MAILQ:    exim -bp
Delete MAILQ:    exim -bp | awk '/^ *[0-9]+[mhd]/{print "exim -Mrm " $3}' | bash


Delete Completely with a single command:  rm -rf /var/spool/exim/input/
                                                                          /etc/init.d/exim restart

Exim Log: tail -f /var/log/exim_mainlog
Exim



Thursday, September 25, 2014

Adding Relay host or Smarthost Relay to Cpanel.





Adding Relay host or Smarthost Relay to Cpanel.




vi  /etc/exim.conf.local

Add the following lines to the file.

@ROUTERSTART@
smart_route:
driver = manualroute
domains = !+local_domains
transport = remote_smtp
route_list = * mailout.serverpronto.com

Next run the below command to activate the changes.
/scripts/buildeximconf


Allow other server IP (eg 192.168.3.4 and 172.16.10.10) to send mail through cPanel/WHM

vi /etc/exim.conf.dist
relay_from_hosts = localhost : 192.168.3.4 : 172.16.10.10

vi /etc/relayhosts
172.16.10.10

vi /etc/alwaysrelay
172.16.10.10

restart exim service from GUI or terminal

 tail -f /var/log/exim_mainlog