Install PyMSNt - MSN transport

Very important: the content in this tutorial was merged in the official PyMSNt documentation and has not been updated since then. Hence, this tutorial may be outdated and is kept only for historical reasons. Please use the official PyMSNt documentation.

  1. Install Python

    Make sure have installed Python 2.3 or newer (I have reports that some older versions work). Most distributions should handle this automatically for you.

    • Debian:
      apt-get install python2.3
    • Mandrake:
      urpmi python
    • MS Windows: Download and run the binary installer from When complete, add the directory that python.exe is in to your PATH (look in Windows help for details on doing this)
    • Others: Use your distribution's installation method, or download and compile the source from
  2. Install Twisted

    Install Twisted:

    • Debian:
      apt-get install python-twisted python-crypto python-pyopenssl
    • MS Windows: Download and run the binary installers for Twisted, PyCrypto and PyOpenSSL from
    • Others: Use your distribution's installation method, or download (and compile when necessary) Twisted, PyCrypto and PyOpenSSL from
  3. Install PyMSNt

    Download and uncompress PyMSNt from PyMSNt Downloads page.

  4. Configure PyMSNt

    Copy the file config-example.xml to config.xml and edit it to reflect your environment:

    • The 'jid' setting should be what ID you want PyMSNt to take on the network. Example: ''. Remark: watch out with this option! This is a FAQ. You need the full domain to the transport. The string "msn" is not enough.
    • The 'mainServer' setting should be the IP address or DNS of the main Jabber server. Default: ''.
    • The 'secret' setting should match the secret specified for component connections in your main Jabber server. It's a password that only the Jabber server and the transport must know.
    • The 'port' setting is the port that PyMSNt and the Jabber server agree to use to connect between them (more details on this below). Default: '5347'.
    • The 'name' setting should be what name you wish users to see in a service discovery request.
    • You can also turn on debugging options, and customise some of the text that is sent to the users in this file.
  5. Spool directory

    PyMSNt stores login information (MS Passport account, password and nick) in the spool directory. This directory must match some conditions, it must:

    • be located in the same place as the README and TODO files.
    • be writeable by whatever system user will be running PyMSNt.
    • have the same name as the 'jid' value you specified above in (for example: '').

    You must create the directory:

    • If you are starting a new installation, just create the directory.
    • If you are upgrading from the old C version of MSN-t then copy your existing spool directory. Do not forget to rename it to the 'jid' value you specified on
  6. Configure Jabber/XMPP server

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

    • ejabberd

      To configure ejabberd for PyMSNt, 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, "",
                                       [{password, "secret"}]}]},
      3. Restart ejabberd and you are done.
    • jabberd 1.4.x

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

      <service id="">

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

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

      <service type="msn" jid="" name="MSN Transport">

      Once again, must correspond to the 'jid' setting in

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

    • jabberd2

      If you are using Jabberd2 then you should not have to do much configuration. Make sure the 'mainServer' 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 That should be all. You don't even need to restart jabberd2.

      If you are upgrading from the old C version of MSN-t then you need to remove the alias info in your router.xml and the item discovery info in your sm.xml for the old msn transport. These were needed because for the old MSN-transport, but jabberd2 can automatically add the new PyMSNt to the browse lists.

  7. Start PyMSNt

    Now you are ready to start PyMSNt for the first time:

    ./PyMSNt &

    It will connect to the Jabber server and serve the Discovery JID you specified. Note: PyMSNt does not implement the old and deprecated 'Browse' capacity, only the newer 'Discovery'.

    On MS Windows you can run it by opening a DOS console in the PyMSNt/src directory and running "python".


  • On MS Windows, if you can't run PyMSNt, make sure you have Python installed correctly (as well as all of Twisted and PyCrypto/PyOpenSSL), and that python.exe is in your PATH (see above).
  • See the User's Guide to PyMSNt for more details on using the transport.
  • If you are upgrading from the CMSN-t and your Jabber server has been running prior to about November 2003 then some of your users contact lists may have in them. These users should delete the transport from their list, and reregister it. There is no need to delete the transport users (so they will not have to reauthorise any contacts).

Comment viewing options

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


After spending some time downloading sources and installing PyMSNt I checked the debian and ubuntu sources and found that it is listed.

"sudo apt-get install pymsnt" should work on debian and does in ubuntu.

If in doubt run

"sudo apt-cache search pymsnt"

You'll still need to update the configuration files but its certainly a little easier :)

How possibly to utillize

How possibly to utillize this transport for connecting to local MS Exchange to the server?

This is a question about the

This is a question about the transport, so to get a proper answer you will probably need to ask in the PyMSNt page. You can also try in the JADMIN mailing list of or in the JDEV chatroom.

As Jabberstudio is not 100% t

As Jabberstudio is not 100% trustfully at the moment to download from, you can get the latest version of PyMSNt at James' own webspace.

Syndicate content