From b1b05573117d62c3b95d854d8ac5a447df19e82e Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Thu, 4 Oct 2012 22:21:09 +0100 Subject: Strip leading/trailing newlines on list of headers for addition; bug 884. NB: this means a bare "X-ACL-Warn:" header is harder to add. --- doc/doc-txt/ChangeLog | 3 +++ 1 file changed, 3 insertions(+) (limited to 'doc/doc-txt') diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index a4c10d13a..6e91c1070 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -71,6 +71,9 @@ 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. + Exim version 4.80 ----------------- -- cgit v1.2.3 From 362145b5072e8d863d74c4fed8d7c1377c783b87 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Thu, 4 Oct 2012 23:05:04 +0100 Subject: Add expansion variable $headers_added returning newline-sep list of headers added in ACLs. Bug 199. --- doc/doc-docbook/spec.xfpt | 12 +++++++++- doc/doc-txt/ChangeLog | 4 ++++ doc/doc-txt/NewStuff | 3 +++ src/src/acl.c | 38 +++++++++++++++++++++++++++++++ src/src/expand.c | 58 +++++++++++++++++++++++++++++------------------ src/src/functions.h | 2 ++ test/confs/0496 | 3 ++- test/log/0496 | 1 + test/mail/0496.someone | 2 ++ 9 files changed, 99 insertions(+), 24 deletions(-) (limited to 'doc/doc-txt') diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 5961c4bd4..4ba31a0ce 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -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 &<>&). +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 @@ -27340,7 +27346,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 @@ -27349,6 +27357,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 &<>&. +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 diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 6e91c1070..84948f6ac 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -74,6 +74,10 @@ JH/07 Avoid using a waiting database for a single-message-only transport. 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. + + Exim version 4.80 ----------------- diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff index ccf2dc63a..680d96cd1 100644 --- a/doc/doc-txt/NewStuff +++ b/doc/doc-txt/NewStuff @@ -115,6 +115,9 @@ 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). + Version 4.80 ------------ diff --git a/src/src/acl.c b/src/src/acl.c index f9a32d3b7..6ae3680b7 100644 --- a/src/src/acl.c +++ b/src/src/acl.c @@ -1050,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) * *************************************************/ diff --git a/src/src/expand.c b/src/src/expand.c index 780386273..bd8a1bee2 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -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, ®ex_match_string }, @@ -1446,6 +1447,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 +1700,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: { diff --git a/src/src/functions.h b/src/src/functions.h index bc791fcdb..034ef196d 100644 --- a/src/src/functions.h +++ b/src/src/functions.h @@ -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, ...); diff --git a/test/confs/0496 b/test/confs/0496 index 89375b11d..9b03b850f 100644 --- a/test/confs/0496 +++ b/test/confs/0496 @@ -25,7 +25,8 @@ check_rcpt: :at_start:At-Start: some text\n\ :at_end: At-End: some text warn message = data4 - accept + warn add_header = X-multiline: foo\n\tbar + accept logwrite = $headers_added # ----- Routers ----- diff --git a/test/log/0496 b/test/log/0496 index de056d46b..ed05c1221 100644 --- a/test/log/0496 +++ b/test/log/0496 @@ -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 R=r9 T=t1 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed diff --git a/test/mail/0496.someone b/test/mail/0496.someone index 263f59686..32240fd54 100644 --- a/test/mail/0496.someone +++ b/test/mail/0496.someone @@ -16,6 +16,8 @@ X-ACL-Warn: data3 X-ACL-Warn: X-ACL-Warn: data4 At-End: some text +X-multiline: foo + bar Testing message -- cgit v1.2.3 From 3c0a92dcf8312d3071769e5a36946c651330e0e4 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Thu, 4 Oct 2012 23:23:50 +0100 Subject: Logging-only patch for 8BITMIME; bug 817. --- doc/doc-docbook/spec.xfpt | 7 ++++++ doc/doc-txt/ChangeLog | 4 ++++ doc/doc-txt/NewStuff | 2 ++ src/ACKNOWLEDGMENTS | 1 + src/src/globals.c | 2 ++ src/src/globals.h | 1 + src/src/macros.h | 1 + src/src/receive.c | 9 ++++++++ src/src/smtp_in.c | 18 +++++++++++---- test/confs/0566 | 3 ++- test/log/0566 | 10 +++++++++ test/mail/0566.userx | 39 ++++++++++++++++++++++++++++++++ test/rejectlog/0566 | 1 + test/scripts/0000-Basic/0566 | 53 ++++++++++++++++++++++++++++++++++++++++++++ test/stdout/0566 | 48 +++++++++++++++++++++++++++++++++++++++ 15 files changed, 194 insertions(+), 5 deletions(-) create mode 100644 test/mail/0566.userx (limited to 'doc/doc-txt') diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 4ba31a0ce..255513921 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -13099,6 +13099,7 @@ 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" 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 @@ -13112,6 +13113,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" @@ -33824,6 +33830,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 diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 84948f6ac..db1c5254c 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -78,6 +78,10 @@ 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 ----------------- diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff index 680d96cd1..2982fc4b5 100644 --- a/doc/doc-txt/NewStuff +++ b/doc/doc-txt/NewStuff @@ -118,6 +118,8 @@ Version 4.81 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. + Version 4.80 ------------ diff --git a/src/ACKNOWLEDGMENTS b/src/ACKNOWLEDGMENTS index a66512f36..4361d6776 100644 --- a/src/ACKNOWLEDGMENTS +++ b/src/ACKNOWLEDGMENTS @@ -98,6 +98,7 @@ Matt Bernstein LMTP over socket Mike Bethune Help with debugging an elusive ALRM signal bug Ard Biesheuvel Lookup code for accessing an Interbase database Richard Birkett Fix for empty -f address crash +Wolfgang Breyha Logging of 8bitmime reception Dean Brooks Fix for ratelimit per_rcpt in acl_not_smtp. Nick Burrett Patch for CONFIGURE_FILE_USE_EUID in exicyclog Matthew Byng-Maddick Patch for qualify_domain in redirect router diff --git a/src/src/globals.c b/src/src/globals.c index bcbe12d82..ba6c8c6ba 100644 --- a/src/src/globals.c +++ b/src/src/globals.c @@ -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 }, diff --git a/src/src/globals.h b/src/src/globals.h index 16caa41e9..a27f62cfe 100644 --- a/src/src/globals.h +++ b/src/src/globals.h @@ -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 */ diff --git a/src/src/macros.h b/src/src/macros.h index cec4733f6..305200211 100644 --- a/src/src/macros.h +++ b/src/src/macros.h @@ -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 | \ diff --git a/src/src/receive.c b/src/src/receive.c index 7b51805dc..8ac381add 100644 --- a/src/src/receive.c +++ b/src/src/receive.c @@ -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. diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index b1fea9daf..e3746d99d 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -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; diff --git a/test/confs/0566 b/test/confs/0566 index e7a91c694..83e97fb18 100644 --- a/test/confs/0566 +++ b/test/confs/0566 @@ -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 diff --git a/test/log/0566 b/test/log/0566 index e59c7336d..0922615b3 100644 --- a/test/log/0566 +++ b/test/log/0566 @@ -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= rejected RCPT : SIZE value too big 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 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 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 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 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") diff --git a/test/mail/0566.userx b/test/mail/0566.userx new file mode 100644 index 000000000..e5f0975da --- /dev/null +++ b/test/mail/0566.userx @@ -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 ) + id 10HmaX-0005vi-00 + for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +Subject: test +Message-Id: +From: CALLER_NAME +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 ) + id 10HmaY-0005vi-00 + for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +Subject: test +Message-Id: +From: CALLER_NAME +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 ) + id 10HmaZ-0005vi-00 + for userx@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 +Subject: test +Message-Id: +From: CALLER_NAME +Date: Tue, 2 Mar 1999 09:44:33 +0000 + +foo + diff --git a/test/rejectlog/0566 b/test/rejectlog/0566 index 67b5dc277..7a420d042 100644 --- a/test/rejectlog/0566 +++ b/test/rejectlog/0566 @@ -1,2 +1,3 @@ 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : SIZE value too big 1999-03-02 09:44:33 U=CALLER F= rejected RCPT : 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") diff --git a/test/scripts/0000-Basic/0566 b/test/scripts/0000-Basic/0566 index c4dc0d8aa..b2c5f75b4 100644 --- a/test/scripts/0000-Basic/0566 +++ b/test/scripts/0000-Basic/0566 @@ -70,4 +70,57 @@ mail from: BODY=8BITMIME SIZE=40004 rcpt to: quit **** +# no BODY, data +exim -bs +ehlo Testing +mail from: +rcpt to: +data +Subject: test + +foo +. +quit +**** +sleep 1 +# 7bit BODY, data +exim -bs +ehlo Testing +mail from: BODY=7BIT +rcpt to: +data +Subject: test + +foo +. +quit +**** +sleep 1 +# 8bit BODY, data +exim -bs +ehlo Testing +mail from: BODY=8BITMIME +rcpt to: +data +Subject: test + +foo +. +quit +**** +sleep 1 +# bad BODY, data +# should fail +1 +exim -bs +ehlo Testing +mail from: BODY=wrong +rcpt to: +data +Subject: test + +foo +. +quit +**** no_msglog_check diff --git a/test/stdout/0566 b/test/stdout/0566 index cb221f611..d3465d49e 100644 --- a/test/stdout/0566 +++ b/test/stdout/0566 @@ -88,3 +88,51 @@ 250 OK 550 SIZE value too big 221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250-myhost.test.ex Hello CALLER at Testing +250-SIZE 52428800 +250-8BITMIME +250-PIPELINING +250 HELP +250 OK +250 Accepted +354 Enter message, ending with "." on a line by itself +250 OK id=10HmaX-0005vi-00 +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250-myhost.test.ex Hello CALLER at Testing +250-SIZE 52428800 +250-8BITMIME +250-PIPELINING +250 HELP +250 OK +250 Accepted +354 Enter message, ending with "." on a line by itself +250 OK id=10HmaY-0005vi-00 +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250-myhost.test.ex Hello CALLER at Testing +250-SIZE 52428800 +250-8BITMIME +250-PIPELINING +250 HELP +250 OK +250 Accepted +354 Enter message, ending with "." on a line by itself +250 OK id=10HmaZ-0005vi-00 +221 myhost.test.ex closing connection +220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +250-myhost.test.ex Hello CALLER at Testing +250-SIZE 52428800 +250-8BITMIME +250-PIPELINING +250 HELP +501 invalid data for BODY +503 sender not yet given +503-All RCPT commands were rejected with this error: +503-503 sender not yet given +503 Valid RCPT command must precede DATA +500 unrecognized command +500 unrecognized command +500-unrecognized command +500 Too many syntax or protocol errors -- cgit v1.2.3 From bd0fff00c496a0530f1320721816bbcd07d2c478 Mon Sep 17 00:00:00 2001 From: Phil Pennock Date: Sat, 6 Oct 2012 20:20:14 -0400 Subject: Doc fix: log field M8S=, in details section --- doc/doc-docbook/spec.xfpt | 9 +++++++++ doc/doc-txt/NewStuff | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'doc/doc-txt') diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 255513921..18cff9ed6 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -13100,6 +13100,7 @@ Those options that undergo string expansion before use are marked with .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 @@ -33878,6 +33879,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 diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff index 2982fc4b5..5347246c4 100644 --- a/doc/doc-txt/NewStuff +++ b/doc/doc-txt/NewStuff @@ -118,7 +118,7 @@ Version 4.81 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. +15. New 8bitmime status logging option for received messages. Log field "M8S". Version 4.80 -- cgit v1.2.3