comparison mod_firewall/README.markdown @ 2559:99b32f77f00d

mod_firewall: Document PASS, RETURN and DEFAULT
author Matthew Wild <mwild1@gmail.com>
date Fri, 24 Feb 2017 09:48:16 +0000
parents 9b46d24edf0d
children 95b79d515a65
comparison
equal deleted inserted replaced
2558:2b533a7b5236 2559:99b32f77f00d
472 the first matching rule to do so will halt further processing of actions 472 the first matching rule to do so will halt further processing of actions
473 and rules (this may change in the future). 473 and rules (this may change in the future).
474 474
475 Action Description 475 Action Description
476 ----------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------- 476 ----------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------
477 `PASS.` Stop executing actions and rules on this stanza, and let it through this chain. 477 `PASS.` Stop executing actions and rules on this stanza, and let it through this chain and any calling chains.
478 `DROP.` Stop executing actions and rules on this stanza, and discard it. 478 `DROP.` Stop executing actions and rules on this stanza, and discard it.
479 `DEFAULT.` Stop executing actions and rules on this stanza, prevent any other scripts/modules from handling it, to trigger the appropriate default "unhandled stanza" behaviour. Do not use in custom chains (it is treated as PASS).
479 `REDIRECT=jid` Redirect the stanza to the given JID. 480 `REDIRECT=jid` Redirect the stanza to the given JID.
480 `REPLY=text` Reply to the stanza (assumed to be a message) with the given text. 481 `REPLY=text` Reply to the stanza (assumed to be a message) with the given text.
481 `BOUNCE.` Bounce the stanza with the default error (usually service-unavailable) 482 `BOUNCE.` Bounce the stanza with the default error (usually service-unavailable)
482 `BOUNCE=error` Bounce the stanza with the given error (MUST be a defined XMPP stanza error, see [RFC6120](http://xmpp.org/rfcs/rfc6120.html#stanzas-error-conditions). 483 `BOUNCE=error` Bounce the stanza with the given error (MUST be a defined XMPP stanza error, see [RFC6120](http://xmpp.org/rfcs/rfc6120.html#stanzas-error-conditions).
483 `BOUNCE=error (text)` As above, but include the supplied human-readable text with a description of the error 484 `BOUNCE=error (text)` As above, but include the supplied human-readable text with a description of the error
530 Chains 531 Chains
531 ------ 532 ------
532 533
533 Rules are grouped into "chains", which are injected at particular points in Prosody's routing code. 534 Rules are grouped into "chains", which are injected at particular points in Prosody's routing code.
534 535
535 Available chains are: 536 Available built-in chains are:
536 537
537 Chain Description 538 Chain Description
538 -------------- ------------------------------------------------------------------------------------------- 539 -------------- -------------------------------------------------------------------------------------------
539 deliver Applies to stanzas delivered to local recipients (regardless of the stanza's origin) 540 deliver Applies to stanzas delivered to local recipients (regardless of the stanza's origin)
540 deliver_remote Applies to stanzas delivered to remote recipients (just before they leave the local server) 541 deliver_remote Applies to stanzas delivered to remote recipients (just before they leave the local server)
571 DROP. 572 DROP.
572 573
573 Action Description 574 Action Description
574 ------------------------ ------------------------------------------------------------------------ 575 ------------------------ ------------------------------------------------------------------------
575 `JUMP CHAIN=name` Switches chains, and passes the stanza through the rules in chain 'name'. If the new chain causes the stanza to be dropped/redirected, the current chain halts further processing. 576 `JUMP CHAIN=name` Switches chains, and passes the stanza through the rules in chain 'name'. If the new chain causes the stanza to be dropped/redirected, the current chain halts further processing.
577 `RETURN.` Stops executing the current chain and returns to the parent chain. For built-in chains, equivalent to PASS. RETURN is implicit at the end of every chain.
576 578
577 It is possible to jump to chains defined by other scripts and modules. 579 It is possible to jump to chains defined by other scripts and modules.
578 580
579 Expressions 581 Expressions
580 ----------- 582 -----------