HowTo: Integrate mailing lists with forums using Listhandler and Mailhandler
Last updated on
30 April 2025
To allow users to post to and receive email from Drupal forums.
- 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.
- Listhandler requires Mailhandler to be installed and configured first.
Both modules can be downloaded from the drupal.org website: http://drupal.org/project/mailhandler and http://drupal.org/project/listhandler If you have not, please download them and extract the contents of the archives into your modules directory. - 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. - 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. - 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:
- E-mail address
Email address subscribed to mailing list. This should be the address associated with the mailbox configured below, e.g. my-subscribed-mailbox@example.com - Second email address:
Email address of the mailing list, e.g. my-mailing-list-address@example.com - Folder:
This is the folder for my-subscribed-mailbox@example.com
Set this to "INBOX" (without the quotes) unless another value is more suitable for your environment. - POP3 or IMAP Mailbox:
This is the protocol used to connect to my-subscribed-mailbox@example.com
Pick which ever suits your environment. Choose POP3 if unsure. - Mailbox domain:
This is the full name of the email server containing my-subscribed-mailbox@example.com
Talk to your service provider if you are unsure. - Mailbox port:
Set this to 110 for POP3 or 143 if using IMAP.
Other port numbers can be used depending on your mailserver configuration. - Mailbox username:
This is the username for the my-subscribed-mailbox@example.com mailbox - Mailbox password:
This is the password for the my-subscribed-mailbox@example.com mailbox
Please note that this is stored as plain text. Please don't use something sensitive. - Extra commands:
Leave blank unless you run into problems.
A common value is "/notls", without the quotes. - Mime preference:
Set this to: HTML - Security:
Set this to: Disabled - Send error replies:
Set this to: Disabled - From header:
Set this to a common header always present in emails sent by your mailing list software. - Default commands:
Enter the following two lines:tid: 123 status: 1Where 123 is the numeric taxonomy id of the forum you created in step 4.
The line "status: 1" sets the created node/comment as published - Signature separator:
Set this to "-- ", without the quotes.
(Yes, there is a space at the end) - Delete messages after they are processed?
Check this option - Cron processing:
Set this to: Enabled - Input format:
(Click on "Import format:" to expand the section)
Leave the default as "Filtered HTML", unless you have another preference
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)
Within your Drupal website go to Administer > Content management > Listhandler
In the form presented, set the values as indicated:
- Admin address:
This is the email address used by Drupal to send forum posts made by anonymous users to mailing lists. Set this to "anonymous@example.com" or similar and subscribe it to your mailing lists. Set this user to not receive posts or otherwise it might be unsubscribed. - Strip title:
Value(s) to be stripped from email subject lines before posting them as forum
topics/comments. Make sure to include any mailing list prefixes, like "[my-
list]". Separate multiple values with commas. - Account status:
When mailing list users post, Listhandler creates an account for them on your Drupal site. You can configure these account to be Blocked or Allowed when created.
Set as "Allowed" if you want those people to be able to log on to your Drupal site. Set as "Blocked" if you don't. - Attachments as link:
Send attachments as links instead of MIME attachments. It affects only mails generated by forum posts.
N.B. You will need to have the Upload module enabled and allow users to attach files to forum posts - Mailing list and Prefix
For each mailing list configured, you can set the [prefix] title that the mailing list software appends to the subject line of each email. Set it here to help Listhandler pick the right forum that posts should go to.
It is also recommended that you set "Strip title" to include mailing list prefix as well.
Help improve this page
Page status: Not set
You can:
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion