Introduction The Listhandler module allows you to connect mailing lists to forums and vice versa. It works in conjunction with the Mailhandler module; Mailhandler receives an email and then asks Listhandler if the received email is part of a list. If the email is from a mailing list associated with a forum on your site then Listhandler adds the received email to the forum. Additionally Listhandler will take every post to a forum and, as long as that forum is associated with a mailing list, post the message to it. Checks are made to ensure that a continuous cycle of emails and posts aren't generated. Mailhandler and Listhandler can deal with attachments in emails and in forum posts. See below for configuration details. The Listhandler administration page allows you to set an 'anonymous user' email address and configure the mailing list attributes. Installation and configuration
  1. Listhandler works best with an already working mailing list. Please set one up and ensure that it is working. Do note that setting one up is outside the scope of this document.
  2. Listhandler requires Mail handler to be installed and configured first!
    Both modules can be downloaded from the drupal.org website. If you have not, please download them and extract the contents of the archives into your modules directory.
  3. Within your Drupal website, enable the Mailhandler and Listhandler modules in Administer > Site building > Modules. N.B. Please enable Mailhandler first, otherwise Listhandler will fail to enable cleanly. In the same section, please ensure that the Forum and Comment modules are also enabled.
  4. Create a forum that you wish to be the repository for your list's messages. Administer > Content management > Forums > Add forum Enter a name, description and set the Parent (leave as "<root>" if unsure) and click on "Submit". In the listing, click on the forum name you just created. Make a note of the URL you are sent to. The number at the end of the URL is the 'TID' (Topic IDentification). You will need this later.
  5. Configure a mailbox Within your Drupal website go to Administer > Content management > Mailhandler Click on "Add mailbox" In the form presented, set the values as indicated:
  6. Repeat steps 4 to 5 for each forum/mailing list you wish to configure.
  7. Configure permissions Within your Drupal website, allow authenticated users to post to forums: Administer > Roles Against "authenticated user", click on "edit permissions" Under "Forum module", check "create forum topics" and "edit own forum topics" Click on "Save permissions" (at the bottom of the page)
  8. Configure Listhandler Within your Drupal website go to Administer > Content management > Listhandler In the form presented, set the values as indicated:
  9. For each configured mailbox, subscribe it to the appropriate mailing list.
Testing and troubleshooting All being well, you won't have any problems. But if you do, here's some helpful troubleshooting techniques:
  1. Mail is only collected by Mailhandler whenever cron.php is run. You can initiate a Cron run by going to http://www.example.com/cron.php If you haven't setup a Cron schedule on your Drupal site, go to http://drupal.org/getting-started/5/install/cron for help.
  2. Ensure the mailing list is working as expected. Ensure that you are subscribed and that posts you send to it, get sent back to you.
  3. Use a webmail client, Thunderbird, Outlook or other email client to examine the mailbox of "my-subscribed-mailbox@example.com". Is it receiving posts from the mailing list? Is there a subscription confirmation pending?
  4. Examine the mailing list configuration to see if there are bounce emails from "my-subscribed-mailbox@example.com".
  5. Look at logs in Drupal: Administer > Logs > Recent log entries to see if Mailhandler and/or Listhandler have any problems.
  6. Examine your mailserver logs to ensure that emails are being received and email is being collected from the mailbox successfully.
  7. Confirm that you have tid: <n> in the Mailhandler configuration. Without it Listhandler will not be asked how to handle incoming emails.
Extended use
  1. Add links for uploaded files:
    1. Enable the Upload module, Download and enable the Comment Upload module
    2. Within your Drupal website go to Administer > Content management > Mailhandler
    3. Tick Attachments as link
    4. Click on Save configuration
    5. Please note that Listhandler doesn't work with modules that modify the path that uploads are saved to. There is no plan to add this functionality.
  2. Allow more HTML tags, but still protect your site:
    1. Install the SafeHTML and UnWrap modules and enable them.
    2. Create an Input filter called "Mailinglist Filter" through Administer > Site configuration > Input formats.
    3. Apply that to Mailhandler posts through Administer > Content Management > Against <Mailbox name>, click "Edit"
    4. Scroll to the bottom
    5. Click on "Input filter" and select "Mailinglist Filter".
    6. Click on "Update mailbox"
  3. In step #2 of the main instructions you could set up a folder for each mailing list instead of a mailbox for each one. However documenting such a configuration is beyond the scope of this document and you are responsible for testing it to ensure it works.
  4. Allow users to post images that appear inline. See http://www.venturacottage.com/adding-content-site-email for how to enable Mailhandler to cope with attached images.