+__END__
+# TMPMSG comes from dc-dlvr, it's populated before the above runs:
+# TMPMSG=$(mktemp -t dc-dlvr.orig.$USER.XXXXXX || exit 1)
+# cat >$TMPMSG
+
+# I use something like this in front of mlmmj for UNIQUE_MAILTO
+# $EXTENSION and $ORIGINAL_RECIPIENT are set by postfix, $list
+# is a local mapping of addresses to mailing list names.
+case $ORIGINAL_RECIPIENT in
+foo+*) list=foo ;;
+# ...
+esac
+
+case $EXTENSION in
+unique-unsub)
+ u="$(formail -z -c -x Subject <$TMPMSG)"
+ d=$(expr "$ORIGINAL_RECIPIENT" : '^.*@\(.*\)')
+
+ # forward this to the unsubscribe.psgi service
+ curl -sSf https://$d/u/$u/$list >/dev/null
+ exit
+ ;;
+esac
+/usr/bin/mlmmj-receive -L /path/to/mlmmj-spool/$list <"$TMPMSG"
+exit