Merge branch 'master' of ssh://git.exim.org/home/git/exim
authorTodd Lyons <tlyons@exim.org>
Tue, 16 Oct 2012 03:21:07 +0000 (20:21 -0700)
committerTodd Lyons <tlyons@exim.org>
Tue, 16 Oct 2012 03:21:07 +0000 (20:21 -0700)
22 files changed:
doc/doc-docbook/spec.xfpt
doc/doc-txt/ChangeLog
doc/doc-txt/NewStuff
src/ACKNOWLEDGMENTS
src/src/acl.c
src/src/configure.default
src/src/expand.c
src/src/functions.h
src/src/globals.c
src/src/globals.h
src/src/macros.h
src/src/receive.c
src/src/smtp_in.c
test/confs/0496
test/confs/0566
test/log/0496
test/log/0566
test/mail/0496.someone
test/mail/0566.userx [new file with mode: 0644]
test/rejectlog/0566
test/scripts/0000-Basic/0566
test/stdout/0566

index d35c305c8ad1898c2243049a3301f3d010960cf3..03822d27f1615a7545ac8a6fcf4439caf917a74f 100644 (file)
@@ -11063,6 +11063,12 @@ inserting the message header line with the given name. Note that the name must
 be terminated by colon or white space, because it may contain a wide variety of
 characters. Note also that braces must &'not'& be used.
 
+.vitem &$headers_added$&
+.vindex "&$headers_added$&"
+Within an ACL this variable contains the headers added so far by
+the ACL modifier add_header (section &<<SECTaddheadacl>>&).
+The headers are a newline-separated list.
+
 .vitem &$home$&
 .vindex "&$home$&"
 When the &%check_local_user%& option is set for a router, the user's home
@@ -13093,6 +13099,8 @@ Those options that undergo string expansion before use are marked with
 .option accept_8bitmime main boolean true
 .cindex "8BITMIME"
 .cindex "8-bit characters"
+.cindex "log" "selectors"
+.cindex "log" "8BITMIME"
 This option causes Exim to send 8BITMIME in its response to an SMTP
 EHLO command, and to accept the BODY= parameter on MAIL commands.
 However, though Exim is 8-bit clean, it is not a protocol converter, and it
@@ -13106,6 +13114,11 @@ A more detailed analysis of the issues is provided by Dan Bernstein:
 &url(http://cr.yp.to/smtp/8bitmime.html)
 .endd
 
+To log received 8BITMIME status use
+.code
+log_selector = +8bitmime
+.endd
+
 .option acl_not_smtp main string&!! unset
 .cindex "&ACL;" "for non-SMTP messages"
 .cindex "non-SMTP messages" "ACLs for"
@@ -26130,6 +26143,9 @@ before or after the data) correctly &-- they keep the message on their queues
 and try again later, but that is their problem, though it does waste some of
 your resources.
 
+The &%acl_smtp_data%& ACL is run after both the &%acl_smtp_dkim%& and
+the &%acl_smtp_mime%& ACLs.
+
 
 .section "The SMTP DKIM ACL" "SECTDKIMACL"
 The &%acl_smtp_dkim%& ACL is available only when Exim is compiled with DKIM support
@@ -26139,13 +26155,17 @@ The ACL test specified by &%acl_smtp_dkim%& happens after a message has been
 received, and is executed for each DKIM signature found in a message.  If not
 otherwise specified, the default action is to accept.
 
-For details on the operation of DKIM, see chapter &<<CHID12>>&.
+This ACL is evaluated before &%acl_smtp_mime%& and &%acl_smtp_data%&.
+
+For details on the operation of DKIM, see chapter &<<CHAPdkim>>&.
 
 
 .section "The SMTP MIME ACL" "SECID194"
 The &%acl_smtp_mime%& option is available only when Exim is compiled with the
 content-scanning extension. For details, see chapter &<<CHAPexiscan>>&.
 
+This ACL is evaluated after &%acl_smtp_dkim%& but before &%acl_smtp_data%&.
+
 
 .section "The QUIT ACL" "SECTQUITACL"
 .cindex "QUIT, ACL for"
@@ -27092,7 +27112,7 @@ contexts):
 .cindex "disable DKIM verify"
 .cindex "DKIM" "disable verify"
 This control turns off DKIM verification processing entirely.  For details on
-the operation and configuration of DKIM, see chapter &<<CHID12>>&.
+the operation and configuration of DKIM, see chapter &<<CHAPdkim>>&.
 .wen
 
 
@@ -27320,7 +27340,9 @@ receiving a message). The message must ultimately be accepted for
 any ACL verb, including &%deny%& (though this is potentially useful only in a
 RCPT ACL).
 
-If the data for the &%add_header%& modifier contains one or more newlines that
+Leading and trailing newlines are removed from
+the data for the &%add_header%& modifier; if it then
+contains one or more newlines that
 are not followed by a space or a tab, it is assumed to contain multiple header
 lines. Each one is checked for valid syntax; &`X-ACL-Warn:`& is added to the
 front of any line that is not a valid header line.
@@ -27338,7 +27360,9 @@ message is rejected after DATA or by the non-SMTP ACL, all added header lines
 are included in the entry that is written to the reject log.
 
 .cindex "header lines" "added; visibility of"
-Header lines are not visible in string expansions until they are added to the
+Header lines are not visible in string expansions
+of message headers
+until they are added to the
 message. It follows that header lines defined in the MAIL, RCPT, and predata
 ACLs are not visible until the DATA ACL and MIME ACLs are run. Similarly,
 header lines that are added by the DATA or MIME ACLs are not visible in those
@@ -27347,6 +27371,8 @@ passing data between (for example) the MAIL and RCPT ACLs. If you want to do
 this, you can use ACL variables, as described in section
 &<<SECTaclvariables>>&.
 
+The list of headers yet to be added is given by the &%$headers_added%& variable.
+
 The &%add_header%& modifier acts immediately as it is encountered during the
 processing of an ACL. Notice the difference between these two cases:
 .display
@@ -33812,6 +33838,7 @@ log_selector = +arguments -retry_defer
 The list of optional log items is in the following table, with the default
 selection marked by asterisks:
 .display
+&` 8bitmime                   `&  received 8BITMIME status
 &`*acl_warn_skipped           `&  skipped &%warn%& statement in ACL
 &` address_rewrite            `&  address rewriting
 &` all_parents                `&  all parents in => lines
@@ -33859,6 +33886,14 @@ selection marked by asterisks:
 More details on each of these items follows:
 
 .ilist
+.cindex "8BITMIME"
+.cindex "log" "8BITMIME"
+&%8bitmime%&: This causes Exim to log any 8BITMIME status of received messages,
+which may help in tracking down interoperability issues with ancient MTAs
+that are not 8bit clean.  This is added to the &"<="& line, tagged with
+&`M8S=`& and a value of &`0`&, &`7`& or &`8`&, corresponding to "not given",
+&`7BIT`& and &`8BITMIME`& respectively.
+.next
 .cindex "&%warn%& ACL verb" "log when skipping"
 &%acl_warn_skipped%&: When an ACL &%warn%& statement is skipped because one of
 its conditions cannot be evaluated, a log line to this effect is written if
@@ -35963,7 +35998,7 @@ unqualified domain &'foundation'&.
 . ////////////////////////////////////////////////////////////////////////////
 . ////////////////////////////////////////////////////////////////////////////
 
-.chapter "Support for DKIM (DomainKeys Identified Mail)" "CHID12" &&&
+.chapter "Support for DKIM (DomainKeys Identified Mail)" "CHAPdkim" &&&
          "DKIM Support"
 .cindex "DKIM"
 
index a4c10d13afc515ea56cc73abd0aa990eabf7d146..db1c5254c21d9cd5c8d97978d87692a279de0019 100644 (file)
@@ -71,6 +71,17 @@ JH/06 Add dnsdb pseudo-lookup "a+" to do an "aaaa" + "a" combination.
 JH/07 Avoid using a waiting database for a single-message-only transport.
       Performance patch from Paul Fisher.  Bugzilla 1262.
 
+JH/08 Strip leading/trailing newlines from add_header ACL modifier data.
+      Bugzilla 884.
+
+JH/09 Add $headers_added variable, with content from use of ACL modifier
+      add_header (but not yet added to the message).  Bugzilla 199.
+
+
+JH/10 Add 8bitmime log_selector, for 8bitmime status on the received line.
+      Pulled from Bugzilla 817 by Wolfgang Breyha.
+
+
 
 Exim version 4.80
 -----------------
index ccf2dc63a94c463182c1bd823788a9a23b200104..5347246c4c963b4e799b4935ad9979df8ceb3c03 100644 (file)
@@ -115,6 +115,11 @@ Version 4.81
 13. New dnsdb lookup pseudo-type "a+".  A sequence of "a6" (if configured),
     "aaaa" and "a" lookups is done and the full set of results returned.
 
+14. New expansion variable $headers_added with content from ACL add_header
+    modifier (but not yet added to messsage).
+
+15. New 8bitmime status logging option for received messages.  Log field "M8S".
+
 
 Version 4.80
 ------------
index a66512f369e51e97c860fecb31b266332a0bf2c4..dbdc40cb35f3cc2aadd7411983cf7dd947ecf99e 100644 (file)
@@ -370,6 +370,7 @@ Wolfgang Breyha           DCC integration; expandable spamd_address
                           Patch fixing DKIM verification when signature header
                             not prepended
                           Unbroke Cyrus SASL auth after incorrect SSF addition
+                          Logging of 8bitmime reception
 David Brownlee            Patch improving local interface IP address detection
 Eugene Bujak              Security patch fixing buffer overflow in string_format
 Adam Ciarcinski           Patch for TLS-enabled LDAP (alternative to ldaps)
index 3b23a915b5aaa8fcd89812df1203a7d9e05e25e3..6ae3680b789b5f20c249bf467698b013ee1af2aa 100644 (file)
@@ -958,10 +958,13 @@ setup_header(uschar *hstring)
 uschar *p, *q;
 int hlen = Ustrlen(hstring);
 
-/* An empty string does nothing; otherwise add a final newline if necessary. */
+/* Ignore any leading newlines */
+while (*hstring == '\n') hstring++, hlen--;
 
+/* An empty string does nothing; ensure exactly one final newline. */
 if (hlen <= 0) return;
-if (hstring[hlen-1] != '\n') hstring = string_sprintf("%s\n", hstring);
+if (hstring[--hlen] != '\n') hstring = string_sprintf("%s\n", hstring);
+else while(hstring[--hlen] == '\n') hstring[hlen+1] = '\0';
 
 /* Loop for multiple header lines, taking care about continuations */
 
@@ -1047,6 +1050,44 @@ for (p = q = hstring; *p != 0; )
 
 
 
+/*************************************************
+*        List the added header lines            *
+*************************************************/
+uschar *
+fn_hdrs_added(void)
+{
+uschar * ret = NULL;
+header_line * h = acl_added_headers;
+uschar * s;
+uschar * cp;
+int size = 0;
+int ptr = 0;
+
+if (!h) return NULL;
+
+do
+  {
+  s = h->text;
+  while ((cp = Ustrchr(s, '\n')) != NULL)
+    {
+    if (cp[1] == '\0') break;
+
+    /* contains embedded newline; needs doubling */
+    ret = string_cat(ret, &size, &ptr, s, cp-s+1);
+    ret = string_cat(ret, &size, &ptr, "\n", 1);
+    s = cp+1;
+    }
+  /* last bit of header */
+
+  ret = string_cat(ret, &size, &ptr, s, cp-s+1);       /* newline-sep list */
+  }
+while(h = h->next);
+
+ret[ptr-1] = '\0';     /* overwrite last newline */
+return ret;
+}
+
+
 /*************************************************
 *        Set up removed header line(s)           *
 *************************************************/
index 0ccbbe85587dab805208322b1cdc0e5437f227e6..792b3ecc1b850a288e6a28257d7cf86abbf40b67 100644 (file)
@@ -542,6 +542,21 @@ dnslookup:
   no_more
 
 
+# This alternative router can be used when you want to send all mail to a
+# server which handles DNS lookups for you; an ISP will typically run such
+# a server for their customers.  If you uncomment "smarthost" then you
+# should comment out "dnslookup" above.  Setting a real hostname in route_data
+# wouldn't hurt either.
+
+# smarthost:
+#   driver = manualroute
+#   domains = ! +local_domains
+#   transport = remote_smtp
+#   route_data = MAIL.HOSTNAME.FOR.CENTRAL.SERVER.EXAMPLE
+#   ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
+#   no_more
+
+
 # The remaining routers handle addresses in the local domain(s), that is those
 # domains that are defined by "domainlist local_domains" above.
 
index 7803862738722ac63bff8210155aff94eb865342..0e969788a5d4f0250c2c4ddc0ad66e15f3cde67f 100644 (file)
@@ -367,9 +367,7 @@ enum {
   vtype_msgheaders_raw, /* the message's headers, unprocessed */
   vtype_localpart,      /* extract local part from string */
   vtype_domain,         /* extract domain from string */
-  vtype_recipients,     /* extract recipients from recipients list */
-                        /* (available only in system filters, ACLs, and */
-                        /* local_scan()) */
+  vtype_string_func,   /* value is string returned by given function */
   vtype_todbsdin,       /* value not used; generate BSD inbox tod */
   vtype_tode,           /* value not used; generate tod in epoch format */
   vtype_todel,          /* value not used; generate tod in epoch/usec format */
@@ -389,6 +387,8 @@ enum {
   #endif
   };
 
+static uschar * fn_recipients(void);
+
 /* This table must be kept in alphabetical order. */
 
 static var_entry var_table[] = {
@@ -471,6 +471,7 @@ static var_entry var_table[] = {
 #ifdef WITH_OLD_DEMIME
   { "found_extension",     vtype_stringptr,   &found_extension },
 #endif
+  { "headers_added",       vtype_string_func, &fn_hdrs_added },
   { "home",                vtype_stringptr,   &deliver_home },
   { "host",                vtype_stringptr,   &deliver_host },
   { "host_address",        vtype_stringptr,   &deliver_host_address },
@@ -562,7 +563,7 @@ static var_entry var_table[] = {
   { "received_time",       vtype_int,         &received_time },
   { "recipient_data",      vtype_stringptr,   &recipient_data },
   { "recipient_verify_failure",vtype_stringptr,&recipient_verify_failure },
-  { "recipients",          vtype_recipients,  NULL },
+  { "recipients",          vtype_string_func, &fn_recipients },
   { "recipients_count",    vtype_int,         &recipients_count },
 #ifdef WITH_CONTENT_SCAN
   { "regex_match_string",  vtype_stringptr,   &regex_match_string },
@@ -783,8 +784,11 @@ return -1;
 
 /* This function is called to expand a string, and test the result for a "true"
 or "false" value. Failure of the expansion yields FALSE; logged unless it was a
-forced fail or lookup defer. All store used by the function can be released on
-exit.
+forced fail or lookup defer.
+
+We used to release all store used, but this is not not safe due
+to ${dlfunc } and ${acl }.  In any case expand_string_internal()
+is reasonably careful to release what it can.
 
 The actual false-value tests should be replicated for ECOND_BOOL_LAX.
 
@@ -800,7 +804,6 @@ BOOL
 expand_check_condition(uschar *condition, uschar *m1, uschar *m2)
 {
 int rc;
-void *reset_point = store_get(0);
 uschar *ss = expand_string(condition);
 if (ss == NULL)
   {
@@ -811,7 +814,6 @@ if (ss == NULL)
   }
 rc = ss[0] != 0 && Ustrcmp(ss, "0") != 0 && strcmpic(ss, US"no") != 0 &&
   strcmpic(ss, US"false") != 0;
-store_reset(reset_point);
 return rc;
 }
 
@@ -1446,6 +1448,34 @@ return yield;
 
 
 
+/*************************************************
+*               Return list of recipients        *
+*************************************************/
+/* A recipients list is available only during system message filtering,
+during ACL processing after DATA, and while expanding pipe commands
+generated from a system filter, but not elsewhere. */
+
+static uschar *
+fn_recipients(void)
+{
+if (!enable_dollar_recipients) return NULL; else
+  {
+  int size = 128;
+  int ptr = 0;
+  int i;
+  uschar * s = store_get(size);
+  for (i = 0; i < recipients_count; i++)
+    {
+    if (i != 0) s = string_cat(s, &size, &ptr, US", ", 2);
+    s = string_cat(s, &size, &ptr, recipients_list[i].address,
+      Ustrlen(recipients_list[i].address));
+    }
+  s[ptr] = 0;     /* string_cat() leaves room */
+  return s;
+  }
+}
+
+
 /*************************************************
 *               Find value of a variable         *
 *************************************************/
@@ -1671,26 +1701,11 @@ while (last > first)
       }
     return (s == NULL)? US"" : s;
 
-    /* A recipients list is available only during system message filtering,
-    during ACL processing after DATA, and while expanding pipe commands
-    generated from a system filter, but not elsewhere. */
-
-    case vtype_recipients:
-    if (!enable_dollar_recipients) return NULL; else
+    case vtype_string_func:
       {
-      int size = 128;
-      int ptr = 0;
-      int i;
-      s = store_get(size);
-      for (i = 0; i < recipients_count; i++)
-        {
-        if (i != 0) s = string_cat(s, &size, &ptr, US", ", 2);
-        s = string_cat(s, &size, &ptr, recipients_list[i].address,
-          Ustrlen(recipients_list[i].address));
-        }
-      s[ptr] = 0;     /* string_cat() leaves room */
+      uschar * (*fn)() = var_table[middle].value;
+      return fn();
       }
-    return s;
 
     case vtype_pspace:
       {
@@ -3534,8 +3549,8 @@ $message_headers which can get very long.
 There's a problem if a ${dlfunc item has side-effects that cause allocation,
 since resetting the store at the end of the expansion will free store that was
 allocated by the plugin code as well as the slop after the expanded string. So
-we skip any resets if ${dlfunc has been used. This is an unfortunate
-consequence of string expansion becoming too powerful.
+we skip any resets if ${dlfunc has been used. The same applies for ${acl. This
+is an unfortunate consequence of string expansion becoming too powerful.
 
 Arguments:
   string         the string to be expanded
@@ -3757,6 +3772,7 @@ while (*s != 0)
     acl_check_internal() directly and get a current level from somewhere.
     See also the acl expansion condition ECOND_ACL and the traditional
     acl modifier ACLC_ACL.
+    Assume that the function has side-effects on the store that must be preserved.
     */
 
     case EITEM_ACL:
@@ -3773,6 +3789,7 @@ while (*s != 0)
         }
       if (skipping) continue;
 
+      resetok = FALSE;
       switch(eval_acl(sub, sizeof(sub)/sizeof(*sub), &user_msg))
        {
        case OK:
index bc791fcdb735af4fa8757a44f3a4360b9d9d29bb..034ef196de3f59f3af9a522d6e9ff4d4f7e15c47 100644 (file)
@@ -139,6 +139,8 @@ extern BOOL    filter_personal(string_item *, BOOL);
 extern BOOL    filter_runtest(int, uschar *, BOOL, BOOL);
 extern BOOL    filter_system_interpret(address_item **, uschar **);
 
+extern uschar * fn_hdrs_added(void);
+
 extern void    header_add(int, const char *, ...);
 extern int     header_checkname(header_line *, BOOL);
 extern BOOL    header_match(uschar *, BOOL, BOOL, string_item *, int, ...);
index bcbe12d8201bbd186b99b80f40061f0e761678ed..ba6c8c6bac16447b337e24d1a904c66fd3e5b32a 100644 (file)
@@ -271,6 +271,7 @@ uschar *acl_wherecodes[]       = { US"550",     /* RCPT */
 
 BOOL    active_local_from_check = FALSE;
 BOOL    active_local_sender_retain = FALSE;
+int     body_8bitmime = 0;
 BOOL    accept_8bitmime        = TRUE; /* deliberately not RFC compliant */
 address_item  *addr_duplicate  = NULL;
 
@@ -734,6 +735,7 @@ selectors was getting close to filling a 32-bit word. */
 /* Note that this list must be in alphabetical order. */
 
 bit_table log_options[]        = {
+  { US"8bitmime",                     LX_8bitmime },
   { US"acl_warn_skipped",             LX_acl_warn_skipped },
   { US"address_rewrite",              L_address_rewrite },
   { US"all",                          L_all },
index 16caa41e9a4ac6766588e87cc6e85a3950b3b403..a27f62cfeedcfbf5afbe7136d623e7e749477294 100644 (file)
@@ -133,6 +133,7 @@ extern uschar **address_expansions[ADDRESS_EXPANSIONS_COUNT];
 /* General global variables */
 
 extern BOOL    accept_8bitmime;        /* Allow *BITMIME incoming */
+extern int     body_8bitmime;          /* sender declared BODY= ; 7=7BIT, 8=8BITMIME */
 extern header_line *acl_added_headers; /* Headers added by an ACL */
 extern tree_node *acl_anchor;          /* Tree of named ACLs */
 extern uschar *acl_arg[9];             /* Argument to ACL call */
index cec4733f65ffc1c557fd1bef9f0dfacb59ec6d77..30520021186a0573c2c8981653ab2dcce1849996 100644 (file)
@@ -409,6 +409,7 @@ set all the bits in a multi-word selector. */
 #define LX_tls_peerdn                  0x80400000
 #define LX_tls_sni                     0x80800000
 #define LX_unknown_in_list             0x81000000
+#define LX_8bitmime                    0x82000000
 
 #define L_default     (L_connection_reject        | \
                        L_delay_delivery           | \
index 7b51805dca648f1f7c67d3fef182db3d9ec6b24e..8ac381addd7670f3d97abdf652cc80f500d01189 100644 (file)
@@ -3610,6 +3610,15 @@ if (sender_host_authenticated != NULL)
 sprintf(CS big_buffer, "%d", msg_size);
 s = string_append(s, &size, &sptr, 2, US" S=", big_buffer);
 
+/* log 8BITMIME mode announced in MAIL_FROM
+   0 ... no BODY= used
+   7 ... 7BIT
+   8 ... 8BITMIME */
+if (log_extra_selector & LX_8bitmime) {
+  sprintf(CS big_buffer, "%d", body_8bitmime);
+  s = string_append(s, &size, &sptr, 2, US" M8S=", big_buffer);
+}
+
 /* If an addr-spec in a message-id contains a quoted string, it can contain
 any characters except " \ and CR and so in particular it can contain NL!
 Therefore, make sure we use a printing-characters only version for the log.
index b1fea9daffebff2d22de36b5242d14feed92a861..e3746d99db3147db7e316e6c2f7359dc9d112b5e 100644 (file)
@@ -3320,10 +3320,20 @@ while (done <= 0)
         some sites want the action that is provided. We recognize both "8BITMIME"
         and "7BIT" as body types, but take no action. */
         case ENV_MAIL_OPT_BODY:
-          if (accept_8bitmime &&
-              (strcmpic(value, US"8BITMIME") == 0 ||
-               strcmpic(value, US"7BIT") == 0) )
-            break;
+          if (accept_8bitmime) {
+            if (strcmpic(value, US"8BITMIME") == 0) {
+              body_8bitmime = 8;
+            } else if (strcmpic(value, US"7BIT") == 0) {
+              body_8bitmime = 7;
+            } else {
+              body_8bitmime = 0;
+              done = synprot_error(L_smtp_syntax_error, 501, NULL,
+                US"invalid data for BODY");
+              goto COMMAND_LOOP;
+            }
+            DEBUG(D_receive) debug_printf("8BITMIME: %d\n", body_8bitmime);
+           break;
+          }
           arg_error = TRUE;
           break;
 
index 4bc2fde19e8ce7fd5822a40530e66ada47fb5423..9b03b850fc868ae1747aaa60f1ca27c5f918888a 100644 (file)
@@ -19,11 +19,14 @@ acl_smtp_rcpt = check_rcpt
 begin acl
 
 check_rcpt:
-  warn     message = data1 data1\ndata2 data2
+  warn     message = data1 data1\ndata2 data2\n
+  warn     message = \n\ndata3\n\ndata4\n\n
   warn     message = :after_received:After-Received: some text\n\
                      :at_start:At-Start: some text\n\
                      :at_end:  At-End: some text
-  accept
+  warn     message = data4
+  warn     add_header = X-multiline: foo\n\tbar
+  accept   logwrite = $headers_added
 
 
 # ----- Routers -----
index e7a91c6944185b0a82a04a5995b46d610d922412..83e97fb18ce90e898d38bb60b88b939fa00dc36b 100644 (file)
@@ -1,4 +1,4 @@
-# Exim test configuration 0028
+# Exim test configuration 0566
 
 exim_path = EXIM_PATH
 host_lookup_order = bydns
@@ -6,6 +6,7 @@ primary_hostname = myhost.test.ex
 rfc1413_query_timeout = 0s
 spool_directory = DIR/spool
 log_file_path = DIR/spool/log/%slog
+log_selector = +8bitmime
 gecos_pattern = ""
 gecos_name = CALLER_NAME
 
index de056d46b0c2ce693470d633251369d78df89bbc..ed05c12215d423d34323f5a99a9ebaf94aed841f 100644 (file)
@@ -1,3 +1,4 @@
+1999-03-02 09:44:33 X-ACL-Warn: data1 data1\nX-ACL-Warn: data2 data2\nX-ACL-Warn: data3\nX-ACL-Warn: \nX-ACL-Warn: data4\nAfter-Received: some text\nAt-Start: some text\nAt-End: some text\nX-multiline: foo\n\n      bar
 1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-smtp S=sss
 1999-03-02 09:44:33 10HmaX-0005vi-00 => someone <someone@el.se> R=r9 T=t1
 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
index e59c7336dcd305ac1b68f966e8c80d8cfcd7136a..0922615b32f17cd1a503e6373c295afac3890d8d 100644 (file)
@@ -3,3 +3,13 @@
 1999-03-02 09:44:33 ignoring AUTH=x@y from U=CALLER (client not authenticated)
 1999-03-02 09:44:33 U=CALLER F=<x@y> rejected RCPT <userx@test.ex>: SIZE value too big
 1999-03-02 09:44:33 U=CALLER F=<x@y> rejected RCPT <userx@test.ex>: SIZE value too big
+1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss M8S=0
+1999-03-02 09:44:33 10HmaX-0005vi-00 => userx <userx@test.ex> R=r2 T=local_delivery
+1999-03-02 09:44:33 10HmaX-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss M8S=7
+1999-03-02 09:44:33 10HmaY-0005vi-00 => userx <userx@test.ex> R=r2 T=local_delivery
+1999-03-02 09:44:33 10HmaY-0005vi-00 Completed
+1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local-esmtp S=sss M8S=8
+1999-03-02 09:44:33 10HmaZ-0005vi-00 => userx <userx@test.ex> R=r2 T=local_delivery
+1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed
+1999-03-02 09:44:33 SMTP call from CALLER dropped: too many syntax or protocol errors (last command was "foo")
index 49cda3694cc4b0ae79b64401193548471c13d56b..32240fd54e049159b194fe567cff3d9f5d25b379 100644 (file)
@@ -12,7 +12,12 @@ Sender: CALLER_NAME <CALLER@myhost.test.ex>
 Date: Tue, 2 Mar 1999 09:44:33 +0000
 X-ACL-Warn: data1 data1
 X-ACL-Warn: data2 data2
+X-ACL-Warn: data3
+X-ACL-Warn: 
+X-ACL-Warn: data4
 At-End: some text
+X-multiline: foo
+       bar
 
 Testing message
 
diff --git a/test/mail/0566.userx b/test/mail/0566.userx
new file mode 100644 (file)
index 0000000..e5f0975
--- /dev/null
@@ -0,0 +1,39 @@
+From CALLER@myhost.test.ex Tue Mar 02 09:44:33 1999
+Received: from CALLER (helo=Testing)
+       by myhost.test.ex with local-esmtp (Exim x.yz)
+       (envelope-from <CALLER@myhost.test.ex>)
+       id 10HmaX-0005vi-00
+       for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Subject: test
+Message-Id: <E10HmaX-0005vi-00@myhost.test.ex>
+From: CALLER_NAME <CALLER@myhost.test.ex>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+foo
+
+From CALLER@myhost.test.ex Tue Mar 02 09:44:33 1999
+Received: from CALLER (helo=Testing)
+       by myhost.test.ex with local-esmtp (Exim x.yz)
+       (envelope-from <CALLER@myhost.test.ex>)
+       id 10HmaY-0005vi-00
+       for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Subject: test
+Message-Id: <E10HmaY-0005vi-00@myhost.test.ex>
+From: CALLER_NAME <CALLER@myhost.test.ex>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+foo
+
+From CALLER@myhost.test.ex Tue Mar 02 09:44:33 1999
+Received: from CALLER (helo=Testing)
+       by myhost.test.ex with local-esmtp (Exim x.yz)
+       (envelope-from <CALLER@myhost.test.ex>)
+       id 10HmaZ-0005vi-00
+       for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000
+Subject: test
+Message-Id: <E10HmaZ-0005vi-00@myhost.test.ex>
+From: CALLER_NAME <CALLER@myhost.test.ex>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+foo
+
index 67b5dc277848aa42e33977588022e40c414be324..7a420d042386720a7d466b8499c700ce0a0f3301 100644 (file)
@@ -1,2 +1,3 @@
 1999-03-02 09:44:33 U=CALLER F=<x@y> rejected RCPT <userx@test.ex>: SIZE value too big
 1999-03-02 09:44:33 U=CALLER F=<x@y> rejected RCPT <userx@test.ex>: SIZE value too big
+1999-03-02 09:44:33 SMTP call from CALLER dropped: too many syntax or protocol errors (last command was "foo")
index c4dc0d8aa274db0560d41c7c043671018262b184..b2c5f75b4890e7095b9a323e4f19ebc9aed1c538 100644 (file)
@@ -70,4 +70,57 @@ mail from:<x@y> BODY=8BITMIME SIZE=40004
 rcpt to:<userx@test.ex>
 quit
 ****
+# no BODY, data
+exim -bs
+ehlo Testing
+mail from:<x@y>
+rcpt to:<userx@test.ex>
+data
+Subject: test
+
+foo
+.
+quit
+****
+sleep 1
+# 7bit BODY, data
+exim -bs
+ehlo Testing
+mail from:<x@y> BODY=7BIT
+rcpt to:<userx@test.ex>
+data
+Subject: test
+
+foo
+.
+quit
+****
+sleep 1
+# 8bit BODY, data
+exim -bs
+ehlo Testing
+mail from:<x@y> BODY=8BITMIME
+rcpt to:<userx@test.ex>
+data
+Subject: test
+
+foo
+.
+quit
+****
+sleep 1
+# bad BODY, data
+# should fail
+1
+exim -bs
+ehlo Testing
+mail from:<x@y> BODY=wrong
+rcpt to:<userx@test.ex>
+data
+Subject: test
+
+foo
+.
+quit
+****
 no_msglog_check
index cb221f61143245599e6a50a4ee0828c44a561e97..d3465d49edd87709ebc720e34992d6dc90ae77e4 100644 (file)
 250 OK\r
 550 SIZE value too big\r
 221 myhost.test.ex closing connection\r
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250-myhost.test.ex Hello CALLER at Testing\r
+250-SIZE 52428800\r
+250-8BITMIME\r
+250-PIPELINING\r
+250 HELP\r
+250 OK\r
+250 Accepted\r
+354 Enter message, ending with "." on a line by itself\r
+250 OK id=10HmaX-0005vi-00\r
+221 myhost.test.ex closing connection\r
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250-myhost.test.ex Hello CALLER at Testing\r
+250-SIZE 52428800\r
+250-8BITMIME\r
+250-PIPELINING\r
+250 HELP\r
+250 OK\r
+250 Accepted\r
+354 Enter message, ending with "." on a line by itself\r
+250 OK id=10HmaY-0005vi-00\r
+221 myhost.test.ex closing connection\r
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250-myhost.test.ex Hello CALLER at Testing\r
+250-SIZE 52428800\r
+250-8BITMIME\r
+250-PIPELINING\r
+250 HELP\r
+250 OK\r
+250 Accepted\r
+354 Enter message, ending with "." on a line by itself\r
+250 OK id=10HmaZ-0005vi-00\r
+221 myhost.test.ex closing connection\r
+220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000\r
+250-myhost.test.ex Hello CALLER at Testing\r
+250-SIZE 52428800\r
+250-8BITMIME\r
+250-PIPELINING\r
+250 HELP\r
+501 invalid data for BODY\r
+503 sender not yet given\r
+503-All RCPT commands were rejected with this error:\r
+503-503 sender not yet given\r
+503 Valid RCPT command must precede DATA\r
+500 unrecognized command\r
+500 unrecognized command\r
+500-unrecognized command\r
+500 Too many syntax or protocol errors\r