procmail
[Top] [All Lists]

SUMMARY: Extraneous filter flag ingnored

2000-04-03 13:16:40
Hello,
  I received only one response from R A Lichtensteiger
<rali(_at_)Tifosi(_dot_)com> , but finally I've found the problem, so just
for the archive and other possible dummies, here's the solution.

  I can't find the reason the filter flags in my recipe are extraneous.
Could someone explain the reason? Anyway, the recipe doesn't actually
foward the message, probably because of the problem with brackets.

Wrong guess.

Second question would be, if it wouldn't be faster to use the 
" formail -zx`From` " stuff to extract From: and Date: fields.

Too expensive.


:0
* ^Subject:[    ]*montana2fwd[  ]*\/[^  ](.*[^  ])?
{ NADPIS = "$MATCH"

  :0 fhw
  * ^From: \/.*
  { ODESILATEL = "$MATCH" }

  :0 fhw
  * ^Date: \/.*
  { DATUM = "$MATCH"}

Remove f and w from the recipes above, you can use f only if there's a
pipe used in the recipe, variable assignment doesn't help although it's a
delivery. Remove w because you don't need the exitcode from filter. The
waiting cycle is already implemented in f itself, so when we don't test
for exitcode, w and W are useless. I wish this is already mentioned in
procmailrc manpages above 3.13.1.

  # I want to prepend text to the body - From:, Date:, empty line
  :0 fbw
  { ( cat; echo $ODESILATEL; echo $DATUM; echo ) }

I forgot the pipe sign! Also, this appends the text, I wanted to prepend
the text, so:

   :0 fbw
   | ( echo "From: $ODESILATEL" ; echo "Date: $DATUM" ; echo ; cat - )


  :0 ktb
  | formail -I "Subject: $NADPIS" -I "To: recipient(_at_)domain(_dot_)org" | 
$SENDMAIL -oi -t
}


-- 
Martin Mokrejs - PGP 5.0i key at: finger://mail.natur.cuni.cz/mmokrejs
<mmokrejs(_at_)natur(_dot_)cuni(_dot_)cz> Faculty of Science, The Charles 
University


<Prev in Thread] Current Thread [Next in Thread>
  • SUMMARY: Extraneous filter flag ingnored, Martin Mokrejs <=