The initial message sent is recorded in the log file and viewable in the webmin but it doesn't appear that mod_logxml is capturing/logging when said message is actually delivered. The packet/message does arrive at the destination correctly though for auditing purposes I need to have both the 'send' and 'recv' captured. Is this actually a bug or possibly just a misconfiguration of the module? Beneath is the configuration being :
{mod_logxml, [ {logdir, "/var/log/ejabberd"}, {rotate, [{days, 1}, {megs, 100}, {kpackets, 10}]}, {check_rotate_kpackets, 1}, {orientation, [send, recv]}, {stanza, [iq, message, presence, other]}, {direction, [internal, vhosts, external]} ]} ]}.
Works ok for me
It works for me using ejabberd SVN. I guess it should work in any ejabberd version. I use your same config.
My server is 'localhost'. I create two accounts: 'a1' and 'a2'. I add them as contacts. Then a2 sends a message to a1 (yes, I know I should send from a1 to a2, but anyway...).
Both the send and the received are logged. I parsed the xml with xmlindent so it looks prettier:
<packet or="send" ljid="a2@localhost/Tka" ts="20071223T00:52:41">
<message to='a1@localhost/Tka' id='1' type='chat' xml:lang='es'>
<active xmlns='http://jabber.org/protocol/chatstates'/>
<x xmlns='jabber:x:event'>
<offline/><delivered/>
<displayed/>
<composing/>
</x>
<body>hey, hola</body>
</message>
</packet>
<packet or="recv" ljid="a1@localhost/Tka" ts="20071223T00:52:41">
<message from='a2@localhost/Tka' to='a1@localhost/Tka' id='1' type='chat' xml:lang='es'>
<active xmlns='http://jabber.org/protocol/chatstates'/>
<x xmlns='jabber:x:event'>
<offline/><delivered/>
<displayed/>
<composing/>
</x>
<body>hey, hola</body>
</message>
</packet>
Module Compatibility.
I've just confirmed that at least on the version that we have installed it's not working properly. Because this is a production service I can't switch over ejabberd to the SVN variant however does anyone know if mod_offline.erl from the dailys would be compatible with the last STABLE release? Based on a quick diff it looks like there's been significant changes to the module which might account for the bug fix.
Two options: debug mod_offline or wait for 2.0.0
I've just confirmed that at least on the version that we have installed it's not working properly.
If you say exactly which version of ejabberd, erlang and how did you install it (source package, binary installer, Debian package...) I can try to replicate the problem. The purpose is to confirm that the problem is due to an old ejabberd version. Maybe we find how exactly to improve the old mod_offline.erl to work correctly.
Because this is a production service I can't switch over ejabberd to the SVN variant however does anyone know if mod_offline.erl from the dailys would be compatible with the last STABLE release? Based on a quick diff it looks like there's been significant changes to the module which might account for the bug fix.
I guess you use some ejabberd 1.1.x version. The changes since 1.1.x was released are numerous, so it's risky to say whether or not you can simply copy a file from SVN.
Anyway, it is expected 2.0.0 will be released in the following weeks if no critical bugs appear.
Re: Two options: debug mod_offline or wait for 2.0.0
If you say exactly which version of ejabberd, erlang and how did you install it (source package, binary installer, Debian package...) I can try to replicate the problem. The purpose is to confirm that the problem is due to an old ejabberd version. Maybe we find how exactly to improve the old mod_offline.erl to work correctly.
Woops I apologize in that I should have originally posted more info on the setup rather then just shaking my fist at the sky. Current setup of eJabberd is :
eJabberd-1.1.4 (source)
erlang-r10 (source)
Host System : Linux - Centos 4.4
Almost all of the modules are from the original tarball except mod_logxml which was downloaded off the site. The timestamp on mod_offline.erl is from May23/2006.
I guess you use some ejabberd 1.1.x version. The changes since 1.1.x was released are numerous, so it's risky to say whether or not you can simply copy a file from SVN.
Anyway, it is expected 2.0.0 will be released in the following weeks if no critical bugs appear.
2.0 would need to be heavily evaluated on our end prior to deployment as we use numerous custom applications/scripts that are essential to the service. I'm obviously hoping for the former solution rather then waiting for the 2.0 release.
I can't reproduce your problem with ejabberd 1.1.4
Current setup of eJabberd is :
eJabberd-1.1.4 (source)
erlang-r10 (source)
Host System : Linux - Centos 4.4
Almost all of the modules are from the original tarball except mod_logxml which was downloaded off the site. The timestamp on mod_offline.erl is from May23/2006.
I now downloaded ejabberd 1.1.4 source package, compiled and installed. Then downloaded mod_logxml from ejabberd-modules SVN, compiled and installed. I use Erlang/OTP R11B-5 package from Debian unstable. Then I created two accounts in the server, added between them as contacts. When one of them sends a message to the other, both events are logged in the XML file, the send and recv.
So I cannot reproduce your problem. Note that in themod_logxml page , the date of the comments indicate they used ejabberd 1.1.x too, and that people doesn't complain about your problem. So I think the problem is in your system.
More or less the process was:
and ejabberd.cfg: