http://www.FreeBSD.org/cgi/query-pr.cgi?pr=34145

This PR adapts the patch by Marcus Felipe Pereira <[EMAIL PROTECTED]> to 
accept invalid MIME-formatted 8bit messages which violate RFC2047 and/or 
RFC2045 guidelines.

There's another patch to courier/module.esmtp/esmtpd.dist.in which adds 
BOFHACCEPT8BIT and a blurb explaining it to enable or disable the patch 
above.

If NOUUCP is defined none of courier's uucp functionality will be built or 
installed.  On FreeBSD NOUUCP is usually defined in /etc/make.conf to 
disable building uucp(1) related stuff during a make world.

-- 
Yarema
--- courier/module.esmtp/esmtpd.dist.in.orig    Mon Jan 21 14:43:56 2002
+++ courier/module.esmtp/esmtpd.dist.in Mon Jan 21 15:13:05 2002
@@ -39,6 +39,13 @@
 
 BOFHCHECKDNS=1
 
+##NAME: BOFHACCEPT8BIT:0
+#
+#  Set BOFHACCEPT8BIT to 1 to accept invalid MIME-formatted 8bit
+#  messages which violate RFC2047 and/or RFC2045 guidelines.
+
+BOFHACCEPT8BIT=0
+
 ##NAME: BOFHNOEXPN:1
 #
 #  Set BOFHNOEXP to 1 to disable EXPN
--- courier/submit2.C.orig      Tue Jan 15 17:44:37 2002
+++ courier/submit2.C   Mon Jan 21 15:38:40 2002
@@ -777,6 +777,8 @@
 {
 int    is8bit=0, dorewrite=0, rwmode=0;
 const  char *mime=getenv("MIME");
+const  char *q=getenv("BOFHACCEPT8BIT");
+const  int accept8bit=(q && *q == '1' ? 1 : 0);
 unsigned       n;
 struct stat    stat_buf;
 const char *rfcerr=NULL;
@@ -800,12 +802,12 @@
                return (1);
        }
 
-       if (rwrfcptr->rfcviolation & RFC2045_ERR8BITHEADER)
+       if (!accept8bit && (rwrfcptr->rfcviolation & RFC2045_ERR8BITHEADER))
        {
                rfcerr= SYSCONFDIR "/rfcerr2047.txt";
                dorewrite=1;
         }
-       else if (rwrfcptr->rfcviolation & RFC2045_ERR8BITCONTENT)
+       else if (!accept8bit && (rwrfcptr->rfcviolation & RFC2045_ERR8BITCONTENT))
        {
                rfcerr= SYSCONFDIR "/rfcerr2045.txt";
                dorewrite=1;

Reply via email to