• hooking up the mailing lists to postfix

last modified June 15, 2010 by egj

This document assumes your site is on opencore-site.com, and you want mailing lists to be addressed @lists.opencore-site.com.­   Substitute accordingly.  Note that this process does assume that mailing lists' suffix is not the same as the site domain.  The configuration would probably need to be different for that to work, but I'm not sure how.

0. Set up the MX record for lists.opencore-site.com with your DNS provider­.­   The MX record will have name: opencore-site.com and data: lists.opencore-site.com

1. First you need to copy the smtp2zope.py script to a place where Postfix can execute it.

$ sudo cp ${build_dir}/opencore/src/opencore-bundle/MailBoxer/smtp2zope.py /etc/postfix/

$ sudo chmod a+x /etc/postfix/smtp2zope.py

2. Then you will need to tell Postfix to forward all mails sent to lists.opencore-site.com on to the OpenCore site.  As root, add this line to /etc/aliases:

## in /etc/aliases
opencore-site-lists: "|/etc/postfix/smtp2zope.py http://opencore-site.com/send_listen_mail 2000000

3. And add these lines to /etc/virtual (create this file if it doesn't exist)

## in /etc/virtual
lists.opencore-site.com OK
@lists.opencore-site.com opencore-site-lists

4. Add these lines to /etc/postfix/main.cf

## in /etc/postfix/main.cf
virtual_alias_maps = hash:/etc/virtual

alias_maps = hash:/etc/aliases

alias_database = hash:/etc/aliases

5. Regenerate Postfix configuration:

$ sudo newaliases

$ sudo postmap /etc/virtual

$ sudo /etc/init.d/postfix reload


Now your mailing lists should receive incoming mail.