Archive | Linux RSS feed for this section

PHP error_reporting Boolean Values

The PHP page is really not that useful, and only talks about using the PHP Contstants E_ALL, E_NOTICE, E_STRICT etc

This information is not obvious on the PHP site, so I’m just putting it here as an aid to my brain cells. This is for PHP 5.2.x


E_ALL = 6143 = 1011111111111

Therefore E_ALL & ~E_NOTICE = 6143 – 8 = 6135

And to kill warnings as well:

E_ALL & ~E_NOTICE & ~E_WARNING = 6143 – 8- 2 = 6133

Exim Queue Management Tutorial

So, you have got yourself a shiney new dedicated or VPS server with cPanel or DirectAdmin or some such installed. It probably won’t be long before you have to start checking the exim mail logs and the exim mail queue to trace problems being encountered by customers.

I have put this article here more as an aide-memoir than anything. If anyone finds it useful, I’d love to hear from you!

Respect the exim queue

One of worst things you could ever do as an admin, when finding a mail queue with hundreds or thousands of frozen or delayed messages in it, is to simply clear the queue. DONT DO THIS! You might just as well not run a mail server at all. The messages you remove in this way will just vanish without a trace – your customers and the people they communicate with won’t have a clue what happened, and your service will soon be viewed as unreliable.

Sadly, many inexperienced admins use the graphical UI to do just that – because it’s easy. However, with just a few simple commands, it can become possible to inspect and manage the queue with much greater elegance.

So, read on to find out how Exim queue management can be done from the command line. Read More…

How to clear the DNS cache in Mac OSX, Windows and Linux

If you are developing websites, then the chances are at some time or other you have been driven crazy when you have updated the DNS for a client’s website only to find that your web browser is returning an error, or serving the default Apache webpage.

So, you go and check the DNS out using something like only to find that everything appears to be correct.

The confusion can be further compounded by the fact that some tools rely on the operating system’s cache (as do web browsers), while others fetch fresh results. For example, you can ping¬† on OSX, and get a completely different IP address to that returned by dig a

This is because sometimes, the operating system’s cache doesn’t update quickly enough, because the TTL values stored within it haven’t yet timed out – so it sees no reason to go and fetch new results – not while the cached IP is reachable.

So, that’s the why – here’s the how! Read More…

Kpslice Uptrack – Review

Keeping your kernel updated is both important, and yet one of the most overlooked jobs of any admin. Linux kernels are one of those areas that instill fear into the hearts of many – and for good reason. Compiling a custom kernel is not for the feint hearted or casual user.

However, most of use use the standard kernel options that ship with our flavour of linux, and the in-built package managers that ship with the popular linux builds Ubuntu, Fedora, Debian, CentOS/RedHat etc, all offer an easy way to upgrade your kernel to the latest build. For example, using CentOS it’s just a case of yum update kernel.

However, if you are running a server that needs to be on 24/7, then rebooting everytime there are updates is probably going to annoy your users. Plus, if you have a lot of servers, then keeping them all up to date can become a bit of a chore. Read More…

Force Apple to display attachments as icon

One of the most annoying things about is it’s insistence on displaying attachments as inline images. Bitmap images, PDF’s and other visuals end up getting sent as inline content which other mail clients won’t always recognise as attachments.

Running a design business, you can imagine how frustrating it can be to see emails cluttered up with graphics that you don’t want to see inline.

There are a few options open to you:

Change each attachment by hand : Right click each attachment, and choose to show the attachment as an icon. Perfect for people who have time to waste!

Install Mail Attachment Iconizer from Lokiware : This is a nice application that allows you to choose how attachments should be treated, so smaller images (often used in signatures) will still be shown on screen.

Force OS X to treat ALL attachments as icons no matter what : My personal favourite, as it cuts the clutter to a minimum. Just run the following command from a Terminal session :

defaults write DisableInlineAttachmentViewing -bool yes

To undo this command, just enter it again, swapping “yes” for “false”. Simples!

How to open Winmail.dat on a Mac

If, like me, you are a Mac user, then you will probably understand the frustration that can be caused when having to deal with badly configured Windows software being used by your customers. One of the common problems encountered is that of winmail.dat attachments.

What the hell is a winmail.dat file and why does this happen?

These files usually emanate from organisations that use Microsoft Exchange server, along with it’s unfortunate client-side sidekick, Outlook.

When a rich text message is sent to Exchange from Outlook, and the recipient of the message is marked in the Outlook user’s address book as being able to receive rich text messages, then the message is encapsulated in TNEF format.

This is great if the whole world used Microsoft Outlook – but they don’t.

Enter TNF’s enough!

My prefered solution is to use an application called TNF’s enough! Although there are a number of websites that offer to decode your winmail.dat files, unless you trust the folks who run these websites implicitly, I prefer to keep my emails local to my machine (at least once they have taversed the pubilc internet).

TNEF’s enough has a simple interface, and allows you to decode these files with ease. It is now available as a Universal binary and is compatible with Snow Leopard. Get it now!