procmail
[Top] [All Lists]

Re: exit current script before end of aka goto|return|exit|jump

2005-02-04 06:49:46
On Fri, 04 Feb 2005, 13:53 GMT+01 Ruud H.G. van Tol wrote:

Toen wij Robert Allerstorfer kietelden, kwam er dit uit:
J Britain:

Is there some way to exit the main /etc/procmailrc script early
(bypass further processing in that script) and continue in the
individual account RC scripts?

what about setting something like

DROPPRIVS = 'yes'
INCLUDERC = "$HOME/.procmailrc"

in '/etc/procmailrc', just before delivering to $DEFAULT?

Transferring control to the user's .procmailrc is already the 
'natural' way, so using INCLUDERC to mimic that seems strange.

If the user's .procmailrc does not exist or is not properly 
accessible, delivery to $DEFAULT is already taken care of 
(AFAIK).

With the INCLUDERC, if delivery to $DEFAULT fails, there could 
be 2 passes of ~/.procmailrc (although there are ways to prevent 
that, but that means more hoops).

So why not lay out /etc/procmailrc in a way that makes it 
ignore further recipes? Or use SWITCHRC?

Unsetting SWITCHRC within '/etc/procmailrc' seems to be the same as my
suggestion. However, SWITCHRC requires a procmail version of at least
3.14, while INCLUDERC should also work with very ancient versions,
too. And, there is the possibilty to include another user file instead
of the default one, so that way seems more flexible. When the
specified file does not exist or is not accessible, procmail just
continues. The verbose log then only says
procmail: Couldn't read "/home/username/myincludedfile"

rob.


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail