Search Results

Fix CSS Browser Compatibility using conditional comments

I’ve never had any incompatibly issues with different browsers whilst working on websites before – until today. For some reason IE7 decided it wanted totally misjudge my margins by about 30 pixels – totally distorting the site. Strange how it worked fine in any other browser (Including IE6 and IE8!). Anyway, conditional comments can be […]

Check how old a Linux password is using chage

I came across a command today that I’ve never really had a use for before.  chage can be used to check when a password was last modified and also shows any password expiration rules etc.  It can also be used to implement password expiration. A very useful tool if password policies are required, although PAM […]

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 […]

Basic AWK usage in BASH

To print a field from a file (-F is the field separator and $ is the number of the field to print): awk -F':’ ‘{ print $1 }’ /etc/passwd or awk -F':’ ‘{ print $1 $3 }’ /etc/passwd or awk -F':’ ‘{ print “username: ” $1 “\t\tuid:” $3″ }’ /etc/passwd

qmail adds number to recipient header

qmail sometimes adds a number to the recipient header when delivering mail locally, so for example, user@domain.com may become 3-user@domain.com.  This isn’t such a problem when mail is just being used locally, but if your using a POP connector to download mail to an Exchange server for example it will cause issues with it getting […]

Plesk 9 – Migration Manager set source directory

For some bizarre reason The Plesk 9 migration manager has taken away the functionality to specify the partition used on the source server.  Not very handy if you have partitions running low on disk space.  I’ve found two solutions that seem to work: On the target server edit /usr/local/psa/admin/share/migration-handler/migration_handler.py Modify the following line and update […]

SMTP Reply codes

Code     Meaning 200     (nonstandard success response, see rfc876) 211     System status, or system help reply 214     Help message 220     <domain> Service ready 221     <domain> Service closing transmission channel 250     Requested mail action okay, completed 251     User not local; will forward to <forward-path> 354     Start mail input; […]

Disable Track and Trace in Apache

TraceEnable off is available in Apache 1.3.34, 2.0.55 and later Otherwise you will need to add: RewriteEngine On RewriteCond %{REQUEST_METHOD} ^TRAC(E|K) RewriteRule .* – [F] to a /etc/httpd/conf.d/zz_020_disable_track_trace.conf and possibly to the individual vhost.conf’s

rsync backups

rsync can be used as an effective backup tool: rsync -avz –delete -e “ssh -i rsync/mirrorkey” backup@85.222.111.000:/var/www/vhosts/mydomain.com/httpsdocs /backup/mydomain.com If there’s a lot of data and speed takes importance over security, a weaker cipher such as blowfish could be used: “ssh -c blowfish -ax -i rsync/mirrorkey” Be careful with the –delete flag, it will delete files […]