2 messages in net.sourceforge.lists.courier-users[courier-users] couriermlm wrapper: a...
FromSent OnAttachments
Flavio StanchinaDec 22, 2006 8:56 am 
Flavio StanchinaDec 22, 2006 8:58 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[courier-users] couriermlm wrapper: allows posting only from addresses that match a regular expressionActions...
From:Flavio Stanchina (flav@ies.it)
Date:Dec 22, 2006 8:56:10 am
List:net.sourceforge.lists.courier-users

Here's a wrapper for couriermlm that allows posting only from addresses that match a regular expression specified with POSTADDRESS in the mailing list's "options" file.

To use, save wherever you want, chmod +x and change your /path/to/mailing/list/.courier like this: | /path/to/couriermlm-wrapper msg /path/to/mailing/list

I'd like to see this feature (or equivalent) directly in couriermlm though, with options like POST=restricted and POSTADDRESS=<regexp>

Any chance? Would a patch that implements it be welcome?

-- Flavio Stanchina Informatica e Servizi Trento - Italy

#!/bin/sh # A wrapper for couriermlm that allows posting only from addresses that # match the regular expression specified with the POSTADDRESS option.

set -e

if [ ! -d "$2" ]; then echo "550 Requested action not taken: mailbox unavailable" exit 78 # EX_CONFIG fi

POSTADDRESS="$(grep '^POSTADDRESS=' "$2/options" | cut -d= -f2-)" if ! expr "$SENDER" : "$POSTADDRESS" > /dev/null; then echo "554 You are not allowed to post to this mailing list." echo "Please contact <mailto:$(cat "$2/.courier-owner")> to request
authorization." exit 77 # EX_NOPERM fi

exec /usr/bin/couriermlm "$@"

### EOF ###