procmail
[Top] [All Lists]

Re: Autoresponder with a Reference number

1998-10-08 07:47:25
|Wed 1998-10-07 daniel <daniel(_at_)adinet(_dot_)com(_dot_)uy> list.procmail
| I am new with procmail, and unix. My ISP provider, pair.com has an utility
| pmproto which generates the apropiate .forward and .procmailrc for some very
| basic conditions.
| I need to generate an auotoresponder, which includes a reference number in
| the subjet. This reference number should be incrementing, a random generated
| number, or somthing related to the date and time. I want to use it to
| provide support to our customers through email.

For generating something unique, I would suggest using YYYY-MM-DD-HH-MM.

A slow version:

    call date(1) with % formatting escapes

20x faster version:

    use pm-jadate.rc    (See X-info header File Server)

It depends how much traffic you get. To create an autoresponder, you

-- Look specific subjects
-- Check aginst DAEMON messages
-- Add X-Loop header to prevent infinite loops
-- Write the code to return the messgae back: fortmail -rt et all.

There are autoresponder examples in procmail man pages. Basicly:

        [pm-tips.txt]


        _MY_XLOOP_ = Used to prevent resending messages that have already
        been handled. Typically `$LOGNAME(_at_)$HOST', but this can be any user
        chosen string. Make it it unique to your address. In this document
        the definition is:

            MY_XLOOP = "X-Loop: $LOGNAME(_at_)$HOST"

        [...]

                :0 hw:
                * daemon-and-XLoop-tests-here
                | ($FORMAIL -rt                                             \
                            -A "Precedence: junk"                           \
                            -I "$MY_XLOOP";                                 \
                   echo "$MESSAGE"                                          \
                  ) ) | $SENDMAIL -oi -t

jari

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