procmail
[Top] [All Lists]

Re: Add Header ...

1997-04-07 16:15:00
Stan Ryckman <stanr(_at_)sunspot(_dot_)tiac(_dot_)net> writes:
At 06:56 PM 4/7/97 GMT, e8426314(_at_)stud1(_dot_)tuwien(_dot_)ac(_dot_)at 
wrote:

[snip]

:0h                            # this doesn't add the -A-Headers!
* !^X-Loop: tgyoeroe(_at_)sampo(_dot_)nt(_dot_)tuwien(_dot_)ac(_dot_)at
| (formail -X From: -X Subject: -A"Sender: procmail 
<tgyoeroe(_at_)nt(_dot_)tuwien(_dot_)ac(_dot_)at
" -A"Precedence: junk" ; \
echo "Bad FROM... --- dumped into SPAMFILE!" \
) | $SENDMAIL -oi e8426314(_at_)stud1(_dot_)tuwien(_dot_)ac(_dot_)at


Don't you need a space after the -A occurrences?  My man page says so.
Note that you have a space after the two -X's and those worked.

The space is not required, and putting it there does not solve the problem.
The problem is that extraction takes place after addition.  Explicitly
extracting the added lines will make it work:

    :0h
    | (formail -A"Sender: procmail 
<tgyoeroe(_at_)nt(_dot_)tuwien(_dot_)ac(_dot_)at>" -XSender: \
               -A"Precedence: junk" -XPrecedence: -XFrom: -XSubject: ; \
       echo "Bad FROM... --- dumped into SPAMFILE!" \
      ) | $SENDMAIL -oi e8426314(_at_)stud1(_dot_)tuwien(_dot_)ac(_dot_)at


I'm sorta surprised actually that the above is necessary, though Stephen
may have setup the logic that way for a good reason.  Hmm.

Philip Guenther

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