Skip to content

Instantly share code, notes, and snippets.

@ValdikSS
Created May 20, 2018 19:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ValdikSS/619a01e242d08c56410c398929ea71e9 to your computer and use it in GitHub Desktop.
Save ValdikSS/619a01e242d08c56410c398929ea71e9 to your computer and use it in GitHub Desktop.
# cat /etc/prosody/firewall.pfw
::deliver
TO SELF?
PASS.
SUBSCRIBED?
PASS.
# Type 'groupchat' messages addressed to an offline full JID are harmless,
# and should be routed normally to handle MUC 'ghosts' correctly
KIND: message
TO: <*>@<*>/<*>
TYPE: groupchat
PASS.
# These may be received if rosters get out of sync and are harmless
# because they will not be routed to the client unless necessary
KIND: presence
TYPE: unsubscribe|unsubscribed
PASS.
TO_EXACTLY: iam@valdikss.org.ru
KIND: presence
TYPE: subscribe
NOT IN ROSTER?
LOG=[warn] Blocked SUBSCRIBE: $(stanza)
BOUNCE=policy-violation (Write your message right away, without subscription request)
TO: iam@valdikss.org.ru
FROM: <*>@valdikss.org.ru
PASS.
TO: iam@valdikss.org.ru
FROM: <*>@<*.valdikss.org.ru>
PASS.
TO_EXACTLY: iam@valdikss.org.ru
NOT TYPE: groupchat
NOT IN ROSTER?
JUMP_CHAIN=user/spam_filtering
PASS.
::user/spam_filtering
INSPECT: body
INSPECT: body#~=dobrota@default%.rs
LOG=[warn] Blocked SPAM: $(stanza)
BOUNCE=policy-violation (SPAM filter: this word is not allowed!)
INSPECT: body
INSPECT: body#~=allservice@dukgo%.com
LOG=[warn] Blocked SPAM: $(stanza)
BOUNCE=policy-violation (SPAM filter: this word is not allowed!)
INSPECT: body
INSPECT: body#~=dvertising
LOG=[warn] Blocked SPAM: $(stanza)
BOUNCE=policy-violation (SPAM filter: this word is not allowed!)
INSPECT: body
INSPECT: body#~=eklama
LOG=[warn] Blocked SPAM: $(stanza)
BOUNCE=policy-violation (SPAM filter: this word is not allowed!)
INSPECT: body
INSPECT: body#~=наркотики
LOG=[warn] Blocked SPAM: $(stanza)
BOUNCE=policy-violation (SPAM filter: this word is not allowed!)
INSPECT: body
INSPECT: body#~=редиректы
LOG=[warn] Blocked SPAM: $(stanza)
BOUNCE=policy-violation (SPAM filter: this word is not allowed!)
INSPECT: body
INSPECT: body#~=Advert
LOG=[warn] Blocked SPAM: $(stanza)
BOUNCE=policy-violation (SPAM filter: this word is not allowed!)
INSPECT: body
INSPECT: body#~=драг
LOG=[warn] Blocked SPAM: $(stanza)
BOUNCE=policy-violation (SPAM filter: this word is not allowed!)
INSPECT: body
INSPECT: body#~=маркет
LOG=[warn] Blocked SPAM: $(stanza)
BOUNCE=policy-violation (SPAM filter: this word is not allowed!)
INSPECT: body
INSPECT: body#~=Р е к л а м а
LOG=[warn] Blocked SPAM: $(stanza)
BOUNCE=policy-violation (SPAM filter: this word is not allowed!)
INSPECT: body
INSPECT: body#~=Героин
LOG=[warn] Blocked SPAM: $(stanza)
BOUNCE=policy-violation (SPAM filter: this word is not allowed!)
INSPECT: body
INSPECT: body#~=http
LOG=[warn] Blocked SPAM: $(stanza)
BOUNCE=policy-violation (SPAM filter: this word is not allowed!)
INSPECT: body
INSPECT: body#~=onion
LOG=[warn] Blocked SPAM: $(stanza)
BOUNCE=policy-violation (SPAM filter: this word is not allowed!)
INSPECT: body
INSPECT: body#~=refund
LOG=[warn] Blocked SPAM: $(stanza)
BOUNCE=policy-violation (SPAM filter: this word is not allowed!)
INSPECT: body
INSPECT: body#~=DDoS
LOG=[warn] Blocked SPAM: $(stanza)
BOUNCE=policy-violation (SPAM filter: this word is not allowed!)
INSPECT: body
INSPECT: body#~=card
LOG=[warn] Blocked SPAM: $(stanza)
BOUNCE=policy-violation (SPAM filter: this word is not allowed!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment