Building IMAPFilter In Ubuntu 9.10 (Karmic Koala)

IMAP Mailbox Manipulation for the Masses

From the website, IMAPFilter is;

“…a mail filtering utility. It connects to remote mail servers using the Internet Message Access Protocol (IMAP), sends searching queries to the server and processes mailboxes based on the results. It can be used to delete, copy, move, flag, etc. messages residing in mailboxes at the same or different mail servers. The 4rev1 and 4 versions of the IMAP protocol are supported.”

Basically, it’s the most awesome utility I’ve found to search through large IMAP accounts, performing actions on messages that meet certain criteria. In Ubuntu 9.10, the repo version is 2.0.10 (February 2008), but the latest available version is 2.2 (December 2009), which includes several important fixes and various new features. Unfortunately, compiling the new version in Karmic has a few small gotchas, that might throw-off a few people.

There are a few essential packages we need to install, that might not be found on a standard build system. Don’t forget to accept any other packages your system might suggest;

sudo apt-get install libssl-dev liblua5.1-0-dev libpcre3-dev

Then, we need to download and extract the source code;

cd ~/src
wget http://imapfilter.hellug.gr/source/imapfilter-2.2.tar.bz2
tar jxvf imapfilter-2.2.tar.bz2
cd imapfilter-2.2/

Next comes the unusual bit, we have to create a symlink that the code is expecting;

sudo ln -s /usr/lib/liblua5.1.a /usr/lib/liblua.a

Once this is done, we can follow the standard make procedure;

./configure
make
sudo make install

IMAPFilter should now be correctly built and installed. It doesn’t create a default configuration file for you, as it knows nothing about your E-Mail account or what you want to do with it. Use this great sample configuration file as a basis for your configuration file – http://imapfilter.hellug.gr/sample.config.lua.txt

Note: I’m sure it should be easy to roll something into the code to remove the need for the symlink, but my programming skills are, to be polite, poor.

Tagged with:
 

How to Build the knock client on Ubuntu Karmic

Knock Three Times on the Ceiling if you Want Me…

I’m sure like a lot of people around here, I just upgraded my primary desktop to Karmic Koala.  Everything went swimmingly, as was to be expected, so I took the leap with my laptop as well.  As is traditional for me, rather than upgrading my laptop, I went for a clean install.  Again, everything went perfectly, taking about 30 minutes from finishing the backup to playing World of Goo.  I wanted to install the knock client, but didn’t want to install the daemon to go with it by installing the knockd package.

Source Code to the Rescue!

Of course, building from source was the way to go.  I ran into a few small gotchas along the way, so I thought I would document them here.  It is generally a simple matter of downloading, configuring and making, with a few adjustments;

mkdir ~/src
cd ~/src
sudo apt-get install build-essential libpcap-dev
wget http://www.zeroflux.org/proj/knock/files/knock-0.5.tar.gz
tar -xzvf knock-0.5.tar.gz
cd ./knock-0.5/src

From here we need to edit the knockd.c file, find the list of #include statements, and add the following to the top;

#include <limits.h>

Then continue as normal, but only copying the required binary, rather than make install ing;

cd ..
./configure
./make
sudo cp knock /usr/local/bin

Happy knocking to one and all!

Tagged with:
 

Not Fair Even For A Rogue!

My Poor Defenseless Rogue!

I was going through some old backups, and came across this screenshot I had taken a while ago. I had aptly named it ‘WTF.png’. I’m all for a little challenge in a game, but this hardly seems fair for a level two rogue!

WTF!

Tagged with:
 

Time-shifting Air America Radio

A.K.A. I Can Listen to Nicole Sandler Again!

Earlier this year, the powers-that-be decided South Florida no longer needed a progressive talk-radio station, and turned 940 WINZ into the markets 6th sports radio station. Now that might seem weird, considering in the 2008 election, 67% of Broward county, 58% of Miami-Dade county, and 61.5% of Palm Beach County voted for Obama. However, when you consider some of the Twitter posts from Station Manager Ken Charles, everything becomes obvious.

Other than making the hour drive to work each day very boring, this didn’t have too much of an effect. I can still listen to my favorite shows on-line, on one of the other progressive stations around the country. My station of choice is the wonderful KUDO 1080 in Alaska, if only for the irony that Alaska (60% McCain) has a progressive radio station, and we don’t. The one thing that did affect me was no more Nicole Sandler. Yes, she put together her pod-cast at RadioOrNot, but somehow it wasn’t the same. Whether by hook or by crook, she got some fill-in spots on Air America, which then turned into a permanent show. Awesome you say, except that it’s 11pm to 1am, and I have to be up at 5am every day for work.

Luckily, to my rescue came Linux and a few CLI tools, allowing me to record her show to MP3 format for listening to at a later (or earlier) time. The only tool probably not already installed on your system is Streamripper, which on a Debian-based system can be installed with;

sudo apt-get install streamripper

Then to actually record the show, I added the following line to my crontab;

55 22 * * 1,2,3,4,5 streamripper http://aarlive.voxcdn.com/live.m3u -d ~/Radio/ -a Nicole`date +%Y%m%d`.mp3 -m 15 -A -s -l 7800

This is basically saying, at 10:55 every Monday through Friday, record the Air America Radio feed for 130 minutes. The files saved are named based on the date of the recording, allowing me to keep an archive of previous shows.

Yes, I know Air America Radio has an ‘On Demand’ service, but I’m cheap!
Tagged with:
 

Most Useful Command Ever?

Probably An Exaggeration But…

I don’t honestly remember where I got this from, but I use it ten times a day anyway. Web sites like http://www.whatismyip.com are really useful when you need to quickly find your public facing IP address.  However, for those of us who spend more time starting at a console than a GUI, they can be a little bit cumbersome.  To that end, someone kind, caring and considerate registered a domain, and set up a server that does nothing but serve up the IP of it’s visitors.  Run the simple command;

curl http://www.icanhazip.com

And wonder in amazement as your public IP is returned to you. Thanks, whoever you are!

Tagged with:
 

How Could I Miss The Weiner?

Just One Final Hit…

I keep trying to get out, but somehow they keep pulling me back in. It’s my own fault though, I forgot to include the worlds most evil hippy, Michael ‘Savage’ Weiner.

savage

It goes without saying all the classics are there; ‘racist‘, ‘douche‘, ‘insane‘. Confusingly number three is ‘moving‘. Is this a personification of the fervent wishes of sane people everywhere? In fact, it mostly references a story that at one point he considered moving to Israel. I for one will pitch in a few dollars for a plane ticket if he is still interested.

Just as confusingly, number five is ‘liberal‘. After checking to make sure they hadn’t changed the dictionary definition of liberal to ‘hate-mongering, racist liar‘ while I was asleep, I found out it most likely came about simply because several pages on-line reference him as our savior from Liberals.

Which is nice, I guess.

Tagged with:
 

Google – The Smartest Search Engine Ever?

This is the last time, promise!

Following on from last post, I couldn’t resist finding out the opinion Google has on other radio talk show hosts. The results were interesting to say the least, hence my Fox News-esque title.

Starting with the pill-popping prima donna of Palm Beach himself, Rush Limbaugh, Google doesn’t disappoint.

rush

Big fat idiot‘ is the clear winner, which goes without saying, but is also referencing Senator Al Franken’s book of the same name. The obvious ‘Racist‘ appears at number four, with the unexpected, but oh-so true, ‘Traitor‘ and ‘Nazi‘ coming in at eight and nine. It’s amazing how Google can summarize a man so succinctly.

With Rush down, the next obvious choice was the sociopath’s sociopath Glenn Beck.

beck

No surprises here either really, all the favorites make an appearance. The family friendly ‘Idiot‘ topping the charts, variants of ‘Douche‘ at three and five, and the ever-present ‘Racist‘ sneaking in at nine. The eye can’t help being drawn to the runner up, ‘Awesome‘, which you might think in some way indicates Google likes Mr. B? However, do another Google search, this time for ‘most awesome person ever’, and the top link comes up with suggestions of Michael Vick, Chris Brown or T.I. Awesome doesn’t mean good, it simply means inspires awe such as, “the amount of inane racist babble that man talks everyday is awesome“.

Next up is the less well known, but just as hateful Mark Levin. While he might not hit the full 10 results, it’s nice to see Google hasn’t missed anything important while being brief.

levin

Idiot‘, ‘Jerk‘, ‘Moron‘ and ‘Liar‘ pretty much sum him up, although my personal favorite, ‘Evil‘, is sadly lacking. I’ll put some effort into rectifying that shortly. His religion pops in at five, which while in no way should be considered a negative thing or a slight on his person, it is interesting to note more people have reason to comment on his religion than his ability as a radio talk show host or writer.

Not wanting to leave out those from the left side of the aisle, the obvious choice was the box-wine oficionado, Miss. Stephanie Miller.

miller

Again, you can’t find fault in Google’s opinion at all, it’s direct, to the point, and unnervingly accurate. Now if only they could get that ‘I’m Feeling Lucky‘ button to do what it’s suposed to do…

Tagged with:
 

Google Doesn’t Lie!

I’d always promised myself I wouldn’t post anything political on here. I’m planning another place for that. However, I’ll pretend this is about Internet search technology or something.

It’s nice to see that Google and I hold the same beliefs!

Google Loves Hannity!

Google Loves Hannity!

Tagged with:
 

Echo Traffic From One Interface To Another

I’m not sure there is a legitimate reason to do this but…

In case you ever need to echo or duplicate network traffic from one network interface to another, the following command might be useful;

     # sudo tcpdump –i eth0 –s 0 –w - | tcpreplay –i eth1 -

If you’re using Ubuntu, two non-standard packages are required;

     # sudo apt-get install tcpdump tcpreply

In my testing I got a small amount of packet loss (sub 0.5%) when pushing around 10Mbit throughput, but that was on very minimal hardware. I wouldn’t plan on doing anything mission critical with this, but it could get you out of a bind. YMMV.

Tagged with:
 

ufw Officially Available For Debian

Good News For Debian Users

It had to happen eventually, and I for one am glad to hear it. I must admit I haven’t deployed a new Debian system for a fair while, other than rolling my VPS back to Debian from Ubuntu. However, the recent news that ufw (Uncomplicated FireWall) is now packaged for Debian is great to hear. For those of us who need the power of iptables, without the infinitely granular configuration options, ufw is perfect.

Debian packages page for Ubuntu – http://packages.qa.debian.org/u/ufw.html

Tagged with: