[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Mailman / zmailer integration



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...

-- 
HTML mails are going to trash automagically
--- aliases.cf-DIST	Fri Jun 20 19:51:00 2003
+++ aliases.cf	Fri Jun 20 20:24:25 2003
@@ -496,6 +496,79 @@
 		;;
 	tfiss
 
+###################
+#
+# START mailman integration
+#
+###################
+
+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"