Customizing PostgreSQL's psql sessions

August 24, 2012 at 07:30 AM | categories: Sysadmin, Tips | View Comments
PostgreSQL allows you to customize your psql session's using a configuration file "psqlrc". using a psqlrc file you can create shortcuts, change your prompt etc. The user specific psqlrc file is ~/.psqlrc When you work with several databases on...

Iphone/Ipad/Mac OSX IPSEC VPN with Strongswan 5 on Centos/RHEL 6

August 23, 2012 at 10:21 AM | categories: Centos, Mac OS X, Howto, Sysadmin, RHEL, Linux, Tips, Security, IPSEC | View Comments
This howto describes setting up an IPSEC VPN for use with the Iphone, Ipad and Mac OSX VPN clients on Centos/RHEL 6. I am using the 5.x branch of Strongswan which is now the mainline actively maintained branch. At...

Fix Bind error (broken trust chain) resolving

August 22, 2012 at 08:21 PM | categories: Tips, RHEL, Centos, DNS, Linux | View Comments
This Bind named issue results in queries failing and log messages such as the following being logged error (no valid KEY) resolving 'dlv.isc.org/DNSKEY/IN': 156.154.101.23#53 error (broken trust chain) resolving './NS/IN': 193.0.14.129#53 The issue is caused by the date on...

Disable a ClamAV signature

August 10, 2012 at 07:30 AM | categories: Tips, Email | View Comments
There are cases when you need to disable a ClamAV signature for various reasons. To do this create a file with the extension ".ign2" in your ClamAV data directory with the name of the signature. cat > /var/lib/clamav/mb.ign2 << 'EOF'...

Mac OS X Alias IP addresses

June 11, 2012 at 07:55 AM | categories: Mac OS X, Tips | View Comments
To create an IP alias ifconfig en0 alias 10.0.0.1 255.255.255.0 To remove an IP alias ifconfig en0 -alias 10.0.0.1 255.255.255.0 ...

How to fix Exim SMTP AUTH rewritting the from address

June 08, 2012 at 07:55 AM | categories: Tips, Exim, Email | View Comments
When using SMTP Authentication with exim and the default configuration you will find that exim rewrites the sender address to "email@address"@smtp_server_hostname Return-Path: <"andrew@topdog.za.net"@xxxx.xxxx.co.za> ... Sender: "andrew@topdog.za.net"@xxxx.xxxx.co.za ... To fix this you need...

Block Spam from domains on the South Africa ISPA Spam Hall of Shame using DNSBL Part2

May 11, 2012 at 07:30 AM | categories: Postfix, Tips, Exim, Email, Linux | View Comments
I previously wrote about how to block domains named in the ISPA Spam Hall of Shame using DNSBL at SMTP time, these domains have now resorted to using 3rd party senders to try and get their Junk through. Because they...

TIP: Various cheatsheets i find useful

April 28, 2012 at 08:35 AM | categories: Tips | View Comments
Jquery Cheat sheet Markdown Syntax Cheat Sheet Git Cheat sheet Regular expressions Cheat Sheet Django Cheat Sheet HTML Cheat Sheet Python Cheat Sheet RGB HEX Color Cheat Sheet ...

TIP: Block Spam from domains on the South Africa ISPA Spam Hall of Shame using DNSBL

April 22, 2012 at 09:30 AM | categories: Postfix, Howto, Exim, Email, Linux, Tips, Security | View Comments
The South Africa Internet service providers association (ISPA) maintains a list of known spammers dubbed the Spam Hall of Shame. The list is contains both domains as well as email addresses, this list is published on a webpage without downloadable...

TIP: Use a random IP address from an pool of addresses with Exim

April 21, 2012 at 08:21 AM | categories: Tips, Exim, Linux | View Comments
Create a lookup file /etc/exim/ips.txt with 1: xxx.xxx.xxx.1 2: xxx.xxx.xxx.2 3: xxx.xxx.xxx.3 4: xxx.xxx.xxx.4 Set the transport to: remote_smtp: driver = smtp interface = "${lookup {${randint:5}} lsearch {/etc/exim/ips.txt}}" randint will return a random number...

Exim commands you should know

April 15, 2012 at 11:56 AM | categories: Tips, Exim, Linux | View Comments
Print out the exim configuration options exim -bP Print the contents of the queue exim -bp Print the number of items in the queue exim -bpc Test addresses exim -bt addresss Print exim version and test...

Tip: Extract RPM name without version numbers

April 11, 2012 at 05:56 PM | categories: Tips, Linux | View Comments
for rpm in $(rpm -qa|sort); do rpm=${rpm##*/}; rpm=${rpm%%-[0-9]*}; echo ${rpm}; done You can also use a simpler command just from within rpm rpm -qa --queryformat "%{NAME}\n"|sort ...