procmail
[Top] [All Lists]

Re: conditional variable assignments

1997-08-13 11:31:00
Niketan Pandit asked,

| Is it possible to make conditional use of INCLUDERC variable -

Yes.

| If yes how does one go about it?

Open a brace block as the action line of the condition, assign the variable,
and close the braces.

| I would like to use INCLUDERC=rc.abcxyz with five different recipes if
| let us say 'abcxyz' was present in head,

 :0
 * abcxyz
 { INCLUDERC=rc.abcxyz }

| and use INCLUDERC=rc.thistext with another set of recipes if 'thistext'
| was present in body - and so on.

 :0B # add E flag if this should be skipped if you read rc.abcxyz and returned
 * thistext
 { INCLUDERC=rc.thistext }

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