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 <[EMAIL PROTECTED]>

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
#
/[EMAIL PROTECTED]/                         DUNNO
/[EMAIL PROTECTED]/                   DUNNO
/[EMAIL PROTECTED]/                 DUNNO
/[EMAIL PROTECTED]/       DUNNO
/[EMAIL PROTECTED]/                 DUNNO
/[EMAIL PROTECTED]/                    DUNNO
/[EMAIL PROTECTED]/                   DUNNO
/[EMAIL PROTECTED]/                   DUNNO
/[EMAIL PROTECTED]/                 DUNNO
/[EMAIL PROTECTED]/               DUNNO
/[EMAIL PROTECTED]/             DUNNO
/[EMAIL PROTECTED]/                   DUNNO
EOF

    done

cat << EOF
#
# * Administrative aliases for domain $domain
#
/[EMAIL PROTECTED]/                 DUNNO
/[EMAIL PROTECTED]/                    DUNNO
/[EMAIL PROTECTED]/                     DUNNO
/[EMAIL PROTECTED]/                         DUNNO
/[EMAIL PROTECTED]/                  DUNNO
#
# * If not listed above, reject
#
/$domain/               REJECT Unknown list - see http://$domain/
#
#
EOF

    done


------------------------------------------------------
Mailman-Users mailing list
Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=show&amp;file=faq01.027.htp

Reply via email to