GSoC 2018 with Debian - Week 3 Progress

Work on XMPP, Salsa and Mailing lists

XMPP Registration

I tried to accomplish the task of registering a new account for a user on the XMPP server using script. The most popular library available in python for XMPP manipulation is ‘sleekxmpp’ framework.

But I discovered that it didn’t have the functionality to create a new account for a user as mentioned here. The sleekxmpp documentation has information regarding the creation of a bot, signing in on the server and sending messages.

Jabber

For registering a Jabber Account for the user, forms can be filled on the server websites. They provide a simple and ready-to-go method for getting started with XMPP. The most widespread servers are Jabber Hot chilli and xmpp.jp. I tried to automate them through Selenium, but they all have a captcha in the end which can’t be bypassed by scripting.

The most common method for recognizing and automating captcha is ‘Tesseract’ and ‘OCR’ libraries. I researched them for a quick solution but they are not reliable. So it was decided that the webpage would be displayed inside the GUI itself and the user would fill out the form by itself.

On searching, I found ‘ejabberd’ server which uses Erlang programming language. It provides a complex way of registering users through its server. I tried to download both their source codes and run it, changed their config files but couldn’t set its environment. I also tried using xmlrpc library[5], which is XML-RPC client. We can call methods on a remote server by using it.

Hence, I used “webview” library in Python which can open webpages inside the GUI itself just by writing a few lines of code!

Mail Filtering

Initially, my main aim was to filter incoming mails on Thunderbird explicitly.

Procmail is a email filter agent which can sort incoming mail into various directories and filter out spam messages. Procmail is highly useful for checking virus and filtering spam. It mostly works on regular expression and can be modified by the user.

I read about Procmail and its utilities to customise mail filtering on a server/client. I found that Procmail could only filter email on a server like Mutt (text base command-line like email sever) or Fetchmail (open-source software to retreive email).

It was not possible to apply it to thunderbird directly. The procmail utility filters e-mail as it’s received (generally on a UNIX-like server), rather than when you retrieve it with your email client like Thunderbird. If I choose to create a separate server and then use Procmail, Dovecot and SpamAssassin, the task would become lengthy and unhelpful for a user.

Salsa Account

One of the other modules named “Start Here” required the user to create a new Github and Salsa accounts. So, I created a script using Selenium which will automate the process of new account creation on Salsa for a person. The script required web browser driver script copied with it.