I have an ejabberd 1.1.1 running on Gentoo, and a few users on it. The users are using the jit transport I have installed to communicate to a large list of ICQ numbers.
Everything works perfectly fine, with one unfortunate 'but':
When initially pulling in a large contact list from the ICQ server, JIT creates the UIN@my.server JIDs with subscription status of 'from none', which doesn't allow the user to see their online status. However, when the user tries to resend authorisation or re-request it, JIT invariably sends an authorisation request message to the ICQ user on the other end. While my users move the contacts around and retry authorisations due to slight wonkiness of JIT, the ICQ users get their authorisation requests multiple times. With an extra-large contactlist, it is extremely bothersome to sort through. And that's not counting the problem of the ICQ contact list on the server being nothing like the contact list in the client. (Alternative ICQ clients are popular here, and they aren't always updating the server-based contactlist properly as they should.) Obviously, the users on the other end have my Jabber users authorised already, so there's no point in going through all that at all.
I could not find a way to alter subscription status manually through the web administration interface. Is there a sane way to do it from commandline?
Is there, possibly, some editing tool for mnesia database? I could, in theory, convert to a MySQL database, which would allow me to do what I want as I see fit, but from what I can see in the discussions here, this is an extremely arcane process which is liable to fail.
Update: After some messing about, here are the two methods I've had suggested to me, and here's how to use them in case anyone else has a similar problem:
1. Editing a text dump.
Using ejabberdctl, dump the database into a text file:
ejabberdctl <node> dump <full path name>
It does not seem to work properly with non-full pathnames, probably because on Gentoo, jabber user has it's home directory set to /dev/null by default. The easiest way to find out your node name is to look it up in the web interface - the obvious 'ejabberd@localhost', in my case, was not it.
The resulting file follows erlang syntax. Find the table definition statement in the dump file - it's the first statement there is ({table ...}.) and takes about a full page. Remove everything else except the roster records you actually plan to modify. Alter the offending records to fit, then load the edited records from the dump:
ejabberdctl <node> load <full path name>
That will overwrite these records and leave everything else intact, and does not require stopping the server. I could not accomplish the same dump/load cycle with the web interface, and command line is better in this case, anyway, since it reports syntax errors directly - web interface doesn't.
2. Erlang is equipped with a 'Table Viewer' program which is supposedly akin to commandline mysql most people are more or less familiar with. To get at it, run ejabberd this way:
ejabberd -s tv
This seems to require the server to be stopped and might need running from under su jabber to keep permissions properly. It might be a better way if you just need to modify one or two records in a very big database, though.