Helm's Technology Blog

Tag: email

Webmail not working in Cpanel

by admin on May.10, 2010, under Cpanel

Had a problem earlier this week, webmail couldn’t always send e-mail.  It was coming back with the following error:

SMTP Error: SMTP error: Connection failed: Failed to connect socket: Connection timed out.

After reading a few things  I turned on the SMTP tweak..  things appeared to work for a few hours, then it started failing again.

Searching online said to trying telnet on the command line – so did that, connected to port 25 – all fine… hmm odd – tried webmail again – failed…..

After a more indepth search I found a forum which gave me a hint – apparently other people have had the same problem when using the firewall for cpanel – CSF.  CSF is definately one of the best firewalls around for linux and works really well with Cpanel – however every now and again the amount of options can cause you to miss out something obvious:

# If SMTP_BLOCK is enabled but you want to allow local connections to port 25
# on the server (e.g. for webmail or web scripts) then enable this option to
# allow outgoing SMTP connections to 127.0.0.1
SMTP_ALLOWLOCAL = 0

The SMTP_ALLOWLOCAL set to 0 stops webmail etc… not sure when this appeared (the server has been working fine for about 4 months) but change it to 1 – restart CSF and there we go it’s working fine :)

Leave a Comment :, , , , , more...

Exim Mail Server Commands

by admin on Jul.19, 2009, under Server

Those of you with Exim will sometimes needs to do some work on it – here’s a list of the commands which I find most useful:

If you want to see what exim is doing right now :

“exiwhat”

if you think you have queue problems then you can print a countof messages in the queue this will often be quite high – so it’s worth running it a few times over a couple of hours to see if you have a queue problem:

“exim -bpc”

If you want more information about what is in the queue then the following command will give you the count, the colume, oldest, newest, domain to be sent to and total summaries.  The oldest and volume parts are often the most informative in this to help you see problem domains.

“exim -bp | exiqsumm”

Below are some commands to help you manage the queue – especially useful if you want to try to purge it or take action.

To tell exim to try to deliver things in the queue according to the rules for a queue run

“exim -q -v”

If you are blocked up with external mail you can tell exim to run the queue to deliver local mail only – this may help you get things such as notifications etc.. if they are delayed by other mail in the queue

“exim -ql -v”

If you have some problems with older mail (maybe spam related) – you can use the following to delete mail that over 7 days old (the time given is in seconds so just take one day 86400 and multiply it by 7)

“exiqgrep -o 604800 -i | xargs exim -Mrm”

There are many many other commands and other examples – some sites have longer lists, but these are all the commands I have needed (or variations thereof) for administrating my servers over the last 9 years.

Leave a Comment :, , , more...

Anti-Spam on servers…

by admin on Jun.02, 2009, under Server

After several years of running different solutions on different servers I have found that ASSP is one of the best anti-spam solutions around.
However – after some time it still struggles and gets weaker, can anyone recommend any other systems that can work ALONGSIDE it (not replace).

Leave a Comment :, , , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!