• Installation Instructions

last modified December 29, 2008 by sonali

This page has been documented in Trac Listen


Zope / Plone / Listen setup

The easiest way to get going with a new Listen installation is to use the buildout. This has only been tested on Ubuntu Linux so far, but in theory should work on any Unix-y platform. It may even work on Windows.

Using the buildout is very easy. Just type the following commands at a shell prompt:

$ svn co https://svn.plone.org/svn/collective/Products.listen/buildouts/p3.1-remember/ listen-p3.1-remember
$ cd listen-p3.1-remember
$ python2.4 bootstrap.py
$ ./bin/buildout
$ ./bin/instance start

This should start a Zope instance on port 8080. If you browse to (uid/pwd is admin/admin by default... you should change that...) you can add a Plone site. You should select "listen", "membrane", and "remember" from the set of Extension profiles (or you can add them via the QuickInstaller afterwards.

Now you may create mailing lists by using the add menu in any container in Plone.

sendmail and postfix configuration

Your SMTP server must be configured to route mail to the mailing list(s). For a simple single list instance the easiest way to do this is the standard MailBoxer way:
  1. Copy the smtp2zope.py script from your MailBoxer folder to the relevant SMTP server (if you are using sendmail with smrsh, then you need to place/link it in a folder accessible to smrsh; for postfix place/link it in /etc/postfix).
  2. Add an alias for the mailing list of the form:
    for sendmail:
    my_list@lists.mydomain.com "|/etc/smrsh/smtp2zope.py http://my_site.example.com/path/to/list/manage_mailboxer 200000"   
    for postfix:
    my_list: "|/etc/postfix/smtp2zope.py http://my_site.example.com/path/to/list/manage_mailboxer 200000"

    Where the number at the end restricts the maximum size of a message intended for the list, this is optional, but highly recommended.

If you would like to be able to setup arbitrary lists on your server and have them automatically handled by your SMTP server the setup is slightly more involved and dependent on the particulars of your SMTP server. The end result is that you need to map a catch-all domain to a similar command which uses a tool in your Zope instance to decide where to route the mail. The process is as follows:

  1. same as step 1 above.
  2. for sendmail:
    Add an entry to your virtusertable to create the catch-all domain:
    @lists.my_domain.com my_zope_lists
    for postfix:
    lists.my_domain.com OK
    @lists.my_domain.com my_zope_lists 
  3. Add an alias pointing to the script with the URL for the global list lookup utility:
    my_zope_lists "|/etc/smrsh/smtp2zope.py http://my_site.example.com/send_listen_mail 200000"
    my_zope_lists: "|/etc/postfix/smtp2zope.py http://my_site.example.com/send_listen_mail 200000"

That should be about it. Site members and anonymous users can subscribe themselves to the list, the list creator and/or site manager can choose whether the list is moderated or closed and how it is archived.

Qmail configuration

If you are using Qmail instead of postfix or sendmail, setting up the aliases is slightly different. You need to create a file .qmail-mylist, where mylist is the name of the list (i.e. mylist@example.com).

So on my system (which serves multiple domains), I had to create the file in this directory: /var/qmail/mailnames/example.com
Depending on your setup, it might go somewhere else (i.e. /var/qmail/alias)

The contents of the file look like this, assuming you put the smtp2zope.py file in the /etc/smrsh directory:

/etc/smrsh/smtp2zope.py http://my_site.example.com/send_listen_mail 200000
Unlike with postfix/sendmail, you don't need to run a command 'newaliases'. The new alias should be active immediately after you create the file.