Q: How do I set up (or stop) an auto-response to my incoming mail (``vacation'')?

Unless you are already using procmail (i.e. the file .procmailrc exists in your home directory), use vacation.

In practice, do the following:

  • create a ~/.vacation.msg file containing the text you want automatically sent back to the sender;

  • at the beginning of ~/.vacation.msg, add the lines:
    Subject: Re: $SUBJECT
    Precedence: junk
    followed by an empty line;

  • create a ~/.forward file containing the following (single line):
    \MyUserName , "|/usr/bin/vacation MyUserName"
    (where MyUserName is your username--in lowercase);

  • type vacation -I on GATEWAY.
  • Type man vacation for more options/details.

    To disable, type: rm ~/.forward (assuming this is all you had in that file).

    If you are using procmail, you could add a section like this one:

            * !^FROM_DAEMON
            * !^X-Loop: procmail.vacation
            | formail -rD 8192 .vacation.cache
            | (formail -ckrtz -q-	\
                    -A"Precedence: junk"	\
                    -A"X-Loop: procmail.vacation"	\
                    -I"Received:"	\
                    -I"References:"	\
                    -I"In-Reply-To:"	\
                    ; cat - .vacation.msg) | $SENDMAIL -t
    at an appropriate location in your ~/.procmailrc file.