Block messages by default?

Hi,

How can I configure ejabberd to block by default? My idea is block users that aren't in your list.

I get the mod_blocking, that works fine to block users, but I can receive messages from people without authorization @-@

Thanks a lot!

There isn't any specific

There isn't any specific feature in ejabberd that implements what you want.

Just thinking, I can only imagine a workaround.

First you can try if it helps to set some privacy list (as defined in the XMPP standard, and the most common Jabber clients implement it, like Psi, Gajim, Tkabber...).

If you are able to get what you want with a specific privacy list defined by a user, the next step would be to automatize this using the ejabberd command called "privacy_set" that is implemented in mod_admin_extra. The idea would be to run that command with some argument that you would find, whenever a new account is created.

Or it could be automatized writting a simple ejabberd module just to do that.

Hi, Thanks for your reply

Hi,

Thanks for your reply badlop.

I'm trying to create one specific privacy list to one user, in order to create this proof of concept.

Based on: http://xmpp.org/extensions/xep-0016.html

How can I send this messages to the server?

For example:

Thanks a lot!

Hi, When I send <iq

Hi,

When I send

<iq from='user@domain.com' type='get' id='getlist1'>
<query xmlns='jabber:iq:privacy'/>
</iq>

to the server, I received an

<iq id="getlist1" from="domain.com" type="error"><error code="503" type="CANCEL"><service-unavailable xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>

Just only try to follow the example 1 of http://xmpp.org/extensions/xep-0016.html

Any ideas?

Thanks!

That query works for me using

That query works for me using Tkabber. Looking at the source code, that error is not reported by mod_privacy itself, it may be by the c2s listener, or by the session manager.

Anyway, use a common Jabber client to manage privacy lists, and look how it does it (by looking in the client XML Console the queries it sends).

Thanks again badlop :) I'm

Thanks again badlop :)

I'm trying with Tkabber but I receive and error: "Server hasn't provided SASL authentication feature"

Based on https://www.ejabberd.im/node/4117
My ejabberd.cfg has the

{auth_method, internal}

That will be enough to support SASL PLAIN and SASL DIGEST-MD5.

Thanks!

Syndicate content