exim cheatsheet

exim-logo

Some useful cheatsheet for exim command:-

exim -Mrm <Mail ID> Remove certain email ID
exim -bp List the email queue
exim -bpc List the number of queue mail
exim -bp | exiqsumm Print summary of the mail in queue
exiwhat Print what exim is doing right now
exim -bt <[email protected]> Test how a email route from exim
exim -bP Print exim configuration
exim -qff Force delivery mail in queue
exim -M <Mail ID> Force delivery certain mail ID
exim -Mvl <Mail ID> View Email ID log
exim -Mvh <Mail ID> View Email ID header
exim -Mvb <Mail ID> View Email ID body
exiqgrep -f <[email protected]> Search certain sender from queue
exiqgrep -r <[email protected]> Search certain recipient from queue
exiqgrep -o <seconds> Search number of second(s) older than current time
exiqgrep -zi | xargs exim -Mrm Remove all frozen mail.

exim: Check current PHP Script Spam process

exim-logo

 

This post is very useful for those System Administrator or System Engineer who wish to monitor over hundred of servers which could get the spamming PHP script immediately from your server.

The following example was written based on cPanel exim4 and you may stored them in a .sh file.

Continue reading exim: Check current PHP Script Spam process

cPanel: php_network_getaddresses: getaddrinfo failed: Name or service not known

I found out this problem just after the disk replace on backup drive but have no idea why it is occurred. However, the fixes is found.

With this issue, you may find the following error,

In SquirrelMail:

Warning: fsockopen() [function.fsockopen]: unable to connect to localhost:143 (php_network_getaddresses: getaddrinfo failed: Name or service not known) in /usr/local/cpanel/base/3rdparty/squirrelmail/plugins/login_auth/functions.php on line 129

In HordeMail:

Login failed because your username or password was entered incorrectly.

In RoundCube:

Connection to IMAP server failed.

To resolve this problem, try to check the following issue,
1. If /etc/nsswitch.conf is exists.
2. If the permission of /etc/nsswitch.conf is 644, else do,

chmod 644 /etc/nsswitch.conf

3. check if /etc/nsswitch.conf come with any content. Update your system to get the fresh content.

cPanel Horde: DB Error: no such database

Today, one of the customer email found error when trying to access to the Horde Email from cPanel.

A fatal error has occurred
DB Error: no such database
Details have been logged for the administrator.

To get this issue fixed, simply follow the command as below from SSH.

/usr/local/cpanel/bin/update-horde --force

With this command, it will repair and reinstall horde mail.

Outlook Scheduled Send/Receive Time

In order to set the scheduled automatic time to hit your Send/Receive feature from your Microsoft Outlook 2010, you may refer to the step below,

1. Open your Microsoft Outlook 2010.
2. Select the Send/Receive tab.
 3. Next, click on the Send/Receive Groups.

4. Select on the “Define Send/Receive Groups…”.

5. Then you may change the time interval from the “Schedule an automatic send/receive every [number] minutes.”
** The default setting is 30 minutes.

cPanel exim: The server has reached its limit for processing requests from your host

If you get the error like,

451-The server has reached its limit for processing requests from your host.n451 Please try again later.

You may easily fix it by changing your exim configuration.

First of all, log into the WHM and look for Exim configuration Editor. Then look for Advance Editor.

Then you should find something like,

smtp_accept_max = 100

Change it to higher value like 200 and save it.

In case the setting is hide and not able to change from WHM, you may change it from SSH with path as below,

/etc/exim.conf

cPanel: Change the outbound email IP in Exim

If your cPanel server is a shared environment server, your server IP might be blocked by any RBL list such as SpamHaus.

As cPanel by default set the primary email as the SMTP mail IP, to enable different IPs to be send from the cPanel, you may follow the step as below,

1. Log into WHM.
2. Select Service Configuration and choose Exim Configuration Editor.
3. Find “Reference /etc/mailips for outgoing SMTP connections” and enable it.
4. Edit the file named /etc/mailips through SSH.

example.com: 192.168.0.2
sub.example.com: 192.168.0.2
example.net: 192.168.0.3
addon.example.net: 192.168.0.3
*: 192.168.0.1

Replace the host name and IPs with your desired information.