On Fri, Mar 07, 2003 at 04:06:58PM -0800,
multimedia-fan(_at_)myrealbox(_dot_)com
wrote:
On Sat, 8 Mar 2003 00:17:34 +0100, Dallman Ross <dman(_at_)nomotek(_dot_)com>
wrote:
On Fri, Mar 07, 2003 at 03:00:48PM -0800,
multimedia-fan(_at_)myrealbox(_dot_)com wrote:
is there a command that tells procmail to stop processing further
recipes from within this recipe, after the conditions are met?
By "recipes from . . . this recipe," I assume a typo and your having
meant "recipes from . . . this rc-file."
Stop and deliver to $DEFAULT, or stop and abandon the mail?
For the former,
SWITCHRC
without any argument will do. See it in 'man procmailrc'.
For the latter,
HOST=byebye # or any bogus name, or no name at all
will do.
I put this recipe as the first one in my etc/procmailrc
## Start of white list
## Any mydomain.com email addresses are whitelisted.
:0:
* ^From: (_dot_)*(_at_)(_dot_)*(_dot_)mydomain(_dot_)*
SWITCHRC
No, because SWITCHRC is not a mailbox name to which you want to
deliver. Used as the action line of a recipe, SWITCHRC or HOST
variable reassignments or unassignments need to go in curly braces.
David Tamkin clarified a point about nondelivering recipes versus
delivering ones. These are technically nondelivering recipes,
although the assignments in question have special functions that
make procmail do something besides just resetting an assignment.
Basically, these values -- assignments to SWITCHRC, HOST, INCLUDERC,
and a few others -- combine special operations with the assignment.
In general, as David reminded us, an ordinary delivering recipe
is all we need to make procmail stop. Thus, you could use, instead
of SWITCHRC in curly braces,
:0:
* conditions
$DEFAULT
Oh, re. your condition, you don't need or want the .* at the right
end. And you will want to quote the dot before "mydomain":
* ^From:(_dot_)*(_at_)(_dot_)*\(_dot_)mydomain\(_dot_)com
--
dman
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail