RSSAll Entries Tagged With: "exim"

How to block emails from a specific address using Exim

Issue :
How to block emails from a specific address on a cPanel/WHM server using Exim ?
Solution :
This is fairly easy to achieve with Exim.
First you’ll need to find the system filter file for Exim. This can be found out through WHM >> Main >> Service Configuration >> Exim Configuration Editor.
Towards the middle of [...]

How to limit the overall size of emails

Issue :
How can the overall size of an email including attachment, encoding etc. be limited to a pre-defined value?
Solution :
This can be done in the following way :
Go to WHM >> Main >> Service Configuration >> Exim Configuration Editor
In the first box where you can type ( right below where you see [...]

Allowing exim to run automatically on ports other than 25 and 26

We can achieve this by starting exim on the particular port (say 588) using the following command:
/usr/sbin/exim -oX 588 -bd
But to get this done automatically whenever exim starts, do the following:
1) In /etc/chkserv.d, add a file called exim_588 (to run it on port 588).
Note the underscore there. Do not replace it with hyphen as there [...]

Configuring Exim to run on another port

Issue :
Port 25 blocked is blocked by ISPs. How to add an alternate port ?
Fix :
Assuming that you want to use , say , port 666.
Put the following line in the first text box in Advanced Exim Editor :

daemon_smtp_ports = 25 : 666
OR
Go to WHM >> Service Configuration >> Service Manager and check [...]

Some SSH tricks for Exim

Removing Bad Mail
for i in `exiqgrep -i -f nobody`; do exim -Mrm $i; done >> Removes Nobody Mail
for i in `exiqgrep -i -o 259200`; do exim -Mrm $i; done >> Removes Mail older than 3 Days
for i in `exiqgrep -i -f “^$”`; do exim -Mrm $i; done >> Removes Mail with weird Characters (Spam)
Delete mails [...]

Script for clearing unwanted queued emails from the server

Here is a small but handy script which will clear the queued emails from the server.
exim -bpc
exim -bpru | grep frozen | awk {’print $3′}|xargs exim -Mrm
exim -bpru | grep “<>” | awk {’print $3′}|xargs exim -Mrm
exim -bpru | grep “nobody” | awk {’print $3′}|xargs exim -Mrm
exim -bpru|awk {’print $3′}|xargs exim -Mrm
exiqgrep -o 86400 -i [...]

Tutorial on clearing Disk Space on a Server

Running out of disk space is a very common issue.  Be it a web-hosting service provider or the end-user.  I wanted to share a few tips that the technical support staff  at InstaCarma use to resolve disk-space issues on a cPanel server. As we all know, there are various partitions on a server which are [...]

550 postmaster verification failed

Issue :
Sometimes when trying to send emails , the following error shows up :
“550 postmaster verification failed”
This is one way of verifying that the sending server is in fact the real sender and not relaying and also the email is being sent by a genuine source.
Fix :
Create a mailbox named postmaster@senderdomain.tld on the domain [...]

Exim mail relay from an IP without authentication

If you have IP addresses which should always be able to relay mail without having to authenticate first ,all you have to do is:
create the file /etc/alwaysrelay and add the IP addresses .
For example:
vi  /etc/alwaysrelay
Add the IPs,
192.168.0.1
10.10.10.98
Then, restart exim (/etc/init.d/exim restart or ’service exim restart’)
After this either restart antirelayd or wait for a little [...]

Exim ACL Ratelimit database not available

Issue :
Sometimes you may find that you are unable to send mails and will find the following lines in your exim mainlog:
2009-04-05 19:08:41 H=[xx.xx.xx.xx] temporarily rejected connection in ?connect? ACL: ratelimit database not available
Cause :
The exim cache database might be corrupted.
Fix :
You need to delete the following files :
/var/spool/exim/db/ratelimit?
/var/spool/exim/db/ratelimit.lockfile?
/var/spool/exim/db/retry?
/var/spool/exim/db/retry.lockfile?
/var/spool/exim/db/wait-dk_remote_smtp?
/var/spool/exim/db/wait-dk_remote_smtp.lockfile?
/var/spool/exim/db/wait-remote_smtp?
/var/spool/exim/db/wait-remote_smtp.lockfile?
You can do as follows :
rm [...]

Free BSD : Shared object “libperl.so” not found

Issue :
On a FreeBSD server with cpanel as the control panel, if mail is not working & you get the following error on restarting exim
server28# /scripts/restartsrv_exim
/libexec/ld-elf.so.1: Shared object “libperl.so” not found, required by “exim”
/libexec/ld-elf.so.1: Shared object “libperl.so” not found, required by “exim”
server28#
Cause :
This error may be caused by a recent cPanel upgrade (upcp).
Fix :
Reinstalling [...]

Closing Open Relay in Exim

To close the open relay run:
/scripts/fixrelayd
/etc/rc.d/init.d/antirelayd restart
service exim restart
If that doesn’t work then
edit /etc/exim.conf, you should see in line 61 (or close if somebody
changed the default configuration) the definition of which hosts are
allowed relaying :
hostlist relay_from_hosts = 127.0.0.1:192.168.10.0/24
These values will allow localhost and few ips.
Nothing else. Adjust the values according to the requirement.
OR
hostlist relay_from_hosts = [...]

Clamav : error while loading shared libraries

Issue:
After installing clamav on a server, it was showing up the error ”/usr/sbin/clamd: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory” while running clamscan.
Fix:
Find the path of  libiconv.so
whereis libiconv.so
libiconv: /usr/local/lib/libiconv.so /usr/local/lib/libiconv.la
Then to check for the shared library dependencies of exim & clamd,
ldd /usr/sbin/exim & ldd /usr/sbin/clamd where [...]

Get Adobe Flash playerPlugin by wpburn.com wordpress themes