Is content filtering performed in a C2S or S2S context or both?

Dear experts,

Scenario: server-to-server federation.

Is it possible to prevent incoming messages or outgoing messages using content filtering? There is as I understand it some support for keyword filtering. I am unsure if the filer works in the context of c2s and/or s2s.

I presume content filtering applied to outgoing IM messages could be prevented on a C2S basis, right?

I presume that to prevent incoming messages from the other XMPP server domain that contain certain keywords, one would need to do this via the S2S setup.

Comments?

Is this kind of content filtering granularity supported by ejabberd?

regards,
paddy.

paddyjoesoap wrote: Is it

paddyjoesoap wrote:

Is it possible to prevent incoming messages or outgoing messages using content filtering? There is as I understand it some support for keyword filtering. I am unsure if the filer works in the context of c2s and/or s2s.

You can write a module that adds a hook to ejabberd filter_packet. That module would receive a function call for every stanza routed by ejabberd_router. Your function parses the stanza as he pleases, and returns either the same stanza, a modified stanza, or 'drop'.

Example modules that use filter_packet:
http://www.ejabberd.im/mod_filter
http://www.dtek.chalmers.se/~henoch/mod_shit.erl

Syndicate content