procmail
[Top] [All Lists]

Vacation recipe

1999-12-14 08:38:24
In case anyone is interested, I just hacked up a vacation-style recipe.
Obviously I started with the stuff I found in procmailex(5), but I added a
bit.

The intended deployment setting here is where a possibly less-sophisticated
user requests vacation processing with no lead time, and immediately
disappears before they can be asked if they're subscribed to any mailing
lists. Of course this would never happen in reality:-).

So create a file ~user/reply containing the message to send, and add a recipe
something like:

        LOGFILE=$HOME/.procmail-log
        VERBOSE=on

        :0 Whc: vacation.lock
        * !^Approved-By:
        * !^BestServHost:
        * !^FROM_DAEMON
        * !^List-Id:
        * !^Mailing-List:
        * !^Precedence: bulk
        * !^Precedence: list
        * !^Resent-Message-ID:
        * !^Resent-Sender:
        * !^Sender: .*-errors@
        * !^Sender: .*-owner@
        * !^Sender: .*-request@
        * !^Sender: owner-
        * !^TOnev(_at_)bostic(_dot_)com
        * !^X-.*-list:
        * !^X-Authentication-Warning:
        * !^X-Listprocessor-Version:
        * !^X-Loop:
        * !^X-Mailing-List:
        * !^X-Mailman-Version:
        * !^X-Sent-To:
        * $^To:.*$LOGNAME
        | formail -rD 8192 vacation.cache

        :0 ehc
        | (formail -rI"Precedence: junk" \
                   -A"Bcc: postmaster" \
                   -A"X-Loop: $LOGNAME(_at_)$HOST" \
                ; \
                cat $HOME/reply \
          ) | $SENDMAIL -t

        # if you want anything special to happen with the mail,
        # you can do it here

After a little testing you can #-out the VERBOSE=on, and after a lot more
testing maybe even yank the Bcc: postmaster.

Anybody have anything to add to my long list of
things-that-smell-like-mailing-lists? I only found one single list that I'm
subscribed to that didn't have any of the generic markers, and so I coded in a
special case for it.

-Bennett

Attachment: pgpx6wUuVCYAk.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>