|
@@ -19,21 +19,15 @@ if ($TEST)
|
|
|
import MAILDROPDIR
|
|
|
}
|
|
|
POSTMASTER="postmaster@localhost"
|
|
|
-POSTMASTERREGEX=escape($POSTMASTER)
|
|
|
|
|
|
# bi-directional group
|
|
|
# From subscribed member -> other subscribed members
|
|
|
MEMBERGROUP="cropswap-members@shandan.one"
|
|
|
-MEMBERGROUPREGEX=escape($MEMBERGROUP)
|
|
|
|
|
|
# uni-directional group
|
|
|
# From anyone -> organizers
|
|
|
# From organizers -> subscribed members
|
|
|
ORGANIZERGROUP="cropswap@shandan.one"
|
|
|
-ORGANIZERGROUPREGEX=escape($ORGANIZERGROUP)
|
|
|
-
|
|
|
-ANYGROUPREGEX="$MEMBERGROUPREGEX|$ORGANIZERGROUPREGEX"
|
|
|
-HANDLEDREGEX="$POSTMASTERREGEX|$ANYGROUPREGEX"
|
|
|
|
|
|
UNHANDLED=5
|
|
|
BADREQUEST=4
|
|
@@ -44,17 +38,9 @@ FATAL=1
|
|
|
foreach /^(To|Cc):.*/
|
|
|
{
|
|
|
ADDR=getaddr($MATCH)
|
|
|
- foreach (tolower $ADDR) =~ /^$HANDLEDREGEX$/
|
|
|
- {
|
|
|
- include "$FILTERDIR/$MATCH"
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
-if (!$CONTINUE)
|
|
|
-{
|
|
|
- cc "|$DEBUGMAIL no-continue"
|
|
|
- EXITCODE=$UNHANDLED
|
|
|
- exit
|
|
|
+ include "$FILTERDIR/$MEMBERGROUP"
|
|
|
+ include "$FILTERDIR/$ORGANIZERGROUP"
|
|
|
+ include "$FILTERDIR/$POSTMASTER"
|
|
|
}
|
|
|
|
|
|
if ($TOMEMBER && $TOORGANIZER)
|
|
@@ -71,6 +57,13 @@ if ($MAILGROUP eq "")
|
|
|
exit
|
|
|
}
|
|
|
|
|
|
+if (!$CONTINUE)
|
|
|
+{
|
|
|
+ cc "|$DEBUGMAIL no-continue"
|
|
|
+ EXITCODE=$UNHANDLED
|
|
|
+ exit
|
|
|
+}
|
|
|
+
|
|
|
LISTDIR="$MAILDROPDIR/$MAILGROUP"
|
|
|
MLIST="$LISTDIR/mlist"
|
|
|
SLIST="$LISTDIR/slist"
|
|
@@ -79,6 +72,7 @@ gdbmopen($MLIST, "R")
|
|
|
TO=gdbmfetch($TOALIAS)
|
|
|
gdbmclose
|
|
|
|
|
|
+FORWARD=1
|
|
|
if ($TOPOSTMASTER)
|
|
|
{
|
|
|
include "$FILTERDIR/$POSTMASTER"
|