The NEXTSTEP/OpenStep FAQ

! to the table of contents
< to the previous section:
> to the next section:


4.11 Appending a signature and addition headers to your e-mail

.signature signature Mail

There is a bundle for Mail to which, beside other features, allows you to add a .signature file to outgoing e-mails: EnhancedMail.bundle. This software package is available by the FTP archive sites.

Here are other solutions which might serve you as well:

[Carl Edman ]

First create a simple text file the following content:

#!/bin/sh { if test -r ${HOME}/.add-header; then cat ${HOME}/.add-header; fi cat - if test -r ${HOME}/.signature; then echo "--"; cat ${HOME}/.signature; fi }| /usr/lib/sendmail "$@"

A good name for this file would be sendmail-addheader. If you want to and can install it for system-wide use put this file in e.g. /usr/lib. Otherwise your private /Unix/bin directory is also fine. Make certain that this file has execute permission. To set that, use e.g. chmod 755 /usr/lib/sendmail-addheader.

Next, open up the preferences panel in Mail. Switch to the expert options. Change the Mailer option from /usr/lib/sendmail (which it should originally be) to /usr/lib/sendmail-addheader (or whatever the name of the file you created is). OK this and you should be set.

From now on your file /.signature file should always be appended to all mail sent out with Mail.app. In addition if you have a file called add-header in your home-directory it should automatically be prepended to your outgoing mail. To implement a reply-to line, you would simply give it the following content:

Reply-to: My Real Human Name

IMPORTANT: Make certain that you have one and exactly one newline at the end of /.add-header. Anything might break outgoing mail. Beware!

BUG: The /.signature file is not added properly for NeXT mail containing attachments. The headers will still be added properly. This could be fixed but probably is more of a hassle than it is worth.

[From: [email protected] (Jim Brownfield)]

I have added a Terminal Service to terminal to add a signature file whenever I type "0" (command/zero), and I thought this might be of interest to people who read your FAQ. I have used this technique for over a year with no problems, and it has the advantage of working both with non-NeXT and NeXT Mail.

First, you must create a file with your signature containing the characters "--" on the first line (there has been some discussion as to whether this should be "-- " ("--" followed by a blank), but my file only has the "--" as the first line. The rest of the file should contain your normal signature. If you place the file in your home directory, I recommend NOT using the filename ".signature" for this file since it may conflict with other programs (like NewsGrazer). I use the filename ".fullSignature". The file used for the signature should be ascii and not RTF to allow the file to be used for NeXT and non-NeXT mail.

You can create a "Get signature" service by launching Terminal and accessing the "Terminal Services" window through the "Info/Terminal Services..." menu item. Then perform the following:

  1. Create a new service by clicking on the "New" button. Change the service name to "Get signature".
  2. Add the command "cat " and "0" (zero) to the "Command and Key Equivalent" entry. The "0" is obviously arbitrary, but I've found that it doesn't conflict with any of the commands I normally use.
  3. De-select any items checked within the "Accept" grouping. Select the "As Input" radio button under the "Use Selection" section.
  4. Change the "Execution" popup to "Run Service in the Background". Select the "Return Output" and "No Shell" radio buttons.
  5. Click the "Save" button.

Now, when you type "0" (actually, from any application), your signature will be added wherever your cursor is located (be careful not to have text selected as it will replace the selected text with your signature). I have found this to be very convenient for adding my .sig to outgoing mail.



This document was converted from LaTeX using Karl Ewald's latex2html.