Using iChat via MSN with your own Jabber server
This procedure is very long-winded (and could probably do with some automation). Look out for a revised version later.
Requirements:
- DNSUpdate (optional if you have a static IP address)
- A DynDNS.org account (or similar) for hosting your domain name
- Jabberd 1.4 Jabber server (I used 1.4.4)
- Expat XML Parser library (I used 1.95.8)
- GNU Libidn library (I used 0.5.16)
- GNU Pthreads library (I used 2.0.4)
- PyMSNt MSN gateway for Python (I used 0.9.3)
- PyCrypto (I used 2.0)
- PyOpenSSL (I used 0.6)
- Twisted 2.0 Sumo package (I used 2005-03-22)
- Psi (I used 0.9.3)
- Administrator access to your Mac
Procedure:
- Set up an account with DynDNS.org. Associate a hostname with the computer which will run your Jabber server.
- Install DNSUpdate. Run its application, letting it install its daemon. Enter the details for your account, and then your host and make sure it can communicate with the DynDNS server.
- Reboot the machine to allow DNSUpdate to start automatically. You may get a warning about DNSUpdate upon rebooting, if so click Fix and reboot again.
- Extract out Expat by double-clicking it in the Finder. Open a Terminal, type "
cd
" and drag the Expat folder into the window. Press Enter. - Install Expat by running "
./configure
" then "make
" and finally "sudo make install
" entering your password when asked. - Extract out Libidn by double-clicking it in the Finder. Switch to the Terminal, type "
cd
" again and drag the Libidn folder into the window. Press Enter. - Install Libidn by running "
./configure
" then "make
" and finally "sudo make install
" entering your password when asked. - Extract out pth (the Pthreads library) by double-clicking it in the Finder. Switch to the Terminal, type "cd " again, and drag the pth folder into the window. Press Enter.
- Install Pth by running "
./configure
" then "make
", "make test
" and finally "sudo make install
" entering your password when asked. - Extract out Jabberd by double-clicking it in the Finder. Switch to the Terminal, type "
cd
" again and drag the jabberd folder into the window. Press Enter. - Install Jabberd by running "
./configure
" then "make
" and finally "sudo make install
", entering your password when asked. - At this point, we have to configure the Jabber server. You will need to know your hostname that you got from DynDNS earlier. Follow the instructions in the Jabberd 1.4 Administration Guide and return here when done.
- You can now launch iChat and test it while your Jabber server is running. In the iChat Account Preferences (iChat > Preferences... or the Jabber page of the Assistant if it is the first time using iChat), put the user name you registered with your server during the test followed by @ followed by the hostname of the Jabber server. Enter the same password. Now try to connect. It will likely fail because iChat prefers secure communications. Go to Preferences... in iChat and click on Accounts, select your Jabber account and click on Server Settings. Untick the Connect using SSL box. Also if you are using the Mac OS X firewall, make sure port 5222 is open (the connection uses your external IP and so goes through the firewall for now). Now try logging in. Click iChat > Log In to Jabber. Your status should become Available. Note that you must be connected to the Internet for iChat to connect properly. Close iChat when it is working.
- Extract out pyCrypto by double-clicking it in the Finder. Switch to the Terminal, type "
cd
" again, and drag the pycrypto folder into the window. Press Enter. - Install pyCrypto by running "
python setup.py build
", then "sudo python setup.py install
", entering your password when asked. - Extract out pyOpenSSL by double-clicking it in the Finder. Switch to the Terminal, type "
cd
" again, and drag the pyopenssl folder into the window. Press Enter. - Install pyOpenSSL by running "
python setup.py build
", then "sudo python setup.py install
", entering your password when asked. - Extract out the Twisted Sumo package by double-clicking it in the Finder. Switch to the Terminal, type "
cd
" again, and drag the pycrypto folder into the window. Press Enter. - Install Twisted Sumo by the following commands. First install the provided Zope Interface. Type "
cd Zope-Interface
", press Tab and then press Enter. Install it by typing "python setup.py build
", "sudo python setup.py install
". Type "cd ..
" and press Enter to return to the Twisted Sumo folder. Install that by typing "python setup.py build
", "sudo python setup.py install
". Enter your password whenever asked. - Now extract and install PyMSNt by double-clicking it in the Finder. Switch to the Terminal and type "
sudo cp -r
" and drag the PyMSNt folder into the window, then press Enter, entering your password when asked. - Now follow the PyMSNt instructions, which involve editing your jabber.xml file again.
- We need to make a link between your Jabber account and your MSN Messenger account. To do this, with Jabber and PyMSNt running (use multiple Terminal windows), double-click the Psi disk image and double-click Psi in the window that appears. Log in as you did with iChat with your Jabber address and password. Right-click on your username and click on Available. Then right-click again, highlight Modify and click Service Discovery. In the window that appears, right-click on MSN and click Register. Now enter your MSN Messenger details. You will get a flood of authorisation requests for your existing MSN contacts. Ignore these now and close Psi.
- Open iChat again and log in to Jabber (it should do this automatically, otherwise choose iChat > Log In to Jabber). Accept all of the authorisation requests that appear. Close iChat.
- Now we need to get the server to start at startup, or at least while iChat is running. I chose the Startup Item approach to this, but be warned this method is obsolete in Tiger and I couldn't stop PyMSNt from running as root. You'll also need t o be familiar with editing permissions of files. I might leave this for another time, for now however you simply need to run both Jabber and PyMSNt before iChat to connect to MSN.
Happy chatting!
I have the Jabber server running and I can see the msn transport client, but I am unable to "register" with it.
ReplyDeleteProof that nothing ever dies: Will, I don't use this method any more, so I'm not sure what changes you may have to make by now, however here's my first thoughts:
ReplyDelete* MSN regularly modifies their systems (for example this was written before the changeover to Windows Live/MSN 8), so updates to some of the pieces were needed
* The registration part if a remember correctly is tricky and required a Jabber-specific client (ie, most generic Jabber-supporting clients, such as iChat, didn't support enough of it to handle the registration step), but after registration you should then be able to log in with anything.