Archive for the ‘Exim’ Category



CPanel EXIM error – remote_smtp defer (111): Connection refused

Tuesday, March 24th, 2009

On a cPanel dedicated server, exim was unable to deliver emails and all the emails were stuck in mail queue. Here what we found in the exim_mainlog

2009-03-22 03:46:04 H=localhost (Server-IP) [127.0.0.1] Warning:
Sender rate 0.0 / 1h
2009-03-22 03:46:04 1LlJJk-0003cX-HY <= test@somedomain.com H=localhost (Server-IP) [127.0.0.1] P=esmtpa A=fixed_login:test@somedomain.com S=798 id=1853.17.23.12.34.1237711564.squirrel@Server-IP
2009-03-22 03:46:07 1LlJJk-0003cX-HY alt3.gmail-smtp-in.l.google.com [209.85.218.31] Connection refused
2009-03-22 03:46:10 1LlJJk-0003cX-HY alt4.gmail-smtp-in.l.google.com [209.85.221.10] Connection refused
2009-03-22 03:46:10 1LlJJk-0003cX-HY == ourtestmail@gmail.com R=lookuphost T=remote_smtp defer (111): Connection refused

While troubleshooting the issue, we found the following:

root@server [~]# iptables -nL

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     tcp  --  0.0.0.0/0            127.0.0.1           tcp dpt:25
REJECT     tcp  --  0.0.0.0/0            0.0.0.0/0           tcp dpt:25
reject-with icmp-port-unreachable

You have to remove this two iptables rules.

root@server [~]# iptables -D OUTPUT 2
root@server [~]# iptables -D OUTPUT 1

You then have to save iptables and restart.

root@server [~]# /etc/init.d/iptables save
root@server [~]# /etc/init.d/iptables restart

Now, check your mails and you will see all the mails getting delivered.

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


Unrouteable address on exim – cPanel

Thursday, January 29th, 2009

On a cPanel server we were facing problems while sending mails it was giving the below errors:

2009-01-29 15:58:22 1LSYLW-0005Is-8d <= root@hostname.com U=root P=local S=377
2009-01-29 15:58:22 1LSYLW-0005Is-8d ** user@domain.com: Unrouteable address

The solution for this issue is find if the domains entry is present within /etc/localdomains , /etc/userdomains and /etc/trueuserdomains . If the domains entry is missing in any of the file – do add the domain within the files.

Also, make sure that the domains entry is in the /etc/valiases/domain.com , if this file is blank do add the line:

*: username

Then, you can test the mail from your server using the command line:

root# mail -s "Test Mail" user@domain.com

Here are the exim logs, which says the delivery is completed.

2009-01-29 16:06:39 1LSYTX-0007Jo-6D => user <user@domain.com> R=virtual_user T=virtual_userdelivery
2009-01-29 16:06:39 1LSYTX-0007Jo-6D Completed

That’s it.

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


Exim configuration and messages in mail queue – cPanel server

Wednesday, May 7th, 2008

You may wonder how to check exim configuration in one command on a cPanel server, so here is the command to check exim configurations:

root@server# exim -bP

Now, you need to check the summary of messages in the mail queue it contains (Count, Volume, Oldest, Newest, and Domain) here is the command:

root@server# exim -bp | exiqsumm

If you want to print message ID of all the messages in the mail queue, here is the command:

root@server# exiqgrep –i

That’s it!

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.


Some exim commands for cPanel server

Monday, April 28th, 2008

Here are some exim commands which may help system administrators.

To check how many emails are in the exim mail queue the command is:

exim –bpc

Check frozen emails in the mail queue by the command:

exim –bp | grep frozen

Number of frozen emails in the mail queue:

exim –bp | grep frozen | wc –l

Delete frozen emails from the exim mail queue:

exim -bp | awk ‘$6 == “frozen” {print $3}’ | xargs exim –Mrm

This article is released by SupportFacility.Com — the leaders in providing outsourced technical support, live chat support & help desk support for web hosts. Interested ? Opt for a trial now.