Signatures, or .sigs as they are called, abound on the Internet. The purpose of this page is to provide information and utilities related to signatures.
I wrote this page primarily because I had written some scripts for random signatures to use with MUAs (esp. Pine), but since they didn't directly relate to my Pine pages, I thought I'd put them by themselves on a separate page.
A signature line is a small inclusion at the bottom of your e-mail messages. It's original purpose was to provide the name and e-mail address path of the sender, so that that information was available reliably even if the mail headers got garbled. Nowadays, message handling is standardized and mail transport is reliable, so it is no longer needed to serve that purpose.
Instead, people use signatures to add witticisms and propagate general profundity around the Internet.
Your signature is stored in a file, usually .signature in your home directory. MUAs read this file and add it to your outgoing messages.
If you want to use a signature in your messages, convention suggests two important considerations:
sig-dashes are a string of characters that separate your signature from the body of your message. This sequence is defined as the characters "-- " appearing on a line by themselves. (The quotes should be removed of course. Please note the space after the two dashes.)
This means that the sequence for sig-dashes is (newline)(dash)(dash)(space)(newline).
MUAs do many nifty things to signatures if they are thus separated from a message.
The McQ limit is named after George F. McQuary. He was a regular on the newsgroup alt.fan.warlord. The McQ limit is that the signature should be no larger than 80 columns wide and 4 lines long.
Contrary to most people's belief, bandwidth is expensive. Sending large signatures wastes bandwidth. While the sender may not pay for it, there are countless many that will, including service providers, network access providers, line owners like the telephone companies etc. as well as the large number of people that pay for their Internet access by the kilobyte, or the time they stay connected.
It is unfair to burden these people with the cost of carrying what is generally useless information.
It becomes particularly important to limit your signature when posting to newsgroups and mailing lists when a large number of people will read your message, perhaps paying extra for reading your signature. It is also annoying to see several lines of a signature when one receives mailing lists in the digest format.
Pedantically, your name and email address. However, people sometimes add additional contact information, URIs of their home pages, organizational information etc. You may of course add totally irrelevent information, quotes etc. as well, AS LONG AS IT SATISFIES McQ!
Any time you reply to a message, trim the signature from the quoted text. The only signature that may appear in a reply message is your own. Quoted signatures waste even more bandwidth than the original ones.
This page's raison d'être. Unless otherwise stated, these scripts/programs were written by me. The ones that were written by me have sufficient documentation in their source. The others are their authors' business.
All of the scripts that were written by me that appear on this page are distributed under the GNU Public license. The text of the license is available at http://www.gnu.org/copyleft/gpl.html.
sig-file - This is my first attempt at writing a script for random signatures. It does not produce random signatures. Instead it produces sequential signatures from a collection in a file. It enforces the McQ limit.
The collection file is by default, ~/.sig-collection, but you can change that using the -s option.
Help is available using the -h option. It contains the specifications for the sig-collection format as well.
I had to write a trivial wrapper for this script to use with Pine, since the definition of the signature program in Pine cannot take any parameters. It's so simple that you can write it yourself.
sig-dir - This was my next attempt. It produces random signatures from a collection of many files, each containing one signature. This also enforces the McQ limit.
spook - This emulates the functionality of the spook function in Emacs. It looks at ~/.spook.lines for phrases, but there is a command-line argument to change that.
By default, it outputs phrases until it hits the McQ limit, but this can be overridden on the command-line. Use the -h option for help. It uses each phrase only once, so if you have a small spook.lines file or request a whole bunch, you won't get them. (This was true of version 1.0 . The new version 1.01 sort of fixes this. See the help text)
Lastly, if you choose to output lines that are as wide as your terminal, the newline added at the end of each line will cause a funny extra line to appear if your terminal wraps (almost all do). Not my fault.
sigContext - This provides context-sensitive signatures. A signature is chosen based on who the recipient of the message is. If there are multiple recipients, then the one with the highest score wins. Newsgroups always win over mail recipients.
Depends on a config file, ~/.sigContext which contains the scores and signatures. Signatures can be files, programs or literal text.
I have provided a sample .sigContext file.
Probably the best way to get random signatures is to use the fortune program to generate them. To do this, you must first put all of your signatures into a fortune database.
Write all of your signatures into one file like so:
My first signature goes here % My next signature goes here % Ad nauseum % My last signature goes here
Then, run strfile on this file. Assuming that I call the above file signatures, my command would be
$ strfile signatures
If strfile is not installed on your machine by default, there is a perl script that mimics it written by Theo Van Dinter. You can download it from his page at http://www.kluge.net/~felicity/ppt/strfile. I have a local copy here.
This will produce a file, signatures.dat which is the actual fortune database. You can now use the fortune program to generate random signatures from your collection.
The fortune program can use any fortune database to produce random epigrams. The documentation for the BSD version of fortune is available from the OpenBSD Manual Pages website. The entry for fortune is here.
If you don't have fortune installed on your computer, you can use a perl script from the Perl Power Tools collection. The fortune sources are here.
You can now tell your MUA to use the fortune program to use your fortune database to produce random signatures.
By default, this will not enforce the McQ limit, so it is up to you to use it responsibly. It should be easy enough to write a wrapper for fortune that will enforce it, but I'm too lazy now.