[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Mailman / zmailer integration
Xose Vazquez Perez wrote:
> Jeff Warnica wrote:
>>A patch for ZMailers alias.cf file that allows for Mailman integration
>>into this alternative, high performance, MTA in the same style as all
>>the other MTA integration. The hack itself is more or less based on the
>>zmailers built in list capabalities, so if its insecure, its someone
>>elses fault :)
>
>
> here goes...
here goes against latest cvs release. And with comments.
--
HTML mails are going to trash automagically
--- zmailer/proto/cf/aliases.cf Tue Nov 18 04:35:25 2003
+++ new/proto/cf/aliases.cf Fri Nov 21 01:46:50 2003
@@ -529,6 +529,78 @@
;;
tfiss
+#
+# START mailman integration
+#
+
+# You need to define the MAILMAN_ROOT variable in zmailer.conf
+# Something like: MAILMAN_ROOT=/var/mailman
+
+if [ -n "$MAILMAN_ROOT" ] ; then
+
+ a="$MAILMAN_ROOT/lists/$lcuser/"
+ if [ -d "$a" ] ; then
+ nattr=$(newattribute $attr privilege "0")
+ $(zapDSNnotify $nattr delivered "$sender" "$lcuser$domain")
+ a=(((local pipe.$lcuser "|$MAILMAN_ROOT/mail/mailman post $lcuser" $nattr)))
+ postzapDSNnotify a +
+ return $a
+ fi
+
+ ssift "$lcuser" in
+
+ (.+)-owner
+ listbase="\1"
+ mailman_todo="owner"
+ ;;
+ (.+)-admin
+ listbase="\1"
+ mailman_todo="admin"
+ ;;
+ (.+)-bounces
+ listbase="\1"
+ mailman_todo="bounces"
+ ;;
+ (.+)-confirm
+ listbase="\1"
+ mailman_todo="confirm"
+ ;;
+ (.+)-join
+ listbase="\1"
+ mailman_todo="join"
+ ;;
+ (.+)-leave
+ listbase="\1"
+ mailman_todo="leave"
+ ;;
+ (.+)-request
+ listbase="\1"
+ mailman_todo="request"
+ ;;
+ (.+)-subscribe
+ listbase="\1"
+ mailman_todo="subscribe"
+ ;;
+ (.+)-unsubscribe
+ listbase="\1"
+ mailman_todo="unsubscribe"
+ ;;
+
+ tfiss
+
+ if [ -n "$listbase" ] ; then
+ nattr=$(newattribute $attr privilege "0")
+ $(zapDSNnotify $nattr delivered "$sender" "$lcuser$domain")
+ a=(((local pipe.$lcuser "|$MAILMAN_ROOT/mail/mailman $mailman_todo $listbase" $nattr)))
+ postzapDSNnotify a +
+ return $a
+ fi
+
+fi
+
+#
+# END mailman integration
+#
# Define something like following in your zmailer.conf file to enable this !
# LISTSERV="/v/net/listserv.funet.fi"