Re: "sub-routine" in procmailrc
Zhiliang Hu <[email protected]> Mon, 9 Oct 2017 11:28:23 -0500 (CDT)
| Newsgroups | gmane.mail.procmail |
|---|---|
| Message-ID | <[email protected]> |
On Mon, 9 Oct 2017, Ruud H.G. van Tol wrote: > Date: Mon, 9 Oct 2017 16:50:57 +0200 > From: Ruud H.G. van Tol <[email protected]> > To: [email protected] > Subject: Re: "sub-routine" in procmailrc > = > On 2017-10-09 16:43, Zhiliang Hu wrote: > >> This may be naive but I have not found how to - in procmailrc is it >> possible to have a sub-set of rules that can be re-used under certain >> conditions? I thought of using separate 'rc' files to "go to" from the >> main rc (/etc/procmailrc or ~/.procmailrc); not sure how to implement >> the scheme. E.g. Is "incldue" a right way?=3DA0 Will appreciated any >> suggestions. > > Re. usage of includes, see for example > https://rvtol.home.xs4all.nl/procmail/demo/basic/ > > -- Greetings, Ruud Thanks! But I guess conditional includes like these would work? :0 * CONDITION A INCLUDERC =3D "$INCDIR/recipesA" :0 * CONDITION B INCLUDERC =3D "$INCDIR/recipesB" :0 * CONDITION C { :0 c INCLUDERC =3D "$INCDIR/recipesC" :0 INCLUDERC =3D "$INCDIR/recipesA" } ? -- Zhiliang