Listening for messages using listen

June 10, 2006 at 4:03 pm

listen screenshotAlec Mitchell’s listen product is not only an excellent example of how to use the latest Zope 3 technologies in Plone, it’s also a very useful product.Listen is a mailing list management application that integrates into Plone. It’s based on Maik Jablonski’s Mailboxer product which has been around a long time and proved to be very stable.

PloneMailboxer was an attempt to integrate Mailboxer into Plone, but it hasn’t seen much development in over a year.

What I like about listen is that users can subscribe either as a user logged into the Plone site, or by simply providing an email address (while browsing the site anonymously). They can also post new messages and reply to existing messages through the Plone interface. All messages posted through the website are relayed to the mailing list, and vice versa.It took awhile to set it up all because it requires some configuration on the Linux server. Here is a summary of my experience.

1.Install listen

I grabbed the listen bundle and symlinked in all the products:

Note: I put all of my products in a global $PRODUCTS directory, usually in /usr/misc/zope/products
Then for each Zope instance, I symlink the products I need into that instance’s products directory. This way I only have to update the products in one place for all my Zope instances.

2. Setup a test instance

Restarted Zope and made a test Plone instance ‘mysite’. Installed listen and made a listen instance ‘mylist’
So the listen instance is now at: http://www.domain.com/mysite/mylist
The email address for this list will be: mylist@domain.com

3. Set up the smtp2zope script

4. Make the alias for the mailing list

Put the following in .qmail-mylist:

Note: This step took the longest time because I couldn’t figure out where to make the .qmail-mylist file. First I put it in /var/qmail/alias, but it wasn’t getting read from there. Since my box is serving multiple domains, each domain has it’s own qmail aliases. It also didn’t help that all the instructions for setting up Mailboxer assume that you are running postfix or sendmail. Luckily I found this howto which explained how to do it for qmail.

If you are using postfix or sendmail, then you need to edit the ‘/etc/aliases’ file and add the following:

Once you save this file, you need to run the command ‘newaliases’ to refresh the aliases. The README.txt explains all this pretty well.

5. Configuring the Mailhost

By default, Plone now ships with SecureMailHost. I wasn’t able to get listen to work with SecureMailhost nor the recommended MaildropHost due to the error described in this issue. I deleted the SecureMailHost object in the Plone root, and added a normal Mailhost object. I left the SMTP authentication fields empty, and then it worked. If anyone knows why it’s giving an sslerror, please respond to the issue in the tracker.

What’s next?

I’d like to migrate all the mailboxer archives from lists.plone4artists.org over to use listen, but I’m not sure how easy this will be. I’d also like to be able to search the messages in the archive. Currently, they don’t appear in the search results when I use Plone’s LiveSearch. Although, this might be intentional?

Technorati Tags: