Yes, you can write a component that will log all messages (and more). It has been discussed on this list before, for more details search the archive.

Here's some information taken from one of this thread.

Philippe Raxhon wrote:

I now remember another solution. In the jsm section of jabber.xml, one can add:
<archive>
<service>myservice.myhost</service>
<archive>

given you have defined such a service in the service section of jabber.xml, for instance:
<service id ="myservice">
<host>myservice.myhost>
<accept>
<ip>localhost</ip>
<port>5999</port>
<secret>secret</secret>
</accept>
</service>

The accept component (it can be writen in any language and doesn't have to run on the same host) will receive a copy of every message sent by the users. The interesting part is that I think it's easy to hack the mod_log module to "archive" not only the messages, but also the presence or iq.

Please, correct me if I'm wrong.

Jean-Louis Seguineau /EXC/TEC wrote:

Hey,

That's easy ! And it has nothing to do with whatever language you use. It
does it requires to write a JSM module as long as your component is only
meant to process the received packets and not interfere with the JSM
processing. This can be applied to build a kind of packet "sniffer" and
allow you to count, record, monitor, etc...

You just need to declare a service in your jabber.xml so to receive a copy
of all packets going through the server.

<service id="sniffer.myserver">
<host>myserver</host>
<host>myjpolld.myserver</host>
<host>sniffer.myserver</host>
....
plus any aother internal JID that you want to monitor


<accept>
<ip/>
<port>myport</port>
<secret>secret</secret>
</accept>
</service>

Then the sniffer component will receive a copy of all traffic for the
<host>s. The component can sit on another server as any component can.

There is no way that I jnow of to separate the packets types before they are
sent to the component. But you can either make one component per packet type
and filter the input, or make a filter component that in turn direct the
right packet type to a specific processor component.

Hope it helps

Jean-Louis
BTW: in which langage do you want to implement the component part?

Cheers

Philippe

Jonas Zaveckas wrote:

Hello,
I would like to make some facility to log all message traffic comming through jabberd server. How can I do this? Can I make some server component to do this?

Thanks,
Jonas Zaveckas

_______________________________________________
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev



_______________________________________________
jdev mailing list
[EMAIL PROTECTED]
http://mailman.jabber.org/listinfo/jdev

Reply via email to