comparison mod_firewall/README.markdown @ 2576:95b79d515a65

mod_firewall: README: Document TO/FROM ADMIN, FORWARD, TO SELF and TO FULL JID
author Matthew Wild <mwild1@gmail.com>
date Sat, 25 Feb 2017 15:48:20 +0000
parents 99b32f77f00d
children 1e1c929c1aa5
comparison
equal deleted inserted replaced
2575:214b49d05ea1 2576:95b79d515a65
194 Similarly, a message stanza with no type is equivalent to one of type 194 Similarly, a message stanza with no type is equivalent to one of type
195 'normal'. mod\_firewall handles these cases for you automatically. 195 'normal'. mod\_firewall handles these cases for you automatically.
196 196
197 ### Sender/recipient matching 197 ### Sender/recipient matching
198 198
199 Condition Matches 199 Condition Matches
200 ----------- ------------------------------------------------------- 200 ------------- -------------------------------------------------------
201 `FROM` The JID in the 'from' attribute matches the given JID 201 `FROM` The JID in the 'from' attribute matches the given JID.
202 `TO` The JID in the 'to' attribute matches the given JID 202 `TO` The JID in the 'to' attribute matches the given JID.
203 203 `TO SELF` The stanza is sent by any of a user's resources to their own bare JID.
204 These conditions both accept wildcards in the JID when the wildcard 204 `TO FULL JID` The stanza is addressed to a valid full JID on the local server (full JIDs include a resource at the end, and only exist for the lifetime of a single session, therefore the recipient must be online, or this check will not match).
205
206 The TO and FROM conditions both accept wildcards in the JID when the wildcard
205 expression is enclosed in angle brackets ('\<...\>'). For example: 207 expression is enclosed in angle brackets ('\<...\>'). For example:
206 208
207 # All users at example.com 209 # All users at example.com
208 FROM: <*>@example.com 210 FROM: <*>@example.com
209 211
334 336
335 ### Admins 337 ### Admins
336 338
337 Prosody allows certain JIDs to be declared as administrators of a host, component or the whole server. 339 Prosody allows certain JIDs to be declared as administrators of a host, component or the whole server.
338 340
339 Condition Matches 341 Condition Matches
340 -------------- ---------------------------------- 342 ---------------- -------------------------------------------------------------------------------------
341 FROM ADMIN OF When the sender of the stanza is an admin of the named host on the current server 343 `TO ADMIN` When the recipient of the stanza is admin of the current host
342 TO ADMIN OF When the recipient of the stanza is an admin of the named host on the current server 344 `FROM ADMIN` When the sender of the stanza is admin of the current host
345 `FROM ADMIN OF` When the sender of the stanza is an admin of the named host on the current server
346 `TO ADMIN OF` When the recipient of the stanza is an admin of the named host on the current server
343 347
344 ### Time and date 348 ### Time and date
345 349
346 #### TIME 350 #### TIME
347 351
481 `REPLY=text` Reply to the stanza (assumed to be a message) with the given text. 485 `REPLY=text` Reply to the stanza (assumed to be a message) with the given text.
482 `BOUNCE.` Bounce the stanza with the default error (usually service-unavailable) 486 `BOUNCE.` Bounce the stanza with the default error (usually service-unavailable)
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). 487 `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).
484 `BOUNCE=error (text)` As above, but include the supplied human-readable text with a description of the error 488 `BOUNCE=error (text)` As above, but include the supplied human-readable text with a description of the error
485 `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. 489 `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.
490 `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.
486 491
487 **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). 492 **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).
488 493
489 ### Stanza modification 494 ### Stanza modification
490 495