Learning Common Lisp and My Email Server

It is now the first Monday after I spent a weekend learning Lisp from Practical Common Lisp and I am in awe. I don’t know if it is me but I just feel like I ‘like’ lisp, it is so simple (although I don’t know most of the functions that are being called). The Slime environment is amazing, I can’t wait to set mine up on adelie here (along with remote access via ssh :p).

I think the thing I like most about Lisp is that the syntax is just simple; I mean there are lists, atoms, functions, and macros. That is about it. I really feel that I can keep more of it in my head at one time, even more so than Ruby.

I am also in the process of moving my mail server back to home. I will still run smtp and a simple setup on the virtual host but I am going to use fetchmail to store it all on my local RAID server. I think I already have it setup so I can tunnel in via ssh and access imap on it, I am just getting a fresh rsync of my Maildir before I fully move over (over 121,000 messages).

I even had some time to hack out a simple script to open the ssh tunnel for me and also tail my fetchmail logfile. There is some awk in there to try and figure out if I am at home, at work, or somewhere else.

#!/bin/bash
FULLLOC=`ifconfig eth0 | awk '/inet addr/ {print substr($2,6,15)}'`
THIRDLOC=`ifconfig eth0 | awk '/inet addr/ {print substr($2,6,9)}'`

# Check if home aka 192.168.1.0 network
if [ "$THIRDLOC" = "192.168.1" ]; then
    echo "(=>) Connecting to localserver via HOME network..."
    ssh localserver -L 2020:localhost:143 tail -f -n 20 var/fetchmail.log
elif [ "$THIRDLOC" = "192.168.0" ]; then
    echo "(=>) Connecting to homeserver via WORK network..."
    ssh homeserver -L 2020:localhost:143 'tail -f -n 20 var/fetchmail.log'
else
    echo "(XX) Where the hell are you?"
    echo $FULLLOC
fi