Useful Exim Commands

Useful Exim Commands

Exim is a mail transfer agent used on Unix-like operating systems. Exim is highly configurable, and therefore has features that are lacking in other MTAs. Exim has always had substantial facilities for mail policy controls, providing facilities for the administrator to control who may send or relay mail through the system.

To print a count of the mails in the queue -> exim -bpc

Print a listing of the messages in the queue (time queued, size, message-id, sender, recipient) -> exim -bp

To show the current configuration file of exim -> exim -bP

To show the version and configuration file of exim -> exim -bV

Generate and display Exim stats from a logfile -> eximstats /var/log/exim_mainlog

Print what Exim is doing right now -> exiwhat

To Print the message-id of the messages in queue -> exiqgrep -i

To remove a mail from the queue -> exim -Mrm

To freeze a mail -> exim -Mf

To deliver a specific mail from the queue -> exim -M

To remove all frozen mails -> exiqgrep -z -i | xargs exim -Mrm

To view the headers of a mail -> exim -Mvh

To view body of a mail -> exim -Mvb


Spamd failing

Spamd failing

If you find the “spamd” failing error on an exim restart.

Solution

When disabling “spamd”, the Cpanel create a file named “/etc/spamdisable” which may not get deleted on enabling the “spamd” feature again. Check the presence of the above said file.

The issue may also arise due to unavailability of the perl module “Mail::SpamAssassin” by installing the the same and on restarting the exim, the issue will be fixed.

1. /scripts/perlinstaller — - force Mail::SpamAssassin

Run exim restart

2. /etc/init.d/exim restart

Exim exiqgrep utility

Exim exiqgrep utility

Some Examples

For getting the message id of mails in the queue in which the receiving domain is yahoo.com

exiqgrep -i -r yahoo.com

in which display option is i and selection criteria is r

For getting the message id of frozen messages

exiqgrep -i -z

Try and test with other options you can handle the exim mail queue easily with this utility

Configure exim to listen on additional ports

Exim is a popular Message Transfer Agent (MTA) used on Unix systems. By default Exim will be listening on port 25. To make Exim listening on other additional port, say 26, add the following line to /etc/exim.conf.

daemon_smtp_ports = 25 : 26

After this restart Exim using the following commands.

service exim restart
or
/etc/init.d/exim restart

This will make Exim to listen on ports 25 as well as 26. Make sure you open the port 26 in the server firewall.


Horde login error

Horde login error

If you are getting Horde login error in Cpanel like :

Warning: Unknown: write failed: Disk quota exceeded (122) in Unknown on line 0
Warning: Unknown: Failed to write session data (files). Please verify that the current setting of
session.save_path is correct (/var/cpanel/userhomes/cpanelhorde/sessions) in Unknown on line 0

Then try this Cpanel script :

/scripts/autorepair phpapps_owner_fix

The above script will reset all the quotas for the Cpanel* users.

« Prev - Next »