s5h.net

“fresh linux news and advice.”


puce2008-08-27 need ideas

Recently I've been feeling like I've lost ideas for projects to work on. Over the past years I've been perfecting my skills in programming and networks (yeah but of course we still make mistakes and things don't come out the oven as planned 100% of the time), but 10 years ago I had boundless ideas and things to work on that I thought would never run out. Lately it seems that I cannot even think of one useful thing to do. So, over to you, if there's something that you'd like me to work on, just drop me a line, but it seems that I'm really scraping the barrel in terms of code projects.

puce2008-08-20 m4 badness

Who knows what it was but joining the m4 today at j8/9 gave me a bad feeling in my belly as the traffic queue moved idly by at around 10-20mph. Something else told me that the queue was going to be long. Both predictions were true as the traffic moved to j10 in queue formation. This turned out to be some accident on the east bound (opposite) side while the west bound just wanted to rubber-neck. After queueing 30 mins, you're damned straight that I'm going to look towards the main event.

puce2008-08-18 numbers

While sharing a locker at a public venue I had a strange thought. The system asks for a token coin to be inserted and states that the locker number N will be designated and then to enter a four digit PIN.

Most people would store their valuable belongings in the locker, such as phone, ID cards wallets and loose change. What are the odds of the person using the locker to use their most common PIN (probably their bank PIN) rather than invent someone on the spot when forgetting this number could leave them stranded (assuming that keys would be left in the locker too).

What are the odds of some single system administrator being able to view the PINs and also perhaps open one locker at random, taking the wallet and going to the nearby cash point and making taking some cash?

It does bring to light that people should perhaps have a series of public, private and confidential PINs rather than one-to-suit-all.

Currently, I have a separate PIN for my savings accounts to my current account, simply because if I should loose my wallet or have it lifted after using a chip-and-PIN device, I'd not want to be handing over the keys to my life savings in one nice go.

puce2008-08-16 mutt

Sometime ago I considered using mutt as a mail client but have since decided that it just doesn't cache enough or is too big a pain in the ass to use realistically. Later my views changed and I found that's not so bad. The main reason for the change was that the mail server at work drops mail in a mbox format. The problem here is that for large mailboxes the whole box has to be rescanned for modifications. This isn't so bad when there are caching IMAP servers which can store such meta data.

This could begin to become quite a rant about performance and system loads but I don't want to go too far down that route. Lets get back to mutt, since that makes this slightly less of a problem since it's possible to leave a mutt window open on most mailboxes that require searching (unlike something like Thunderbird/Sylpheed where only one copy exists in RAM).

On with the programme, here's a snippet of my muttrc that allows for most of what I do, being a Maildir person myself, this is pretty much all I need for navigating Maildir boxes:

set mbox_type=Maildir

set spoolfile="~/nfs/Maildir"
set folder="~/nfs/Maildir"

mailboxes ! + `\
 for file in ~/nfs/Maildir/.*; do \
   box=$(basename "$file"); \
   if [ ! "$box" = '.' -a ! "$box" = '..' -a ! "$box" = '.customflags' \
       -a ! "$box" = '.subscriptions' ]; then \
     echo -n "\"+$box\" "; \
   fi; \
 done`

macro index c "<change-folder>?<toggle-mailboxes>" "open a different folder"
macro pager c "<change-folder>?<toggle-mailboxes>" "open a different folder"

To cover the GnuPG side of things this is all the mutt config that's required:

set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch --output - %f"
set pgp_verify_command="gpg --no-verbose --batch --output - --verify %s %f"
set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch --output - %f"
set pgp_sign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_clearsign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to 0xCE8F4588 -- -r %r -- %f"
set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to 0xCE8F4588 -- -r %r -- %f"
set pgp_import_command="gpg --no-verbose --import -v %f"
set pgp_export_command="gpg --no-verbose --export --armor %r"
set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r"
set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r" 
set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r" 
set pgp_autosign=yes
set pgp_sign_as=0xCE8F4588
set pgp_replyencrypt=yes
set pgp_timeout=1800
set pgp_good_sign="^gpg: Good signature from"

It's a bit lengthy, but it does the job.

puce2008-08-03 pop in

The obligatory mod-pop has been added to my freshmeat projects page, this should be available shortly from freshmeat. Given the tiny amount of code change between mod-imap and mod-pop the two will probably merge into one but for the moment it's relatively simple and that's how I'd prefer it to stay for now.

Oh yeah, and Iron Maiden is in the playlist.