procmail
[Top] [All Lists]

Re: Scratching my head

2000-01-12 07:08:52
On Tue, 11 Jan 2000 05:39:28 -0600, Randy <Procmail(_at_)tcgdata(_dot_)com>
wrote:
I have another novice question.  First though, can someone point me to a 
manual or tutorial for procmail?

<http://www.iki.fi/era/procmail/links.html> has links to a number of
tutorials. See also www.procmail.org and the FAQ pointer. You'll find
links to them as well at the above site.

Anyway, this little recipe does what I want with one exception.  It will 
not work with an email without the subject line.  And of course it will not 
because of the condition.

:0hc
   * $ ^Subject:${GETTEXT}
  | (formail -r -t -A"Precedence: junk" \
    -I"From: TCGdata Support <support(_at_)tcgdata(_dot_)com>" \
    -I"Subject: TCG.:$serial - [${MATCH}]" ;\
    cat $HOME/support.txt ) | $SENDMAIL -t 

Try this.

    SUBTAIL=

    :0
    * $ ^Subject:${GETTEXT}
    { SUBTAIL=" - [$MATCH]" }

    :0
    | ( formail -rt -A"Precedence: junk" \
            -I "From: TCGdata Supprt <support(_at_)tcgdata(_dot_)com>" \
            -I "Subject: TCG.:${serial}${SUBTAIL}" ; \
        cat $HOME/support.txt ) | $SENDMAIL $SENDMAILFLAGS -t

Hope this helps,        

/* era */

-- 
 Too much to say to fit into this .signature anyway: <http://www.iki.fi/era/>
  Fight spam in Europe: <http://www.euro.cauce.org/> * Sign the EU petition

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