[Mailman-Users] Bounced messages with Mailman 2.1 and Postfix 2.5 Virtual Mailboxes

Benjamin Donnachie benjamin at py-soft.co.uk
Sun Jun 10 19:42:38 CEST 2007


Benjamin Donnachie wrote:
> I've just written a very simple script which I use as a cronjob to keep
> a postfix access map of current lists up-to-date.  Thus avoiding
> potential backscatter with the listhost domain.

A copy of the script is below.  You'll probably need to edit it for your
site.

I pipe the output to /etc/postfix/mm-handler_access.  With
smtpd_recipient_restrictions including "check_recipient_access
regexp:/etc/postfix/mm-handler_access", in postfix's main.cf.

Remembering to run postmap /etc/postfix/mm-handler_access after.

The access map that it generates ensures that postfix only accepts
messages for valid mailman lists and thus prevents your system from
becoming a potential source of backscatter spam when using mm-handler.

Take care,

Ben



#!/bin/bash
# Generate postfix access maps for valid mailman addresses
# By Benjamin Donnachie <benjamin at py-soft.co.uk>

cat << EOF
#
# Generated `/bin/date`
#
#
# Lists to accept:
#
EOF

for domain in listhost.example.com listhost.example.org; do

    echo "# ** Domain $domain"

    for list in $( /usr/lib/mailman/bin/list_lists -V $domain -b ); do

                cat << EOF
#
# * List $list
#
/$list@$domain/                         DUNNO
/$list-admin@$domain/                   DUNNO
/$list-bounces@$domain/                 DUNNO
/$list-bounces\+.*=.*\..@$domain/       DUNNO
/$list-confirm@$domain/                 DUNNO
/$list-join@$domain/                    DUNNO
/$list-leave@$domain/                   DUNNO
/$list-owner@$domain/                   DUNNO
/$list-request@$domain/                 DUNNO
/$list-subscribe@$domain/               DUNNO
/$list-unsubscribe@$domain/             DUNNO
/owner-$list@$domain/                   DUNNO
EOF

    done

cat << EOF
#
# * Administrative aliases for domain $domain
#
/MAILER-DAEMON@$domain/                 DUNNO
/postmaster@$domain/                    DUNNO
/webmaster@$domain/                     DUNNO
/abuse@$domain/                         DUNNO
/mailman-loop@$domain/                  DUNNO
#
# * If not listed above, reject
#
/$domain/		REJECT Unknown list - see http://$domain/
#
#
EOF

    done




More information about the Mailman-Users mailing list