Random Signatures With A Minimum of Support From Your MUA

I read this in Linux Gazette and it reminded me of what I did back when I was using elm:


Date: Fri, 16 Oct 1998 17:03:41 +0000
From: Colin Smith, colin@melly.europe.dg.com

This has probably come up before, but the "more fun with pipes" thing in issue 33 reminded me of it.

Have a different signature appear in your emails every time you send one.

Create a subdirectory in your home called .signatures and copy your .signature file into it under a visible name. Delete your .signature file and create a pipe in its place using

 
mkfifo .signature
Create a script which simply "cat"s each of the files in the .signatures directory out to the .signature pipe:
 
#!/bin/sh
while true
do
        for SIGNATURE in ${HOME}/.signatures/*
        do
                # Cat each file out to the .signature and throw away any errors.

                cat ${SIGNATURE} > ${HOME}/.signature 2> /dev/null

                # This sleep seems to be required for Netscape to work properly
                # I think buffering on the filesystem can cause multiple signatures
                # to be read otherwise. I think the sleep allows Netscape to see
                # the End Of File.

                sleep 1
        done
done
Have this script kick off in the background every time you log in to the system in your profile or xsession. Add more entries to the .signatures directory and they automatically get used in your emails.

Issues and problems

One issue might be blocking on the pipe. If there is no process feeding signature files down the pipe, any programs which open the pipe can appear to hang until something is written.

Note from Rob: This is why mutt is a better solution. One of the quotes I use comes from Andrew C. Bulhak:

Most people aren't aware of the fact that UNIX actually dates back to the Cthulhuvian epoch, and was widely used in R'lyeh. The R'lyehish word fhtagn is actually a technical term, and literally means "sleeps on an event". Thus, Ph'nglui mglw'nafh Cthulhu R'lyeh wgah'nagl fhtagn literally means "in his house at R'lyeh dead Cthulhu waits blocked on I/O".
If that doesn't bother you then you can also use a pipe to change your .plan every time someone fingers you.

--
Colin Smith


Last modified: Tue Nov 3 17:37:57 EST 1998
[EFC Golden Key - Strong Crypto]