# Automatic Signature on End of Messages

Some users like to have a few lines added automatically at the bottom of each message they send.

This is easy to do with comp. Put the line(s) at the end of your components file, and they'll be copied into the draft automatically. Unless you use its -noprepend switch, prompter will prompt you with:

        --------Enter initial text

and wait for you to type CTRL-D before it copies the rest of the components file into the draft. The example below has a typical components file with a signature at the end. Standard signatures start with a line that contains exactly two dashes and a space (`--` ). The space at the end of the line is important. This syntax lets programs detect where the body ends and your signature starts, so it's a good convention to follow.

        To:
        cc:
        Fcc: outbox
        Subject:
        --------

        --
        Emma H. User, ehuser@bigcorp.xxx.yyy, phone +1 301 456-7890

You can't add a signature to the template files for the forw or repl -filter commands, though. That's because they add their text (the forwarded message or copy of the original message) after the contents of the forwcomps or replcomps file, respectively. So your signature would be at the start of the draft message.

In repl, you can handle that by adding the signature to the end of your -filter file. mhl reads the filter file, so use a colon (`:`) before each line of the signature, as shown in the following example:

        :-- Emma H. User, ehuser@bigcorp.xxx.yyy, phone +1 301 456-7890

It's hard to use one of these methods on forwarded messages because the signature goes in the wrong place whether you prepend or noprepend. Some answers are:

- Add the signature manually.
- Write an -editor shell script that adds it automatically.
- Use the append shell script.
- Use a sendproc program like mysend.

If you always send MIME messages, and if your signature is long, it's courteous to put your signature in a separate part with a description that tells people what it is. They don't have to read the signature if they know who you are and how to reach you.

        To:
        cc:
        Fcc: outbox
        Subject:
        --------

        #<text/plain [Signature]

        \     |\.-./|    Cynthia Pribram * System Administrator
         \\   |'a a`|    O'Reilly Media, Inc.
          \\ =(= v =)=   103A Morris Street * Sebastopol, CA 95472
           \\ /\_^_/\    (800)998-9938 * (707)829-0515 x 218 * fax: (707)829-0104
            \|  \_/  |   cynthia@ora.com
             \ || || /
            (__||-||__)
               ^^ ^^

In a repl filter file, remember to add the colon (`:`) to the start of each line of the body -- including the `#<text/plain` directive.