Carlos Andres Paz writes:
> I tried with an intentional loop (A copy to B and B copy to A) and it
> works the same! a total denial of service!
This should not happen. An intentional loop should be detected fairly
early, via duplicate Delivered-To: headers.
> Is there a way to avoid this ? I'm really worried that my users begin to
> setup mail loops un/intentionally with sqwebmail!
Loops due to bouncing on forwards is a bit more problematic. Try the
following patch:
--
Sam
Index: maildir/maildirfilter.c
===================================================================
RCS file: /cvsroot/courier/libs/maildir/maildirfilter.c,v
retrieving revision 1.12
diff -U3 -r1.12 maildirfilter.c
--- maildir/maildirfilter.c 8 Jan 2002 04:47:58 -0000 1.12
+++ maildir/maildirfilter.c 13 Feb 2002 23:26:32 -0000
@@ -424,7 +424,7 @@
if (*fromaddr != '"' && *fromaddr != '\'' && *fromaddr != '\\')
putc(*fromaddr, f);
}
- fprintf(f, "\'\n\n");
+ fprintf(f, "\'\nimport SENDER\nif ($SENDER ne \"\")\n{\n FROM=$SENDER\n}\n\n");
for (p=r->first; p; p=p->next)
{
@@ -519,7 +519,7 @@
if (*tofolder == '!')
{
- fprintf(f, " %s \"| $SENDMAIL -t -f '$FROM' %s\"\n",
+ fprintf(f, " %s \"| $SENDMAIL -t -f \" '\"$FROM\"' \"
+%s\"\n",
p->flags & MFR_CONTINUE ? "cc":"to",
tofolder+1);
}
Index: maildir/testsuite.txt
===================================================================
RCS file: /cvsroot/courier/libs/maildir/testsuite.txt,v
retrieving revision 1.10
diff -U3 -r1.10 testsuite.txt
--- maildir/testsuite.txt 8 Jan 2002 12:54:07 -0000 1.10
+++ maildir/testsuite.txt 13 Feb 2002 23:26:32 -0000
@@ -37,6 +37,11 @@
# DO NOT EDIT THIS FILE. This is an automatically generated filter.
FROM='[EMAIL PROTECTED]'
+import SENDER
+if ($SENDER ne "")
+{
+ FROM=$SENDER
+}
##Op:startswith
##Header:subject
@@ -154,7 +159,7 @@
if ((/^subject: *x/))
{
- to "| $SENDMAIL -t -f '$FROM' [EMAIL PROTECTED] [EMAIL PROTECTED]"
+ to "| $SENDMAIL -t -f " '"$FROM"' " [EMAIL PROTECTED] [EMAIL PROTECTED]"
}
##Op:startswith