Mercurial > prosody-modules
comparison mod_firewall/README.markdown @ 5234:f6c71d9d6dc0
mod_firewall: README: Clarify docs about some of the stanza processing actions
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 11 Mar 2023 18:29:38 +0000 |
parents | 84997bc3f92e |
children | d0d251abf595 |
comparison
equal
deleted
inserted
replaced
5233:7eec2bc67c26 | 5234:f6c71d9d6dc0 |
---|---|
603 # An action with a parameter: | 603 # An action with a parameter: |
604 REPLY=Hello, this is a reply. | 604 REPLY=Hello, this is a reply. |
605 | 605 |
606 ### Route modification | 606 ### Route modification |
607 | 607 |
608 The most common actions modify the stanza's route in some way. Currently | 608 The following common actions modify the stanza's route in some way. These |
609 the first matching rule to do so will halt further processing of actions | 609 rules will halt further processing of the stanza - no further actions will be |
610 and rules (this may change in the future). | 610 executed, and no further rules will be checked. |
611 | 611 |
612 Action Description | 612 Action Description |
613 ----------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------- | 613 ----------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------- |
614 `PASS.` Stop executing actions and rules on this stanza, and let it through this chain and any calling chains. | 614 `PASS.` Stop executing actions and rules on this stanza, and let it through this chain and any calling chains. |
615 `DROP.` Stop executing actions and rules on this stanza, and discard it. | 615 `DROP.` Stop executing actions and rules on this stanza, and discard it. |
616 `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). | 616 `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). |
617 `REDIRECT=jid` Redirect the stanza to the given JID. | 617 `REDIRECT=jid` Redirect the stanza to the given JID. |
618 `REPLY=text` Reply to the stanza (assumed to be a message) with the given text. | |
619 `BOUNCE.` Bounce the stanza with the default error (usually service-unavailable) | 618 `BOUNCE.` Bounce the stanza with the default error (usually service-unavailable) |
620 `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). | 619 `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). |
621 `BOUNCE=error (text)` As above, but include the supplied human-readable text with a description of the error | 620 `BOUNCE=error (text)` As above, but include the supplied human-readable text with a description of the error |
621 | |
622 **Note:** It is incorrect behaviour to reply to an 'error' stanza with another error, so BOUNCE will simply act the same as 'DROP' for stanzas that should not be bounced (error stanzas and iq results). | |
623 | |
624 ### Replying and forwarding | |
625 | |
626 These actions cause a new stanza to be generated and sent somewhere. | |
627 Processing of the original stanza will continue beyond these actions. | |
628 | |
629 Action Description | |
630 ----------------------- --------------------------------------------------------------------------------------------------------------------------------------------------------- | |
631 `REPLY=text` Reply to the stanza (assumed to be a message) with the given text. | |
622 `COPY=jid` Make a copy of the stanza and send the copy to the specified JID. The copied stanza flows through Prosody's routing code, and as such is affected by firewall rules. Be careful to avoid loops. | 632 `COPY=jid` Make a copy of the stanza and send the copy to the specified JID. The copied stanza flows through Prosody's routing code, and as such is affected by firewall rules. Be careful to avoid loops. |
623 `FORWARD=jid` Forward a copy of the stanza to the given JID (using XEP-0297). The stanza will be sent from the current host's JID. | 633 `FORWARD=jid` Forward a copy of the stanza to the given JID (using XEP-0297). The stanza will be sent from the current host's JID. |
624 | |
625 **Note:** It is incorrect behaviour to reply to an 'error' stanza with another error, so BOUNCE will simply act the same as 'DROP' for stanzas that should not be bounced (error stanzas and iq results). | |
626 | 634 |
627 ### Stanza modification | 635 ### Stanza modification |
628 | 636 |
629 These actions make it possible to modify the content and structure of a | 637 These actions make it possible to modify the content and structure of a |
630 stanza. | 638 stanza. |