Search Results

Qmail: forward emails to a PHP script

In qmail, first add the domain alias. For myscript@servername make /var/qmail/alias/.qmail-myscript If its for /var/qmail/mailnames/ should do it. Contents need to be along the lines of: |/var/www/vhosts/ references:


CDONTS was deprecated and replaced by CDOSYS in Winddows 2003.  You can still install and use CDONTs if you need it though.  Just google for CDONTS and register the DLL. CDONTS Example: <% Option Explicit Dim objMail Dim strSubject Dim strBody strSubject = “This is a test email in HTML format”

Load Balanced Linux Web Cluster

Another example of a load balanced apache cluster, this time active-active using Pacemaker/Corosync/ldirectord. This example is using CentOS. – fixed IP of server1 – fixed IP of server 2 – apache site 1 (virtual IP) – apache site 1 server 1 – apache site 1 server 2 – apache […]

Some Munin Notes

Munin – its pretty handy for monitoring stuff over time to view trends. Some notes to get it up and running with a minimal config: Install munin on monitoring server: apt-get install munin vi /etc/munin/munin.conf Add something like: [Webservers;webserver-01] address use_node_name yes [Webservers;webserver-01] address use_node_name yes Group by something sensible, i.e server type, […]

Example IPTables rules for a webserver

Just a quick and basic example IPTables ruleset to secure a web/mail server: # Allow outgoing traffic and disallow any passthroughs iptables -P INPUT DROP iptables -P OUTPUT ACCEPT iptables -P FORWARD DROP # Allow traffic already established to continue iptables -A INPUT -m state –state ESTABLISHED,RELATED -j ACCEPT

Android Apps for a System Administrator

With phones getting smarter and smarter, its now possible to monitor servers and perform basic administration tasks from your android handset. Here are a few tools I find useful. Connectbot is a great SSH client for the Android. It is fully functional, supporting SSH keys and copy/paste etc.   For Windows RDP connections, I found […]

3 Reasons not to use UK2

Today I was lured into using UK2 dot net by the temptation of a .com domain for only £5.99. Bargain I thought to myself as I clicked through the checkout. All is not as it seems though and a bargain is not always a bargain. This is why I will never be using UK2 again: […]

Postfix queue administration

Although I’ve used many MTA’s before, I’m new to postfix so here’s a few handy commands to note: List the mail queue: postqueue -p or mailq Delete a single message: postsuper -d 4C63F2300BA

Useful Linux find examples

The Linux/Unix find command can be used to do a lot more than find strings. Here’s a few very handy commands I’ve put together over the years: Recursively chmod files and folders to something sensible: find . -type d -exec chmod 755 {} \; find . -type f -exec chmod 644 {} \; Find files […]

Yum Automatic Updates

You can install yum-cron to automatically download and install all available updates: yum install yum-cron chkconfig –list | grep yum – should show that the service is disabled chkconfig yum-cron on service yum-cron start Job Done – it will now check for and apply updates every night.  If its business critical solution though its probably […]