Install Jabber Mail Component (JMC)

Jabber Mail Component (JMC) is a Jabber component to check email accounts (POP3 and IMAP4). New emails can be retrieved or a notification can be sent. Read the Jabber Mail Component User's Guide if you are a Jabber user who wants to use a Jabber Mail Component.

  1. Install Python

    Make sure have installed Python 2.4 or newer (if you do not need support for POP3 over SSL, then you also can use 2.3). Most distributions should handle this automatically for you.

    • Debian:
      apt-get install python2.4
    • FreeBSD using Portinstall:
      portinstall python-2.4
    • Mandrake:
      urpmi python
    • Other: Use your distribution's installation method, or download Python yourself. If you use Microsoft Windows, add the directory which contains python.exe to your PATH (look in Windows help for details on doing this).
  2. Install PyXMPP

    Install the Python Jabber/XMPP implementation named PyXMPP and its dependencies. Version pyxmpp-0.5.s20050506 (snapshot) or newer should be fine.

    • Debian:
      apt-get install python2.4-dev python2.4-libxml2 libxml2-dev
      Install M2Crypto, dnspython and PyXMPP from source. Check the PyXMPP website for download locations.
    • Other: Use your distribution's installation method, or download (and compile when necessary) PyXMPP, libxml2 with python bindings and all developement files, dnspython and M2Crypto.
    • FreeBSD: It has the same instructions as "Other", but you need to patch PyXMPP before compilation. Go to the PyXMPP source directory and execute:
      patch </usr/ports/net/py-pyxmpp/files/patch-setup.py
  3. Install Jabber Mail Component

    Download Jabber Mail Component and uncompress it.

  4. Configure Jabber Mail Component

    Edit jmc.xml to reflect your environment:

    • The 'service' setting should be what ID you want Jabber Mail Component to take on the network. Example: 'jmc.host.com'.
    • The 'server' setting should be the IP address or DNS of the main Jabber server. Default: '127.0.0.1'.
    • The 'secret' setting should match the secret specified for component connections in your main Jabber server. It is a password that only the Jabber server and the transport must know.
    • The 'port' setting is the port that Jabber Mail Component and the Jabber server agree to use to connect between them (more details on this below). Default: '5347'.
    • The 'FN' setting should be what name you wish users to see in a service discovery request. You also can specify other vCard contents.
    • Additionally, there are a few other options you can configure.
  5. Spool Directory

    Jabber Mail Component stores login information (username, password, IMAP folder, etc.) in the spool directory. This directory must be writeable by whatever system user will be running Jabber Mail Component. The directory will be automatically created if not yet existing.

  6. Configure Jabber/XMPP Server

    Now you have to configure your Jabber server. This instructions assume you are running Jabber Mail Component on the same machine as your main Jabber server.

    • ejabberd

      To configure ejabberd for Jabber Mail Component, as explained in the Ejabberd Installation and Operation Guide:

      1. Edit ejabberd.cfg.
      2. In the section that says: '{listen,' add those two lines:

            {5347, ejabberd_service, [{host, "jmc.host.com",
                                       [{password, "secret"}]}]},
      3. Restart ejabberd and you are done.
    • jabberd 1.4

      If you are using jabberd 1.4 then you need to add this to your jabber.xml file:

      <service id="jmc.host.com">
                <host>jmc.host.com</host>
                <accept>
      
                        <ip>127.0.0.1</ip>
                        <port>5347</port>
                        <secret>secret</secret>
                </accept>
      
        </service>

      Check that jmc.host.com is the same as the 'service' setting from jmc.xml and that 5347 is the same as the 'port' setting. Also 'secret' must correspond, and the 'server' setting should be pointing to the same interface as the <ip/> tag is (in this example the loopback interface is used. So 'server' would be '127.0.0.1').

      You must also add this to the browse section of your jabber.xml file

      <service type="jmc" jid="jmc.host.com" name="Jabber Mail Component">
      
         <ns>jabber:iq:register</ns>
         <ns>jabber:iq:gateway</ns>
       </service>

      Once again, jmc.host.com must correspond to the 'service' setting in jmc.xml.

      Once you have made all these changes, restart your jabberd 1.4 server, then start Jabber Mail Component and it should all work.

    • jabberd2

      If you are using jabberd2 then you should not have to do much configuration. Make sure the 'server' setting is the IP or DNS of your Jabber server, and leave the 'port' setting alone. Double-check that the secret for legacy components in router.xml (for jabberd2) is the same as the secret setting in config.py. That should be all. You do not even need to restart jabberd2.

  7. Start Jabber Mail Component

    Now you are ready to start Jabber Mail Component for the first time:

    python jmc.py -c jmc.xml (-D to get debug)

    It will connect to the Jabber server and serve the Discovery JID you specified.

    On Microsoft Windows you can run it by opening a DOS console in the jmc directory and running "python jmc.py -c jmc.xml (-D to get debug)".

Troubleshooting

  • On Microsoft Windows, if you cannot run Jabber Mail Component, make sure you have Python installed correctly (as well as all of PyXMPP and its dependencies), and that python.exe is in your PATH (see above).
  • Check the User's Guide to Jabber Mail Component for more details on using this component.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

error jmc on ejabberd 2.0.0

Hello!

One of my user has got an error in his service discovery list for JMC. He registered an account with an @ symbol in his connection name. The result was an error like "JID malformed". Now he has got an entry in service discovery list with an red X. No roster entry was added and so he isn't able to disconnect/disable/delete that account.
How can I delete that entry and how I can avoid such problems in future by banning that symbol in connection name?

...Stephan

How i can run JMC as daemon?

Hi,
How i can run the JMC as daemon or in background mode?

FreeBSD 6.1
ejabberd 1.1.2
jmc 2.3

Try using & at the end of the

--

To run it in a kind of

To run it in a kind of background mode try this :

python jmc.py -c jmc.xml &

Syndicate content