January 29, 2005

Allow comments/allow pings in mt.el

I noticed all my posts made from Emacs weren’t getting “allow comments” and “allow pings” set in WordPress. So I added a little bit to my mt.el to add customization variables for these. They default to “on.” I’m not sure if sending these parameters will break web logs that don’t understand these (apparently MT-created) extensions to the MetaWeblog API.

python-managesieve for Python 2.3, Cyrus, and timsieved

In the process of migrating a mail server, I needed to turn a bunch of .qmail scripts into some Sieve scripts. The system being migrated from was Qmail and vpopmail, using qmailadmin to allow users to set up vacation messages and mail forwarding. On the new server, I’m using Cyrus, and users set up forwarding and vacation messages from SquirrelMail using avelsieve.

I wrote a Python script to do the PHP serialization and Base64+URL encoding avelsieve does (it doesn’t parse Sieve, instead it includes a serialized PHP array in comments that explains the rule). So I could generate scripts, but I needed a way to get them into Cyrus. I found python-managesieve. Unfortunately, I ran into three problems with it:

  • With Python 2.3’s imaplib module in that python-managesieve accessed some internal members (_log, _mesg) that were moved from module level into class level.
  • My installation of Cyrus/timsieved only supports PLAIN authentication, but python-managesieve only supports LOGIN.
  • When timsieved advertises STARTTLS, python-managesieve seems to choke.

So I fixed up these problems and rolled the fixes into an RPM based on the RPM generated by distutils. I tested this on FC3, Python 2.3.4.

darkness’ patched python-managesieve