OG Mailinglist

OG Mailinglist - turns Drupal into a multi-group email list by allowing users to start new posts by email and post comments on existing discussions by simply replying to emails. You get the best of both worlds: a browser-based discussion site and an email-based list.

There is a partial duplicate of this document, installation instructions file: See the INSTALL.TXT for 6.x or INSTALL.TXT for 7.x.

Requirements

  • Way to fetch your email
    • Mailgun account
    • A Mail Transfer Agent (MTA) - This module plugs directly into your MTA so emails can be handled immediately upon receipt. Most modules use POP mailboxes, and while this adds portability, it adds a delay to the system. With the method this modules uses, the MTA triggers the module as part of its normal email delivery process.
      Right now the only fully supported MTAs are Exim, QMail and Postfix (read #771704: Postfix Support). If you use another MTA, look in the issue queue for issues on other MTAs and offer help or start a new one.
  • Organic Groups - This module assumes you are using a group-oriented web site. This module allows for one list per group.
  • PHPMailer 5
  • PHP libraries mimeDecode and imap.
  • Optional: if your mailserver and webserver are on different machines, then you need either HTTP_Request2 or Curl PHP library.

Installation Instructions

  1. Unpack og_mailinglist to sites/all/modules directory (see the Drupal manual on module installation).
  2. Download the latest PHPMailer 5.x to og_mailinglist/phpmailer or to libraries/phpmailer if you use the libraries module - http://sourceforge.net/projects/phpmailer/files/phpmailer%20for%20php5_6...
  3. Install the PHP library mimeDecode and imap:
    • Debian/Ubuntu run apt-get install php-mail-mimedecode php5-imap
      Note: Ubuntu 14.04 requires imap to be enabled, sudo php5enmod imap and restart of Apache sudo service apache2 restart
    • Fedora run yum -y install php-pear-Mail-mimeDecode php-imap
    • Download direct from http://pear.php.net/package/Mail_mimeDecode and add the file either as a subdirectory to og_mailinglist or to the libraries folder.

    Note, mimeDecode depends on PHP PEAR, which should be installed on any recent install of PHP but if you get weird errors, this might be something worth checking.

  4. Go to the Modules page in Drupal and enable the module. After saving, navigate to admin >> og >> og_mailinglist and configure per your server setup (for D7 go to Configuration >> Organic Groups >> OG mailinglist.
  5. To setup og_mailinglist for incoming email, follow the installation instructions for your Mail Transfer Agent in the INSTALL.txt file found in its subdirectory (e.g. exim_og_mailinglist) (for D7 it's in backends directory).
  6. To hide quoted parts of email messages, enable the provided input filter "Hide quoted text from comments created via email" at admin >> settings >> filter (for D7 it's Configuration >> Text formats) and rearrange the filters to set this one first. Note, that for this to work, your input filter(s) will need to allow both the and
    HTML tags (for D7 it's


    ).

  7. Congratulations. You're running og_mailinglist!
  8. FAQ

    Q: I have an existing OG site that I want to install OG Mailinglist on but I don't want people to be subscribed to the mailinglist right away when I install the module. How do I do this?
    A: Once the OG Mailinglist is installed, you can set the default subscription setting for people joining a group on the OG Mailinglist admin page. But as OG Mailinglist automatically generates subscriptions for existing users on install, to change the default subscription to "no email" you'll need to change a bit of code. Open the og_mailinglist_api.inc file and find the og_mailinglist_save_group_subscriptions() function. Then for the insert function, change 'email' to 'no email'. See #916934: Install instructions to change default subscription option to "no email" for members at installation for more on this.

How OG Mailinglist Works

OG Mailinglist turns Drupal into a mailinglist manager, somewhat similar to Mailman, Sympa, LISTSERV or several others. It has one great

Let postfix poll the drupal database to check if the email address exists or not

It is possible having postfix check with each incoming mail if the email address exists in the drupal database or not.

OG Mailinglist and Mailgun

General setup

OG Mailinglist and tokens

The correct token to get email for the group is [node:group_email], and for the post (member of the group) is [node:og-group-ref:0:group

OG Mailinglist fetching mail over POP on a shared VPS host

This is a step by step guide on how to be able to integrate og_mailinglist in your shared environment to fetch email from a (remote) POP3

Server configuration mistakes

This is a list of problems related to server configuration problems when running OG Mailinglist.

Setting OG Mailinglist up the hard way using MTA

The easier way to set up OG Mailinglist is to use MailGun.com services. For some people this doesn't cut it, so here is the hard way.

Using OG Mailinglist Flag module

Guide maintainers

kyle_mathews's picture