From aa368db3cd1fe1040bfe90ec1673e9a7c798db9b Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Mon, 11 Jul 2016 11:55:34 +0100 Subject: feature advertise --- test/stdout/0572 | 2 ++ 1 file changed, 2 insertions(+) (limited to 'test/stdout') diff --git a/test/stdout/0572 b/test/stdout/0572 index d6efce012..dbdf4b989 100644 --- a/test/stdout/0572 +++ b/test/stdout/0572 @@ -83,6 +83,7 @@ spool_directory = TESTSUITE/spool log_file_path = TESTSUITE/spool/log/%slog gecos_pattern = "" gecos_name = CALLER_NAME +chunking_advertise_hosts = # 1 "TESTSUITE/aux-var/std_conf_prefix" # 5 "TESTSUITE/test-config" primary_hostname = myhost.test.ex @@ -121,6 +122,7 @@ spool_directory = TESTSUITE/spool log_file_path = TESTSUITE/spool/log/%slog gecos_pattern = "" gecos_name = CALLER_NAME +chunking_advertise_hosts = # 1 "TESTSUITE/aux-var/std_conf_prefix" # 5 "TESTSUITE/test-config" primary_hostname = myhost.test.ex -- cgit v1.2.3 From 7e3ce68e68ab9b8906a637d352993abf361554e2 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Wed, 13 Jul 2016 21:28:18 +0100 Subject: receive flow processing --- doc/doc-docbook/spec.xfpt | 21 +++- doc/doc-txt/NewStuff | 4 + src/src/functions.h | 1 + src/src/globals.c | 4 + src/src/globals.h | 4 + src/src/macros.h | 7 ++ src/src/receive.c | 212 +++++++++++++++++++++++----------- src/src/smtp_in.c | 267 +++++++++++++++++++++++++++++++++---------- src/src/structs.h | 5 +- test/confs/0900 | 71 ++++++++++++ test/log/0900 | 9 ++ test/scripts/0000-Basic/0900 | 170 +++++++++++++++++++++++++++ test/stdout/0900 | 232 +++++++++++++++++++++++++++++++++++++ test/stdout/2122 | 2 +- 14 files changed, 879 insertions(+), 130 deletions(-) create mode 100644 test/confs/0900 create mode 100644 test/log/0900 create mode 100644 test/scripts/0000-Basic/0900 create mode 100644 test/stdout/0900 (limited to 'test/stdout') diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index ca64f9f11..5c2c2ba11 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -13801,6 +13801,7 @@ See also the &'Policy controls'& section above. .table2 .row &%accept_8bitmime%& "advertise 8BITMIME" .row &%auth_advertise_hosts%& "advertise AUTH to these hosts" +.row &%chunking_advertise_hosts%& "advertise CHUNKING to these hosts" .row &%dsn_advertise_hosts%& "advertise DSN extensions to these hosts" .row &%ignore_fromline_hosts%& "allow &""From ""& from these hosts" .row &%ignore_fromline_local%& "allow &""From ""& from local SMTP" @@ -14358,6 +14359,13 @@ For non-SMTP input and for batched SMTP input, the test is done at start-up; on failure a message is written to stderr and Exim exits with a non-zero code, as it obviously cannot send an error message of any kind. +.option chunking_advertise_hosts main "host list&!!" * +.cindex CHUNKING advertisement +.cindex "RFC 3030" "CHUNKING" +The CHUNKING extension (RFC3030) will be advertised in the EHLO message to +these hosts. +Hosts may use the BDAT command as an alternate to DATA. + .option daemon_smtp_ports main string &`smtp`& .cindex "port" "for daemon" .cindex "TCP/IP" "setting listening ports" @@ -27741,6 +27749,15 @@ received, before the final response to the DATA command is sent. This is the ACL specified by &%acl_smtp_data%&, which is the second ACL that is associated with the DATA command. +.cindex CHUNKING "BDAT command" +.cindex BDAT "SMTP command" +.cindex "RFC 3030" CHUNKING +If CHUNKING was advertised and a BDAT command sequence is received, +the &%acl_smtp_predata%& ACL is not run. +.XXX why not? It should be possible, for the first BDAT. +The &%acl_smtp_data%& is run after the last BDAT command and all of +the data specified is received. + For both of these ACLs, it is not possible to reject individual recipients. An error response rejects the entire message. Unfortunately, it is known that some MTAs do not treat hard (5&'xx'&) responses to the DATA command (either @@ -35620,10 +35637,12 @@ the following table: &`F `& sender address (on delivery lines) &`H `& host name and IP address &`I `& local interface used +&`K `& CHUNKING extension used &`id `& message id for incoming message &`P `& on &`<=`& lines: protocol used &` `& on &`=>`& and &`**`& lines: return path -&`PRX `& on &'<='& and&`=>`& lines: proxy address +&`PRDR`& PRDR extension used +&`PRX `& on &'<='& and &`=>`& lines: proxy address &`Q `& alternate queue name &`QT `& on &`=>`& lines: time spent on queue so far &` `& on &"Completed"& lines: time spent on queue diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff index 2a776b730..c37f7cdc8 100644 --- a/doc/doc-txt/NewStuff +++ b/doc/doc-txt/NewStuff @@ -26,6 +26,10 @@ Version 4.88 the queue to be used for a message. A $queue_name variable gives visibility. + 6. The CHUNKING ESMTP extension from RFC 3030. May give some slight + performance increase and network load decrease. Main config option + chucking_advertise_hosts for control. + Version 4.87 ------------ diff --git a/src/src/functions.h b/src/src/functions.h index b5e3098dc..0b77aa1fe 100644 --- a/src/src/functions.h +++ b/src/src/functions.h @@ -100,6 +100,7 @@ extern int auth_xtextdecode(uschar *, uschar **); extern uschar *b64encode(uschar *, int); extern int b64decode(uschar *, uschar **); +extern int bdat_getc(void); extern void bits_clear(unsigned int *, size_t, int *); extern void bits_set(unsigned int *, size_t, int *); diff --git a/src/src/globals.c b/src/src/globals.c index 2e3fe4074..c86b9478d 100644 --- a/src/src/globals.c +++ b/src/src/globals.c @@ -185,6 +185,8 @@ incoming TCP/IP. The defaults use stdin. We never need these for any stand-alone tests. */ #ifndef STAND_ALONE +int (*lwr_receive_getc)(void) = stdin_getc; +int (*lwr_receive_ungetc)(int) = stdin_ungetc; int (*receive_getc)(void) = stdin_getc; int (*receive_ungetc)(int) = stdin_ungetc; int (*receive_feof)(void) = stdin_feof; @@ -495,6 +497,8 @@ int check_spool_space = 0; uschar *chunking_advertise_hosts = US"*"; unsigned chunking_datasize = 0; +unsigned chunking_data_left = 0; +BOOL chunking_offered = FALSE; chunking_state_t chunking_state= CHUNKING_NOT_OFFERED; uschar *client_authenticator = NULL; diff --git a/src/src/globals.h b/src/src/globals.h index 184a144f2..c5767d73a 100644 --- a/src/src/globals.h +++ b/src/src/globals.h @@ -138,6 +138,8 @@ extern uschar *dsn_advertise_hosts; /* host for which TLS is advertised */ /* Input-reading functions for messages, so we can use special ones for incoming TCP/IP. */ +extern int (*lwr_receive_getc)(void); +extern int (*lwr_receive_ungetc)(int); extern int (*receive_getc)(void); extern int (*receive_ungetc)(int); extern int (*receive_feof)(void); @@ -269,6 +271,8 @@ extern int check_spool_inodes; /* Minimum for message acceptance */ extern int check_spool_space; /* Minimum for message acceptance */ extern uschar *chunking_advertise_hosts; /* RFC 3030 CHUNKING */ extern unsigned chunking_datasize; +extern unsigned chunking_data_left; +extern BOOL chunking_offered; extern chunking_state_t chunking_state; extern uschar *client_authenticator; /* Authenticator name used for smtp delivery */ extern uschar *client_authenticated_id; /* "login" name used for SMTP AUTH */ diff --git a/src/src/macros.h b/src/src/macros.h index dbc49f01e..f567c7ec2 100644 --- a/src/src/macros.h +++ b/src/src/macros.h @@ -320,6 +320,13 @@ for having to swallow the rest of an SMTP message is whether the value is #define END_NOTENDED 3 /* Message reading not yet ended */ #define END_SIZE 4 /* Reading ended because message too big */ #define END_WERROR 5 /* Write error while reading the message */ +#define END_PROTOCOL 6 /* Protocol error in CHUNKING sequence */ + +/* result codes for bdat_getc() (which can also return EOF) */ + +#define EOD (-2) +#define ERR (-3) + /* Bit masks for debug and log selectors */ diff --git a/src/src/receive.c b/src/src/receive.c index f6bdf4742..9ff339d39 100644 --- a/src/src/receive.c +++ b/src/src/receive.c @@ -770,16 +770,13 @@ Arguments: Returns: One of the END_xxx values indicating why it stopped reading */ -/*XXX CHUNKING: maybe a variant routing specialised for BDAT, assuming -string RFC compliance ie. CRLF always? We still have to strip the CR -but we are not dealing with variant lunacy or looking for the end-dot */ static int read_message_data_smtp(FILE *fout) { int ch_state = 0; int ch; -register int linelength = 0; +int linelength = 0; while ((ch = (receive_getc)()) != EOF) { @@ -869,7 +866,7 @@ while ((ch = (receive_getc)()) != EOF) message_size++; linelength++; - if (fout != NULL) + if (fout) { if (fputc(ch, fout) == EOF) return END_WERROR; if (message_size > thismessage_size_limit) return END_SIZE; @@ -878,7 +875,7 @@ while ((ch = (receive_getc)()) != EOF) (void) cutthrough_put_nl(); else { - uschar c= ch; + uschar c = ch; (void) cutthrough_puts(&c, 1); } } @@ -892,6 +889,63 @@ return END_EOF; +/* Variant of the above read_message_data_smtp() specialised for RFC 3030 +CHUNKING. We assume that the incoming has proper CRLF, so only have to scan +for and strip CR. On the downside there are more protocol reasons to stop. + +Arguments: + fout a FILE to which to write the message; NULL if skipping + +Returns: One of the END_xxx values indicating why it stopped reading +*/ + +static int +read_message_bdat_smtp(FILE *fout) +{ +int ch; +int linelength = 0; + +for (;;) switch (ch = bdat_getc()) + { + case EOF: return END_EOF; + case EOD: return END_DOT; + case ERR: return END_PROTOCOL; + + case '\r': + body_linecount++; + if (linelength > max_received_linelength) + max_received_linelength = linelength; + linelength = -1; + break; + + case 0: + body_zerocount++; + /*FALLTHROUGH*/ + default: + message_size++; + linelength++; + if (fout) + { + if (fputc(ch, fout) == EOF) return END_WERROR; + if (message_size > thismessage_size_limit) return END_SIZE; + } +#ifdef notyet + if(ch == '\n') + (void) cutthrough_put_nl(); + else + { + uschar c = ch; + (void) cutthrough_puts(&c, 1); + } +#endif + break; + } +/*NOTREACHED*/ +} + + + + /************************************************* * Swallow SMTP message * *************************************************/ @@ -908,6 +962,7 @@ Returns: nothing void receive_swallow_smtp(void) { +/*XXX CHUNKING: not enough. read chunks until RSET? */ if (message_ended >= END_NOTENDED) message_ended = read_message_data_smtp(NULL); } @@ -1616,7 +1671,6 @@ next->text. */ for (;;) { -/*XXX CHUNKING: account for BDAT size & last, and do more chunks as needed */ int ch = (receive_getc)(); /* If we hit EOF on a SMTP connection, it's an error, since incoming @@ -2835,7 +2889,14 @@ if (filter_test != FTEST_NONE) return message_ended == END_DOT; } -/*XXX CHUNKING: need to cancel cutthrough under BDAT, for now */ +/*XXX CHUNKING: need to cancel cutthrough under BDAT, for now. In future, +think more if it could be handled. Cannot do onward CHUNKING unless +inbound is, but inbound chunking ought to be ok with outbound plain. +Could we do onward CHUNKING given inbound CHUNKING? +*/ +if (chunking_state > CHUNKING_OFFERED) + cancel_cutthrough_connection("chunking active"); + /* Cutthrough delivery: We have to create the Received header now rather than at the end of reception, so the timestamp behaviour is a change to the normal case. @@ -2933,8 +2994,9 @@ if (!ferror(data_file) && !(receive_feof)() && message_ended != END_DOT) { if (smtp_input) { -/*XXX CHUNKING: main data read, for message body */ - message_ended = read_message_data_smtp(data_file); + message_ended = chunking_state > CHUNKING_OFFERED + ? read_message_bdat_smtp(data_file) + : read_message_data_smtp(data_file); receive_linecount++; /* The terminating "." line */ } else message_ended = read_message_data(data_file); @@ -2942,51 +3004,64 @@ if (!ferror(data_file) && !(receive_feof)() && message_ended != END_DOT) receive_linecount += body_linecount; /* For BSMTP errors mainly */ message_linecount += body_linecount; - /* Handle premature termination of SMTP */ - - if (smtp_input && message_ended == END_EOF) + switch (message_ended) { - Uunlink(spool_name); /* Lose data file when closed */ - cancel_cutthrough_connection("sender closed connection"); - message_id[0] = 0; /* Indicate no message accepted */ - smtp_reply = handle_lost_connection(US""); - smtp_yield = FALSE; - goto TIDYUP; /* Skip to end of function */ - } + /* Handle premature termination of SMTP */ - /* Handle message that is too big. Don't use host_or_ident() in the log - message; we want to see the ident value even for non-remote messages. */ + case END_EOF: + if (smtp_input) + { + Uunlink(spool_name); /* Lose data file when closed */ + cancel_cutthrough_connection("sender closed connection"); + message_id[0] = 0; /* Indicate no message accepted */ + smtp_reply = handle_lost_connection(US""); + smtp_yield = FALSE; + goto TIDYUP; /* Skip to end of function */ + } + break; - if (message_ended == END_SIZE) - { - Uunlink(spool_name); /* Lose the data file when closed */ - cancel_cutthrough_connection("mail too big"); - if (smtp_input) receive_swallow_smtp(); /* Swallow incoming SMTP */ + /* Handle message that is too big. Don't use host_or_ident() in the log + message; we want to see the ident value even for non-remote messages. */ - log_write(L_size_reject, LOG_MAIN|LOG_REJECT, "rejected from <%s>%s%s%s%s: " - "message too big: read=%d max=%d", - sender_address, - (sender_fullhost == NULL)? "" : " H=", - (sender_fullhost == NULL)? US"" : sender_fullhost, - (sender_ident == NULL)? "" : " U=", - (sender_ident == NULL)? US"" : sender_ident, - message_size, - thismessage_size_limit); + case END_SIZE: + Uunlink(spool_name); /* Lose the data file when closed */ + cancel_cutthrough_connection("mail too big"); + if (smtp_input) receive_swallow_smtp(); /* Swallow incoming SMTP */ - if (smtp_input) - { - smtp_reply = US"552 Message size exceeds maximum permitted"; - message_id[0] = 0; /* Indicate no message accepted */ - goto TIDYUP; /* Skip to end of function */ - } - else - { - fseek(data_file, (long int)SPOOL_DATA_START_OFFSET, SEEK_SET); - give_local_error(ERRMESS_TOOBIG, - string_sprintf("message too big (max=%d)", thismessage_size_limit), - US"message rejected: ", error_rc, data_file, header_list); - /* Does not return */ - } + log_write(L_size_reject, LOG_MAIN|LOG_REJECT, "rejected from <%s>%s%s%s%s: " + "message too big: read=%d max=%d", + sender_address, + (sender_fullhost == NULL)? "" : " H=", + (sender_fullhost == NULL)? US"" : sender_fullhost, + (sender_ident == NULL)? "" : " U=", + (sender_ident == NULL)? US"" : sender_ident, + message_size, + thismessage_size_limit); + + if (smtp_input) + { + smtp_reply = US"552 Message size exceeds maximum permitted"; + message_id[0] = 0; /* Indicate no message accepted */ + goto TIDYUP; /* Skip to end of function */ + } + else + { + fseek(data_file, (long int)SPOOL_DATA_START_OFFSET, SEEK_SET); + give_local_error(ERRMESS_TOOBIG, + string_sprintf("message too big (max=%d)", thismessage_size_limit), + US"message rejected: ", error_rc, data_file, header_list); + /* Does not return */ + } + break; + + /* Handle bad BDAT protocol sequence */ + + case END_PROTOCOL: + Uunlink(spool_name); /* Lose the data file when closed */ + cancel_cutthrough_connection("sender protocol error"); + smtp_reply = US""; /* Response already sent */ + message_id[0] = 0; /* Indicate no message accepted */ + goto TIDYUP; /* Skip to end of function */ } } @@ -3169,9 +3244,8 @@ user_msg = NULL; enable_dollar_recipients = TRUE; if (recipients_count == 0) - { - blackholed_by = recipients_discarded? US"MAIL ACL" : US"RCPT ACL"; - } + blackholed_by = recipients_discarded ? US"MAIL ACL" : US"RCPT ACL"; + else { /* Handle interactive SMTP messages */ @@ -3187,18 +3261,15 @@ else dkim_exim_verify_finish(); /* Check if we must run the DKIM ACL */ - if ((acl_smtp_dkim != NULL) && - (dkim_verify_signers != NULL) && - (dkim_verify_signers[0] != '\0')) + if (acl_smtp_dkim && dkim_verify_signers && *dkim_verify_signers) { uschar *dkim_verify_signers_expanded = expand_string(dkim_verify_signers); - if (dkim_verify_signers_expanded == NULL) - { + if (!dkim_verify_signers_expanded) log_write(0, LOG_MAIN|LOG_PANIC, "expansion of dkim_verify_signers option failed: %s", expand_string_message); - } + else { int sep = 0; @@ -3207,28 +3278,23 @@ else uschar *seen_items = NULL; int seen_items_size = 0; int seen_items_offset = 0; - uschar itembuf[256]; /* Default to OK when no items are present */ rc = OK; - while ((item = string_nextinlist(&ptr, &sep, - itembuf, - sizeof(itembuf)))) + while ((item = string_nextinlist(&ptr, &sep, NULL, 0))) { /* Prevent running ACL for an empty item */ - if (!item || (item[0] == '\0')) continue; + if (!item || !*item) continue; /* Only run ACL once for each domain or identity, no matter how often it appears in the expanded list. */ if (seen_items) { uschar *seen_item = NULL; - uschar seen_item_buf[256]; const uschar *seen_items_list = seen_items; BOOL seen_this_item = FALSE; while ((seen_item = string_nextinlist(&seen_items_list, &sep, - seen_item_buf, - sizeof(seen_item_buf)))) + NULL, 0))) if (Ustrcmp(seen_item,item) == 0) { seen_this_item = TRUE; @@ -3787,7 +3853,7 @@ if (sender_host_authenticated) #ifndef DISABLE_PRDR if (prdr_requested) - s = string_append(s, &size, &sptr, 1, US" PRDR"); + s = string_catn(s, &size, &sptr, US" PRDR", 5); #endif #ifdef SUPPORT_PROXY @@ -3795,6 +3861,9 @@ if (proxy_session && LOGGING(proxy)) s = string_append(s, &size, &sptr, 2, US" PRX=", proxy_local_address); #endif +if (chunking_state > CHUNKING_OFFERED) + s = string_catn(s, &size, &sptr, US" K", 2); + sprintf(CS big_buffer, "%d", msg_size); s = string_append(s, &size, &sptr, 2, US" S=", big_buffer); @@ -4093,8 +4162,15 @@ if (smtp_input) /* Default OK response */ + else if (chunking_state > CHUNKING_OFFERED) + { + smtp_printf("250- %u byte chunk, total %d\r\n250 OK id=%s\r\n", + chunking_datasize, message_size+message_linecount, message_id); + chunking_state = CHUNKING_OFFERED; + } else smtp_printf("250 OK id=%s\r\n", message_id); + if (host_checking) fprintf(stdout, "\n**** SMTP testing: that is not a real message id!\n\n"); diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index b00537eb5..d4b3e565a 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -291,6 +291,13 @@ static int smtp_had_eof; static int smtp_had_error; +/* forward declarations */ +int bdat_ungetc(int ch); +static int smtp_read_command(BOOL check_sync); +static int synprot_error(int type, int code, uschar *data, uschar *errmess); +static void smtp_quit_handler(uschar **, uschar **); +static void smtp_rset_handler(void); + /************************************************* * SMTP version of getc() * *************************************************/ @@ -339,6 +346,118 @@ return *smtp_inptr++; +/* Get a byte from the smtp input, in CHUNKING mode. Handle ack of the +previous BDAT chunk and getting new ones when we run out. Uses the +underlying smtp_getc or tls_getc both for that and for getting the +(buffered) data byte. EOD signals (an expected) no further data. +ERR signals a protocol error, and EOF a closed input stream. + +Called from read_bdat_smtp() in receive.c for the message body, but also +by the headers read loop in receive_msg(); manipulates chunking_state +to handle the BDAT command/response. +Placed here due to the correlation with the above smtp_getc(), which it wraps, +and also by the need to do smtp command/response handling. + +Arguments: none +Returns: the next character or ERR, EOD or EOF +*/ + +int +bdat_getc(void) +{ +uschar * user_msg = NULL; +uschar * log_msg; + +for(;;) + { + if (chunking_data_left-- > 0) + return lwr_receive_getc(); + + receive_getc = lwr_receive_getc; + receive_ungetc = lwr_receive_ungetc; + + /* If not the last, ack the received chunk. The last response is delayed + until after the data ACL decides on it */ + /*XXX find that "last response" and append the chunk size */ + + if (chunking_state == CHUNKING_LAST) + return EOD; + + chunking_state = CHUNKING_OFFERED; + smtp_printf("250 %u byte chunk received\r\n", chunking_datasize); + + /* Expect another BDAT cmd from input. RFC 3030 says nothing about + QUIT, RSET or NOOP but handling them seems obvious */ + +next_cmd: + switch(smtp_read_command(TRUE)) + { + default: + (void) synprot_error(L_smtp_protocol_error, 503, NULL, + US"only BDAT permissible after non-LAST BDAT"); + + repeat_until_rset: + switch(smtp_read_command(TRUE)) + { + case QUIT_CMD: smtp_quit_handler(&user_msg, &log_msg); /*FALLTHROUGH */ + case EOF_CMD: return EOF; + case RSET_CMD: smtp_rset_handler(); return ERR; + default: if (synprot_error(L_smtp_protocol_error, 503, NULL, + US"only RSET accepted now") > 0) + return EOF; + goto repeat_until_rset; + } + + case QUIT_CMD: + smtp_quit_handler(&user_msg, &log_msg); + /*FALLTHROUGH*/ + case EOF_CMD: + return EOF; + + case RSET_CMD: + smtp_rset_handler(); + return ERR; + + case NOOP_CMD: + HAD(SCH_NOOP); + smtp_printf("250 OK\r\n"); + goto next_cmd; + + case BDAT_CMD: + { + int n; + + if (sscanf(CS smtp_cmd_data, "%u %n", &chunking_datasize, &n) < 1) + { + (void) synprot_error(L_smtp_protocol_error, 501, NULL, + US"missing size for BDAT command"); + return ERR; + } + chunking_state = strcmpic(smtp_cmd_data+n, US"LAST") == 0 + ? CHUNKING_LAST : CHUNKING_ACTIVE; + chunking_data_left = chunking_datasize; + + if (chunking_datasize == 0) + if (chunking_state == CHUNKING_LAST) + return EOD; + else + { + (void) synprot_error(L_smtp_protocol_error, 504, NULL, + US"zero size for BDAT command"); + goto repeat_until_rset; + } + + receive_getc = bdat_getc; + receive_ungetc = bdat_ungetc; + break; /* to top of main loop */ + } + } + } +} + + + + /************************************************* * SMTP version of ungetc() * *************************************************/ @@ -355,11 +474,18 @@ Returns: the character int smtp_ungetc(int ch) { -*(--smtp_inptr) = ch; +*--smtp_inptr = ch; return ch; } +int +bdat_ungetc(int ch) +{ +chunking_data_left++; +return lwr_receive_ungetc(ch); +} + /************************************************* @@ -1527,7 +1653,6 @@ authenticated_sender = NULL; bmi_run = 0; bmi_verdicts = NULL; #endif -chunking_state = CHUNKING_NOT_OFFERED; #ifndef DISABLE_DKIM dkim_signers = NULL; dkim_disable_verify = FALSE; @@ -3239,6 +3364,43 @@ return 0; +static void +smtp_quit_handler(uschar ** user_msgp, uschar ** log_msgp) +{ +HAD(SCH_QUIT); +incomplete_transaction_log(US"QUIT"); +if (acl_smtp_quit != NULL) + { + int rc = acl_check(ACL_WHERE_QUIT, NULL, acl_smtp_quit, user_msgp, log_msgp); + if (rc == ERROR) + log_write(0, LOG_MAIN|LOG_PANIC, "ACL for QUIT returned ERROR: %s", + *log_msgp); + } +if (*user_msgp) + smtp_respond(US"221", 3, TRUE, *user_msgp); +else + smtp_printf("221 %s closing connection\r\n", smtp_active_hostname); + +#ifdef SUPPORT_TLS +tls_close(TRUE, TRUE); +#endif + +log_write(L_smtp_connection, LOG_MAIN, "%s closed by QUIT", + smtp_get_connection_info()); +} + + +static void +smtp_rset_handler(void) +{ +HAD(SCH_RSET); +incomplete_transaction_log(US"RSET"); +smtp_printf("250 Reset OK\r\n"); +cmd_list[CMD_LIST_RSET].is_mail_cmd = FALSE; +} + + + /************************************************* * Initialize for SMTP incoming message * *************************************************/ @@ -3285,6 +3447,8 @@ for the host). Note: we do NOT reset AUTH at this point. */ smtp_reset(reset_point); message_ended = END_NOTSTARTED; +chunking_state = chunking_offered ? CHUNKING_OFFERED : CHUNKING_NOT_OFFERED; + cmd_list[CMD_LIST_RSET].is_mail_cmd = TRUE; cmd_list[CMD_LIST_HELO].is_mail_cmd = TRUE; cmd_list[CMD_LIST_EHLO].is_mail_cmd = TRUE; @@ -3775,6 +3939,7 @@ while (done <= 0) { s = string_catn(s, &size, &ptr, smtp_code, 3); s = string_catn(s, &size, &ptr, US"-CHUNKING\r\n", 11); + chunking_offered = TRUE; chunking_state = CHUNKING_OFFERED; } @@ -4546,12 +4711,18 @@ while (done <= 0) if (sscanf(CS smtp_cmd_data, "%u %n", &chunking_datasize, &n) < 1) { - done = synprot_error(L_smtp_protocol_error, 503, NULL, + done = synprot_error(L_smtp_protocol_error, 501, NULL, US"missing size for BDAT command"); break; } chunking_state = strcmpic(smtp_cmd_data+n, US"LAST") == 0 ? CHUNKING_LAST : CHUNKING_ACTIVE; + chunking_data_left = chunking_datasize; + + lwr_receive_getc = receive_getc; + lwr_receive_ungetc = receive_ungetc; + receive_getc = bdat_getc; + receive_ungetc = bdat_ungetc; DEBUG(D_any) debug_printf("chunking state %d\n", (int)chunking_state); @@ -4594,45 +4765,45 @@ while (done <= 0) break; } - /* No go-ahead output for BDAT */ - - if (smtp_connection_had[smtp_ch_index-1] == SCH_BDAT) - { + if (chunking_state > CHUNKING_OFFERED) + { /* No predata ACL or go-ahead output for BDAT */ rc = OK; - break; } - - /* If there is an ACL, re-check the synchronization afterwards, since the - ACL may have delayed. To handle cutthrough delivery enforce a dummy call - to get the DATA command sent. */ - - if (acl_smtp_predata == NULL && cutthrough.fd < 0) - rc = OK; else { - uschar * acl= acl_smtp_predata ? acl_smtp_predata : US"accept"; - enable_dollar_recipients = TRUE; - rc = acl_check(ACL_WHERE_PREDATA, NULL, acl, &user_msg, - &log_msg); - enable_dollar_recipients = FALSE; - if (rc == OK && !check_sync()) goto SYNC_FAILURE; - } + /* If there is an ACL, re-check the synchronization afterwards, since the + ACL may have delayed. To handle cutthrough delivery enforce a dummy call + to get the DATA command sent. */ - if (rc == OK) - { - uschar * code; - code = US"354"; - if (user_msg == NULL) - smtp_printf("%s Enter message, ending with \".\" on a line by itself\r\n", code); - else smtp_user_msg(code, user_msg); - done = 3; - message_ended = END_NOTENDED; /* Indicate in middle of data */ + if (acl_smtp_predata == NULL && cutthrough.fd < 0) + rc = OK; + else + { + uschar * acl = acl_smtp_predata ? acl_smtp_predata : US"accept"; + enable_dollar_recipients = TRUE; + rc = acl_check(ACL_WHERE_PREDATA, NULL, acl, &user_msg, + &log_msg); + enable_dollar_recipients = FALSE; + if (rc == OK && !check_sync()) + goto SYNC_FAILURE; + + if (rc != OK) + { /* Either the ACL failed the address, or it was deferred. */ + done = smtp_handle_acl_fail(ACL_WHERE_PREDATA, rc, user_msg, log_msg); + break; + } + } + + if (user_msg) + smtp_user_msg(US"354", user_msg); + else + smtp_printf( + "354 Enter message, ending with \".\" on a line by itself\r\n"); } - /* Either the ACL failed the address, or it was deferred. */ + done = 3; + message_ended = END_NOTENDED; /* Indicate in middle of data */ - else - done = smtp_handle_acl_fail(ACL_WHERE_PREDATA, rc, user_msg, log_msg); break; @@ -4868,37 +5039,15 @@ while (done <= 0) message. */ case QUIT_CMD: - HAD(SCH_QUIT); - incomplete_transaction_log(US"QUIT"); - if (acl_smtp_quit != NULL) - { - rc = acl_check(ACL_WHERE_QUIT, NULL, acl_smtp_quit, &user_msg, &log_msg); - if (rc == ERROR) - log_write(0, LOG_MAIN|LOG_PANIC, "ACL for QUIT returned ERROR: %s", - log_msg); - } - if (user_msg == NULL) - smtp_printf("221 %s closing connection\r\n", smtp_active_hostname); - else - smtp_respond(US"221", 3, TRUE, user_msg); - - #ifdef SUPPORT_TLS - tls_close(TRUE, TRUE); - #endif - + smtp_quit_handler(&user_msg, &log_msg); done = 2; - log_write(L_smtp_connection, LOG_MAIN, "%s closed by QUIT", - smtp_get_connection_info()); break; case RSET_CMD: - HAD(SCH_RSET); - incomplete_transaction_log(US"RSET"); + smtp_rset_handler(); smtp_reset(reset_point); toomany = FALSE; - smtp_printf("250 Reset OK\r\n"); - cmd_list[CMD_LIST_RSET].is_mail_cmd = FALSE; break; @@ -4925,7 +5074,7 @@ while (done <= 0) verify_check_host(&tls_advertise_hosts) != FAIL) Ustrcat(buffer, " STARTTLS"); #endif - Ustrcat(buffer, " HELO EHLO MAIL RCPT DATA"); + Ustrcat(buffer, " HELO EHLO MAIL RCPT DATA BDAT"); Ustrcat(buffer, " NOOP QUIT RSET HELP"); if (acl_smtp_etrn != NULL) Ustrcat(buffer, " ETRN"); if (acl_smtp_expn != NULL) Ustrcat(buffer, " EXPN"); diff --git a/src/src/structs.h b/src/src/structs.h index 2b449a648..b49f4b574 100644 --- a/src/src/structs.h +++ b/src/src/structs.h @@ -51,7 +51,10 @@ typedef struct ugid_block { BOOL initgroups; } ugid_block; -typedef enum {CHUNKING_NOT_OFFERED, CHUNKING_OFFERED, CHUNKING_ACTIVE, CHUNKING_LAST} chunking_state_t; +typedef enum { CHUNKING_NOT_OFFERED = -1, + CHUNKING_OFFERED, + CHUNKING_ACTIVE, + CHUNKING_LAST} chunking_state_t; /* Structure for holding information about a host for use mainly by routers, but also used when checking lists of hosts and when transporting. Looking up diff --git a/test/confs/0900 b/test/confs/0900 new file mode 100644 index 000000000..4a014cee1 --- /dev/null +++ b/test/confs/0900 @@ -0,0 +1,71 @@ +# Exim test configuration 0900 + +exim_path = EXIM_PATH +keep_environment = +host_lookup_order = bydns +spool_directory = DIR/spool +log_file_path = DIR/spool/log/SERVER%slog +gecos_pattern = "" +gecos_name = CALLER_NAME +chunking_advertise_hosts = * +tls_advertise_hosts = + + +# ----- Main settings ----- + +domainlist local_domains = @ + +acl_smtp_rcpt = check_recipient +acl_smtp_data = check_data +message_id_header_domain = ${if eq{0}{0}{some.domain}} +message_id_header_text = ${if eq{0}{0}{a@b[c]}} +trusted_users = CALLER +queue_only +smtp_receive_timeout = 2s + + +# ----- ACL ----- + +begin acl + +check_recipient: + accept hosts = : + accept domains = +local_domains + deny message = relay not permitted + +check_data: + warn message = X-acl-message-linecount: $message_linecount + accept + + +# ----- Routers ----- + +begin routers + +fail_remote_domains: + driver = redirect + domains = ! +local_domains + data = :fail: unrouteable mail domain "$domain" + +localuser: + driver = accept + check_local_user + transport = local_delivery + headers_add = X-local-user: uid=$local_user_uid gid=$local_user_gid + + +# ----- Transports ----- + +begin transports + +local_delivery: + driver = appendfile + delivery_date_add + envelope_to_add + file = DIR/test-mail/$local_part + headers_add = "X-body-linecount: $body_linecount\n\ + X-message-linecount: $message_linecount\n\ + X-received-count: $received_count" + return_path_add + +# End diff --git a/test/log/0900 b/test/log/0900 new file mode 100644 index 000000000..37d70da7c --- /dev/null +++ b/test/log/0900 @@ -0,0 +1,9 @@ + +******** SERVER ******** +1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 +1999-03-02 09:44:33 10HmaX-0005vi-00 <= someone@some.domain H=(tester) [127.0.0.1] P=esmtp K S=sss +1999-03-02 09:44:33 10HmaY-0005vi-00 <= someone@some.domain H=(tester) [127.0.0.1] P=esmtp K S=sss +1999-03-02 09:44:33 10HmaZ-0005vi-00 <= someone@some.domain H=(tester) [127.0.0.1] P=esmtp K S=sss +1999-03-02 09:44:33 10HmbA-0005vi-00 SMTP data timeout (message abandoned) on connection from (tester) [127.0.0.1] F= +1999-03-02 09:44:33 SMTP connection from (tester) [127.0.0.1] lost while reading message data +1999-03-02 09:44:33 SMTP connection from (tester) [127.0.0.1] lost while reading message data diff --git a/test/scripts/0000-Basic/0900 b/test/scripts/0000-Basic/0900 new file mode 100644 index 000000000..cb8cf63e3 --- /dev/null +++ b/test/scripts/0000-Basic/0900 @@ -0,0 +1,170 @@ +# CHUNKING reception +exim -DSERVER=server -bd -oX PORT_D +**** +# +client 127.0.0.1 PORT_D +??? 220 +ehlo tester +??? 250- +??? 250- +??? 250- +??? 250- +??? 250-CHUNKING +??? 250 HELP +mail from:someone@some.domain +??? 250 +rcpt to:CALLER@HOSTNAME +??? 250 +bdat 88 last +To: Susan@random.com +From: Sam@random.com +Subject: This is a bodyless test message + +??? 250- +??? 250 +quit +??? 221 +**** +# +client 127.0.0.1 PORT_D +??? 220 +ehlo tester +??? 250- +??? 250- +??? 250- +??? 250- +??? 250- +??? 250 +mail from:someone@some.domain +??? 250 +rcpt to:CALLER@HOSTNAME +??? 250 +bdat 100 +To: Susan@random.com +From: Sam@random.com +Subject: This is a bodyfull test message + +1234567890 +??? 250 +noop +??? 250 +bdat 0 last +??? 250- +??? 250 +mail from:someone@some.domain +??? 250 +rcpt to:CALLER@HOSTNAME +??? 250 +bdat 10 +To: Susan@bdat 78 last +??? 250 +random.com +From: Sam@random.com +Subject: This is a bodyless test message + +??? 250- +??? 250 +quit +??? 221 +**** +# +# not enough data in chunk +# +client 127.0.0.1 PORT_D +??? 220 +ehlo tester +??? 250- +??? 250- +??? 250- +??? 250- +??? 250- +??? 250 +mail from:someone@some.domain +??? 250 +rcpt to:CALLER@HOSTNAME +??? 250 +bdat 89 last +To: Susan@random.com +From: Sam@random.com +Subject: This is a bodyless test message + +??? 421 +**** +# +# protocol failure cases +# +client 127.0.0.1 PORT_D +??? 220 +ehlo tester +??? 250- +??? 250- +??? 250- +??? 250- +??? 250- +??? 250 +mail from:someone@some.domain +??? 250 +rcpt to:CALLER@HOSTNAME +??? 250 +bdat 88 +To: Susan@random.com +From: Sam@random.com +Subject: This is a bodyless test message + +??? 250 +bdat 0 +??? 504 +quit +??? 221 +**** +# +client 127.0.0.1 PORT_D +??? 220 +ehlo tester +??? 250- +??? 250- +??? 250- +??? 250- +??? 250- +??? 250 +mail from:someone@some.domain +??? 250 +rcpt to:CALLER@HOSTNAME +??? 250 +bdat 88 +To: Susan@random.com +From: Sam@random.com +Subject: This is a bodyless test message + +??? 250 +data +??? 503 +RSET +??? 250 +EHLO tester +??? 250- +??? 250- +??? 250- +??? 250- +??? 250- +??? 250 +mail from:someone@some.domain +??? 250 +rcpt to:CALLER@HOSTNAME +??? 250 +bdat 88 +To: Susan@random.com +From: Sam@random.com +Subject: This is a bodyless test message + +??? 250 +data +??? 503 +data +??? 503 +quit +??? 221 +**** +# +killdaemon +no_msglog_check diff --git a/test/stdout/0900 b/test/stdout/0900 new file mode 100644 index 000000000..24c591617 --- /dev/null +++ b/test/stdout/0900 @@ -0,0 +1,232 @@ +Connecting to 127.0.0.1 port 1225 ... connected +??? 220 +<<< 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +>>> ehlo tester +??? 250- +<<< 250-the.local.host.name Hello tester [127.0.0.1] +??? 250- +<<< 250-SIZE 52428800 +??? 250- +<<< 250-8BITMIME +??? 250- +<<< 250-PIPELINING +??? 250-CHUNKING +<<< 250-CHUNKING +??? 250 HELP +<<< 250 HELP +>>> mail from:someone@some.domain +??? 250 +<<< 250 OK +>>> rcpt to:CALLER@the.local.host.name +??? 250 +<<< 250 Accepted +>>> bdat 88 last +>>> To: Susan@random.com +>>> From: Sam@random.com +>>> Subject: This is a bodyless test message +>>> +??? 250- +<<< 250- 88 byte chunk, total 88 +??? 250 +<<< 250 OK id=10HmaX-0005vi-00 +>>> quit +??? 221 +<<< 221 the.local.host.name closing connection +End of script +Connecting to 127.0.0.1 port 1225 ... connected +??? 220 +<<< 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +>>> ehlo tester +??? 250- +<<< 250-the.local.host.name Hello tester [127.0.0.1] +??? 250- +<<< 250-SIZE 52428800 +??? 250- +<<< 250-8BITMIME +??? 250- +<<< 250-PIPELINING +??? 250- +<<< 250-CHUNKING +??? 250 +<<< 250 HELP +>>> mail from:someone@some.domain +??? 250 +<<< 250 OK +>>> rcpt to:CALLER@the.local.host.name +??? 250 +<<< 250 Accepted +>>> bdat 100 +>>> To: Susan@random.com +>>> From: Sam@random.com +>>> Subject: This is a bodyfull test message +>>> +>>> 1234567890 +??? 250 +<<< 250 100 byte chunk received +>>> noop +??? 250 +<<< 250 OK +>>> bdat 0 last +??? 250- +<<< 250- 0 byte chunk, total 100 +??? 250 +<<< 250 OK id=10HmaY-0005vi-00 +>>> mail from:someone@some.domain +??? 250 +<<< 250 OK +>>> rcpt to:CALLER@the.local.host.name +??? 250 +<<< 250 Accepted +>>> bdat 10 +>>> To: Susan@bdat 78 last +??? 250 +<<< 250 10 byte chunk received +>>> random.com +>>> From: Sam@random.com +>>> Subject: This is a bodyless test message +>>> +??? 250- +<<< 250- 78 byte chunk, total 88 +??? 250 +<<< 250 OK id=10HmaZ-0005vi-00 +>>> quit +??? 221 +<<< 221 the.local.host.name closing connection +End of script +Connecting to 127.0.0.1 port 1225 ... connected +??? 220 +<<< 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +>>> ehlo tester +??? 250- +<<< 250-the.local.host.name Hello tester [127.0.0.1] +??? 250- +<<< 250-SIZE 52428800 +??? 250- +<<< 250-8BITMIME +??? 250- +<<< 250-PIPELINING +??? 250- +<<< 250-CHUNKING +??? 250 +<<< 250 HELP +>>> mail from:someone@some.domain +??? 250 +<<< 250 OK +>>> rcpt to:CALLER@the.local.host.name +??? 250 +<<< 250 Accepted +>>> bdat 89 last +>>> To: Susan@random.com +>>> From: Sam@random.com +>>> Subject: This is a bodyless test message +>>> +??? 421 +<<< 421 the.local.host.name SMTP incoming data timeout - closing connection. +End of script +Connecting to 127.0.0.1 port 1225 ... connected +??? 220 +<<< 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +>>> ehlo tester +??? 250- +<<< 250-the.local.host.name Hello tester [127.0.0.1] +??? 250- +<<< 250-SIZE 52428800 +??? 250- +<<< 250-8BITMIME +??? 250- +<<< 250-PIPELINING +??? 250- +<<< 250-CHUNKING +??? 250 +<<< 250 HELP +>>> mail from:someone@some.domain +??? 250 +<<< 250 OK +>>> rcpt to:CALLER@the.local.host.name +??? 250 +<<< 250 Accepted +>>> bdat 88 +>>> To: Susan@random.com +>>> From: Sam@random.com +>>> Subject: This is a bodyless test message +>>> +??? 250 +<<< 250 88 byte chunk received +>>> bdat 0 +??? 504 +<<< 504 zero size for BDAT command +>>> quit +??? 221 +<<< 221 the.local.host.name closing connection +End of script +Connecting to 127.0.0.1 port 1225 ... connected +??? 220 +<<< 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +>>> ehlo tester +??? 250- +<<< 250-the.local.host.name Hello tester [127.0.0.1] +??? 250- +<<< 250-SIZE 52428800 +??? 250- +<<< 250-8BITMIME +??? 250- +<<< 250-PIPELINING +??? 250- +<<< 250-CHUNKING +??? 250 +<<< 250 HELP +>>> mail from:someone@some.domain +??? 250 +<<< 250 OK +>>> rcpt to:CALLER@the.local.host.name +??? 250 +<<< 250 Accepted +>>> bdat 88 +>>> To: Susan@random.com +>>> From: Sam@random.com +>>> Subject: This is a bodyless test message +>>> +??? 250 +<<< 250 88 byte chunk received +>>> data +??? 503 +<<< 503 only BDAT permissible after non-LAST BDAT +>>> RSET +??? 250 +<<< 250 Reset OK +>>> EHLO tester +??? 250- +<<< 250-the.local.host.name Hello tester [127.0.0.1] +??? 250- +<<< 250-SIZE 52428800 +??? 250- +<<< 250-8BITMIME +??? 250- +<<< 250-PIPELINING +??? 250- +<<< 250-CHUNKING +??? 250 +<<< 250 HELP +>>> mail from:someone@some.domain +??? 250 +<<< 250 OK +>>> rcpt to:CALLER@the.local.host.name +??? 250 +<<< 250 Accepted +>>> bdat 88 +>>> To: Susan@random.com +>>> From: Sam@random.com +>>> Subject: This is a bodyless test message +>>> +??? 250 +<<< 250 88 byte chunk received +>>> data +??? 503 +<<< 503 only BDAT permissible after non-LAST BDAT +>>> data +??? 503 +<<< 503 only RSET accepted now +>>> quit +??? 221 +<<< 221 the.local.host.name closing connection +End of script diff --git a/test/stdout/2122 b/test/stdout/2122 index 76433323a..55feb8f41 100644 --- a/test/stdout/2122 +++ b/test/stdout/2122 @@ -37,7 +37,7 @@ Succeeded in starting TLS ??? 214- <<< 214-Commands supported: ??? 214 -<<< 214 AUTH HELO EHLO MAIL RCPT DATA NOOP QUIT RSET HELP +<<< 214 AUTH HELO EHLO MAIL RCPT DATA BDAT NOOP QUIT RSET HELP >>> quit ??? 221 <<< 221 myhost.test.ex closing connection -- cgit v1.2.3 From e027f545443fd6a5ec74c48c27dcd8b6634d5bba Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Sat, 30 Jul 2016 16:29:22 +0100 Subject: basic & pipelined transmit testcases --- src/src/receive.c | 3 +- src/src/structs.h | 9 +- src/src/transport.c | 47 ++- src/src/transports/smtp.c | 151 ++++--- test/confs/0900 | 21 +- test/confs/0901 | 1 + test/confs/0902 | 1 + test/log/0217 | 44 +- test/log/0218 | 2 +- test/log/0322 | 16 +- test/log/0495 | 8 +- test/log/0497 | 6 +- test/log/0552 | 6 +- test/log/0901 | 38 ++ test/log/0902 | 31 ++ test/log/2026 | 4 +- test/scripts/0000-Basic/0217 | 16 +- test/scripts/0000-Basic/0901 | 309 +++++++++++++++ test/scripts/0000-Basic/0902 | 925 +++++++++++++++++++++++++++++++++++++++++++ test/src/server.c | 32 ++ test/stderr/0218 | 2 +- test/stderr/0495 | 4 +- test/stdout/0217 | 30 +- test/stdout/0547 | 20 +- test/stdout/0572 | 1 + test/stdout/0901 | 199 ++++++++++ test/stdout/0902 | 140 +++++++ test/stdout/2022 | 2 +- 28 files changed, 1921 insertions(+), 147 deletions(-) create mode 120000 test/confs/0901 create mode 120000 test/confs/0902 create mode 100644 test/log/0901 create mode 100644 test/log/0902 create mode 100644 test/scripts/0000-Basic/0901 create mode 100644 test/scripts/0000-Basic/0902 create mode 100644 test/stdout/0901 create mode 100644 test/stdout/0902 (limited to 'test/stdout') diff --git a/src/src/receive.c b/src/src/receive.c index 9ff339d39..3b048252d 100644 --- a/src/src/receive.c +++ b/src/src/receive.c @@ -682,7 +682,8 @@ while ((ch = (receive_getc)()) != EOF) case 1: /* After written "\n" */ if (ch == '.') { ch_state = 3; continue; } if (ch == '\r') { ch_state = 2; continue; } - if (ch != '\n') ch_state = 0; else linelength = -1; + if (ch == '\n') { body_linecount++; linelength = -1; } + else ch_state = 0; break; case 2: diff --git a/src/src/structs.h b/src/src/structs.h index 2a6ca68ab..e378a16a2 100644 --- a/src/src/structs.h +++ b/src/src/structs.h @@ -225,9 +225,13 @@ typedef struct transport_info { /* smtp transport datachunk callback */ +#define tc_reap_prev BIT(0) /* Flags: reap previous SMTP cmd responses */ +#define tc_reap_one BIT(1) /* reap one SMTP response */ +#define tc_chunk_last BIT(2) /* annotate chunk SMTP cmd as LAST */ + struct transport_context; typedef int (*tpt_chunk_cmd_cb)(int fd, struct transport_context * tctx, - unsigned len, BOOL last); + unsigned len, unsigned flags); /* Structure for information about a delivery-in-progress */ @@ -246,8 +250,11 @@ typedef struct transport_context { struct address_item * first_addr; struct address_item **sync_addr; BOOL pending_MAIL; + BOOL pending_BDAT; + BOOL good_RCPT; BOOL * completed_address; int cmd_count; + uschar * buffer; } transport_ctx; diff --git a/src/src/transport.c b/src/src/transport.c index 8c81e8a9e..e55e81f2f 100644 --- a/src/src/transport.c +++ b/src/src/transport.c @@ -423,7 +423,7 @@ for (ptr = start; ptr < end; ptr++) from previous SMTP commands. */ if (tctx && tctx->options & topt_use_bdat && tctx->chunk_cb) - if (tctx->chunk_cb(fd, tctx, (unsigned)len, FALSE) != OK) + if (tctx->chunk_cb(fd, tctx, (unsigned)len, tc_reap_prev|tc_reap_one) != OK) return FALSE; if (!transport_write_block(fd, deliver_out_buffer, len)) @@ -843,8 +843,6 @@ static BOOL internal_transport_write_message(int fd, transport_ctx * tctx, int size_limit) { int len; -off_t fsize; -int size; /* Initialize pointer in output buffer. */ @@ -935,27 +933,51 @@ last BDAT, consisting of the current write_chunk() output buffer fill (optimally, all of the headers - but it does not matter if we already had to flush that buffer with non-last BDAT prependix) plus the amount of body data (as expanded for CRLF lines). Then create and write the BDAT, and ensure -that further use of write_chunk() will not prepend BDATs. */ +that further use of write_chunk() will not prepend BDATs. +The first BDAT written will also first flush any outstanding MAIL and RCPT +commands which were buffered thans to PIPELINING. +Commands go out (using a send()) from a different buffer to data (using a +write()). They might not end up in the same TCP segment, which is +suboptimal. */ if (tctx->options & topt_use_bdat) { - if ((size = chunk_ptr - deliver_out_buffer) < 0) - size = 0; + off_t fsize; + int hsize, size; + + if ((hsize = chunk_ptr - deliver_out_buffer) < 0) + hsize = 0; if (!(tctx->options & topt_no_body)) { if ((fsize = lseek(deliver_datafile, 0, SEEK_END)) < 0) return FALSE; fsize -= SPOOL_DATA_START_OFFSET; if (size_limit > 0 && fsize > size_limit) fsize = size_limit; - size += fsize; + size = hsize + fsize; if (tctx->options & topt_use_crlf) size += body_linecount; /* account for CRLF-expansion */ } - /*XXX CHUNKING: - Emit a LAST datachunk command. */ + /* If the message is large, emit first a non-LAST chunk with just the + headers, and reap the command responses. This lets us error out early + on RCPT rejects rather than sending megabytes of data. Include headers + on the assumption they are cheap enough and some clever implementations + might errorcheck them too, on-the-fly, and reject that chunk. */ + + if (size > DELIVER_OUT_BUFFER_SIZE && hsize > 0) + { + if ( tctx->chunk_cb(fd, tctx, hsize, 0) != OK + || !transport_write_block(fd, deliver_out_buffer, hsize) + || tctx->chunk_cb(fd, tctx, 0, tc_reap_prev) != OK + ) + return FALSE; + chunk_ptr = deliver_out_buffer; + size -= hsize; + } + + /* Emit a LAST datachunk command. */ - if (tctx->chunk_cb(fd, tctx, size, TRUE) != OK) + if (tctx->chunk_cb(fd, tctx, size, tc_chunk_last) != OK) return FALSE; tctx->options &= ~topt_use_bdat; @@ -969,14 +991,19 @@ it, applying the size limit if required. */ if (!(tctx->options & topt_no_body)) { + int size = size_limit; + nl_check_length = abs(nl_check_length); nl_partial_match = 0; if (lseek(deliver_datafile, SPOOL_DATA_START_OFFSET, SEEK_SET) < 0) return FALSE; while ( (len = MAX(DELIVER_IN_BUFFER_SIZE, size)) > 0 && (len = read(deliver_datafile, deliver_in_buffer, len)) > 0) + { if (!write_chunk(fd, tctx, deliver_in_buffer, len)) return FALSE; + size -= len; + } /* A read error on the body will have left len == -1 and errno set. */ diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index 58a59433d..00274656c 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -282,6 +282,7 @@ static uschar *rf_names[] = { US"NEVER", US"SUCCESS", US"FAILURE", US"DELAY" }; static uschar *smtp_command; /* Points to last cmd for error messages */ static uschar *mail_command; /* Points to MAIL cmd for error messages */ static BOOL update_waiting; /* TRUE to update the "wait" database */ +static BOOL pipelining_active; /* current transaction is in pipe mode */ /************************************************* @@ -510,13 +511,7 @@ static BOOL check_response(host_item *host, int *errno_value, int more_errno, uschar *buffer, int *yield, uschar **message, BOOL *pass_message) { -uschar *pl = US""; - -if (smtp_use_pipelining && - (Ustrcmp(smtp_command, "MAIL") == 0 || - Ustrcmp(smtp_command, "RCPT") == 0 || - Ustrcmp(smtp_command, "DATA") == 0)) - pl = US"pipelined "; +uschar * pl = pipelining_active ? US"pipelined " : US""; *yield = '4'; /* Default setting is to give a temporary error */ @@ -786,6 +781,7 @@ if (pending_MAIL) count--; if (!smtp_read_response(inblock, buffer, buffsize, '2', timeout)) { + DEBUG(D_transport) debug_printf("bad response for MAIL\n"); Ustrcpy(big_buffer, mail_command); /* Fits, because it came from there! */ if (errno == 0 && buffer[0] != 0) { @@ -1363,57 +1359,95 @@ return checks; /* Callback for emitting a BDAT data chunk header. -Flush any buffered SMTP commands first. -Reap SMTP command responses if not the BDAT LAST. -A nonlast request that is size zero is special-cased to only flush the -command buffer and reap all outstanding responses. +If given a nonzero size, first flush any buffered SMTP commands +then emit the command. + +Reap previous SMTP command responses if requested. +Reap one SMTP command response if requested. Returns: OK or ERROR */ static int smtp_chunk_cmd_callback(int fd, transport_ctx * tctx, - unsigned chunk_size, BOOL chunk_last) + unsigned chunk_size, unsigned flags) { smtp_transport_options_block * ob = (smtp_transport_options_block *)(tctx->tblock->options_block); -uschar buffer[128]; +int cmd_count = 0; +int prev_cmd_count; +uschar * buffer = tctx->buffer; -if ( (tctx->cmd_count = chunk_size == 0 && !chunk_last - /* Handle flush request */ - ? smtp_write_command(tctx->outblock, FALSE, NULL) +/* Write SMTP chunk header command */ - /* Write SMTP chunk header command */ - : smtp_write_command(tctx->outblock, FALSE, "BDAT %u%s\r\n", - chunk_size, chunk_last ? " LAST" : "") - ) - < 0) - return ERROR; +if (chunk_size > 0) + if((cmd_count = smtp_write_command(tctx->outblock, FALSE, "BDAT %u%s\r\n", + chunk_size, + flags & tc_chunk_last ? " LAST" : "") + ) < 0) return ERROR; + +prev_cmd_count = cmd_count += tctx->cmd_count; -if (chunk_last) - return OK; +/* Reap responses for any previous, but not one we just emitted */ -/* Reap responses for this and any previous, and error out on failure */ -debug_printf("(look for %d responses)\n", tctx->cmd_count); +if (chunk_size > 0) + prev_cmd_count--; +if (tctx->pending_BDAT) + prev_cmd_count--; -switch(sync_responses(tctx->first_addr, tctx->tblock->rcpt_include_affixes, - tctx->sync_addr, tctx->host, tctx->cmd_count, - ob->address_retry_include_sender, - tctx->pending_MAIL, 0, - tctx->inblock, - ob->command_timeout, - buffer, sizeof(buffer))) +if (flags & tc_reap_prev && prev_cmd_count > 0) { - case 1: /* 2xx (only) => OK */ - case 3: /* 2xx & 5xx => OK & progress made */ - case 2: *tctx->completed_address = TRUE; /* 5xx (only) => progress made */ - case 0: return OK; /* No 2xx or 5xx, but no probs */ - case -1: /* Timeout on RCPT */ - default: return ERROR; /* I/O error, or any MAIL/DATA error */ + switch(sync_responses(tctx->first_addr, tctx->tblock->rcpt_include_affixes, + tctx->sync_addr, tctx->host, prev_cmd_count, + ob->address_retry_include_sender, + tctx->pending_MAIL, 0, + tctx->inblock, + ob->command_timeout, + buffer, 4096)) +/*XXX buffer size! */ + { + case 1: /* 2xx (only) => OK */ + case 3: tctx->good_RCPT = TRUE; /* 2xx & 5xx => OK & progress made */ + case 2: *tctx->completed_address = TRUE; /* 5xx (only) => progress made */ + case 0: break; /* No 2xx or 5xx, but no probs */ + + case -1: /* Timeout on RCPT */ + default: return ERROR; /* I/O error, or any MAIL/DATA error */ + } + cmd_count = 1; + if (!tctx->pending_BDAT) + pipelining_active = FALSE; } + +/* Reap response for the cmd we just emitted, or an outstanding BDAT */ + +if (flags & tc_reap_one || tctx->pending_BDAT) + { +/*XXX buffer size! */ + if (!smtp_read_response(tctx->inblock, buffer, 4096, '2', + ob->command_timeout)) + { + if (errno == 0 && buffer[0] == '4') + { + errno = ERRNO_DATA4XX; /*XXX does this actually get used? */ + tctx->first_addr->more_errno |= + ((buffer[1] - '0')*10 + buffer[2] - '0') << 8; + } + return ERROR; + } + cmd_count--; + tctx->pending_BDAT = FALSE; + pipelining_active = FALSE; + } +else if (chunk_size > 0) + tctx->pending_BDAT = TRUE; + + +tctx->cmd_count = cmd_count; +return OK; } @@ -2043,6 +2077,7 @@ if (continue_hostname == NULL case FAIL: goto RESPONSE_FAILED; } } +pipelining_active = smtp_use_pipelining; /* The setting up of the SMTP call is now complete. Any subsequent errors are message-specific. */ @@ -2399,6 +2434,7 @@ if ( !(peer_offered & PEER_OFFERED_CHUNKING) case -1: goto END_OFF; /* Timeout on RCPT */ default: goto RESPONSE_FAILED; /* I/O error, or any MAIL/DATA error */ } + pipelining_active = FALSE; } /* If there were no good recipients (but otherwise there have been no @@ -2445,7 +2481,11 @@ else tctx.first_addr = first_addr; tctx.sync_addr = &sync_addr; tctx.pending_MAIL = pending_MAIL; + tctx.pending_BDAT = FALSE; + tctx.good_RCPT = ok; tctx.completed_address = &completed_address; + tctx.cmd_count = 0; + tctx.buffer = buffer; } else tctx.options |= topt_end_dot; @@ -2453,6 +2493,11 @@ else /* Save the first address of the next batch. */ first_addr = addr; + /* Responses from CHUNKING commands go in buffer. Otherwise, + there has not been a response. */ + + buffer[0] = 0; + sigalrm_seen = FALSE; transport_write_timeout = ob->data_timeout; smtp_command = US"sending data block"; /* For error messages */ @@ -2477,13 +2522,11 @@ else transport_write_timeout = 0; /* for subsequent transports */ /* Failure can either be some kind of I/O disaster (including timeout), - or the failure of a transport filter or the expansion of added headers. */ + or the failure of a transport filter or the expansion of added headers. + Or, when CHUNKING, it can be a protocol-detected failure. */ if (!ok) - { - buffer[0] = 0; /* There hasn't been a response */ goto RESPONSE_FAILED; - } /* We used to send the terminating "." explicitly here, but because of buffering effects at both ends of TCP/IP connections, you don't gain @@ -2523,16 +2566,16 @@ else { ok = smtp_read_response(&inblock, buffer, sizeof(buffer), '3', ob->final_timeout); - if (!ok && errno == 0) - switch(buffer[0]) - { - case '2': prdr_active = FALSE; - ok = TRUE; - break; - case '4': errno = ERRNO_DATA4XX; - addrlist->more_errno |= ((buffer[1] - '0')*10 + buffer[2] - '0') << 8; - break; - } + if (!ok && errno == 0) switch(buffer[0]) + { + case '2': prdr_active = FALSE; + ok = TRUE; + break; + case '4': errno = ERRNO_DATA4XX; + addrlist->more_errno |= + ((buffer[1] - '0')*10 + buffer[2] - '0') << 8; + break; + } } else #endif @@ -2569,7 +2612,9 @@ else int delivery_time = (int)(time(NULL) - start_delivery_time); int len; uschar *conf = NULL; + send_rset = FALSE; + pipelining_active = FALSE; /* Set up confirmation if needed - applies only to SMTP */ diff --git a/test/confs/0900 b/test/confs/0900 index 4a014cee1..cdc6d84eb 100644 --- a/test/confs/0900 +++ b/test/confs/0900 @@ -1,4 +1,5 @@ # Exim test configuration 0900 +SERVER= exim_path = EXIM_PATH keep_environment = @@ -17,8 +18,6 @@ domainlist local_domains = @ acl_smtp_rcpt = check_recipient acl_smtp_data = check_data -message_id_header_domain = ${if eq{0}{0}{some.domain}} -message_id_header_text = ${if eq{0}{0}{a@b[c]}} trusted_users = CALLER queue_only smtp_receive_timeout = 2s @@ -42,6 +41,12 @@ check_data: begin routers +to_server: + driver = accept + condition = ${if !eq {SERVER}{server}} + transport = remote_smtp + errors_to = "" + fail_remote_domains: driver = redirect domains = ! +local_domains @@ -68,4 +73,16 @@ local_delivery: X-received-count: $received_count" return_path_add +remote_smtp: + driver = smtp + hosts = 127.0.0.1 + port = PORT_S + allow_localhost + command_timeout = 2s + final_timeout = 2s + +# ----- Retry ----- + +begin retry +* * F,30m,5m; # End diff --git a/test/confs/0901 b/test/confs/0901 new file mode 120000 index 000000000..1bb987150 --- /dev/null +++ b/test/confs/0901 @@ -0,0 +1 @@ +0900 \ No newline at end of file diff --git a/test/confs/0902 b/test/confs/0902 new file mode 120000 index 000000000..1bb987150 --- /dev/null +++ b/test/confs/0902 @@ -0,0 +1 @@ +0900 \ No newline at end of file diff --git a/test/log/0217 b/test/log/0217 index 1328a46db..b3cf93c4b 100644 --- a/test/log/0217 +++ b/test/log/0217 @@ -8,49 +8,49 @@ 1999-03-02 09:44:33 10HmaY-0005vi-00 CALLER@test.ex: error ignored 1999-03-02 09:44:33 10HmaY-0005vi-00 Completed 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmaZ-0005vi-00 == a@test.ex R=client T=send_to_server defer (dd): Connection timed out H=127.0.0.1 [127.0.0.1]: SMTP timeout after RCPT TO: -1999-03-02 09:44:33 10HmaZ-0005vi-00 == b@test.ex R=client T=send_to_server defer (dd): Connection timed out H=127.0.0.1 [127.0.0.1]: SMTP timeout after RCPT TO: -1999-03-02 09:44:33 10HmaZ-0005vi-00 == c@test.ex R=client T=send_to_server defer (dd): Connection timed out: SMTP timeout after RCPT TO: +1999-03-02 09:44:33 10HmaZ-0005vi-00 == e@test.ex R=client T=send_to_server defer (dd): Connection timed out H=127.0.0.1 [127.0.0.1]: SMTP timeout after RCPT TO: +1999-03-02 09:44:33 10HmaZ-0005vi-00 == f@test.ex R=client T=send_to_server defer (dd): Connection timed out H=127.0.0.1 [127.0.0.1]: SMTP timeout after RCPT TO: +1999-03-02 09:44:33 10HmaZ-0005vi-00 == g@test.ex R=client T=send_to_server defer (dd): Connection timed out: SMTP timeout after RCPT TO: 1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmbA-0005vi-00 == a@test.ex R=client T=send_to_server defer (-45) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after MAIL FROM:: 451 Temp error -1999-03-02 09:44:33 10HmbA-0005vi-00 == b@test.ex R=client T=send_to_server defer (-45) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after MAIL FROM:: 451 Temp error +1999-03-02 09:44:33 10HmbA-0005vi-00 == h@test.ex R=client T=send_to_server defer (-45) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined MAIL FROM:: 451 Temp error +1999-03-02 09:44:33 10HmbA-0005vi-00 == i@test.ex R=client T=send_to_server defer (-45) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined MAIL FROM:: 451 Temp error 1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmbB-0005vi-00 ** a@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after MAIL FROM:: 550 Perm error -1999-03-02 09:44:33 10HmbB-0005vi-00 ** b@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after MAIL FROM:: 550 Perm error +1999-03-02 09:44:33 10HmbB-0005vi-00 ** j@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined MAIL FROM:: 550 Perm error +1999-03-02 09:44:33 10HmbB-0005vi-00 ** k@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined MAIL FROM:: 550 Perm error 1999-03-02 09:44:33 10HmbC-0005vi-00 <= <> R=10HmbB-0005vi-00 U=EXIMUSER P=local S=sss 1999-03-02 09:44:33 10HmbC-0005vi-00 ** CALLER@test.ex R=bounce: just discard 1999-03-02 09:44:33 10HmbC-0005vi-00 CALLER@test.ex: error ignored 1999-03-02 09:44:33 10HmbC-0005vi-00 Completed 1999-03-02 09:44:33 10HmbB-0005vi-00 Completed 1999-03-02 09:44:33 10HmbD-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmbD-0005vi-00 == a@test.ex R=client T=send_to_server defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 451 Temp error 1 -1999-03-02 09:44:33 10HmbD-0005vi-00 == b@test.ex R=client T=send_to_server defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 451 Temp error 2 +1999-03-02 09:44:33 10HmbD-0005vi-00 == l@test.ex R=client T=send_to_server defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 451 Temp error 1 +1999-03-02 09:44:33 10HmbD-0005vi-00 == m@test.ex R=client T=send_to_server defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 451 Temp error 2 1999-03-02 09:44:33 10HmbE-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmbE-0005vi-00 ** a@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 551 Perm error 1 -1999-03-02 09:44:33 10HmbE-0005vi-00 ** b@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 551 Perm error 2 +1999-03-02 09:44:33 10HmbE-0005vi-00 ** n@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 551 Perm error 1 +1999-03-02 09:44:33 10HmbE-0005vi-00 ** o@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 551 Perm error 2 1999-03-02 09:44:33 10HmbF-0005vi-00 <= <> R=10HmbE-0005vi-00 U=EXIMUSER P=local S=sss 1999-03-02 09:44:33 10HmbF-0005vi-00 ** CALLER@test.ex R=bounce: just discard 1999-03-02 09:44:33 10HmbF-0005vi-00 CALLER@test.ex: error ignored 1999-03-02 09:44:33 10HmbF-0005vi-00 Completed 1999-03-02 09:44:33 10HmbE-0005vi-00 Completed 1999-03-02 09:44:33 10HmbG-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmbG-0005vi-00 == a@test.ex R=client T=send_to_server defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 451 Temp error 1 -1999-03-02 09:44:33 10HmbG-0005vi-00 ** b@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 551 Perm error 2 +1999-03-02 09:44:33 10HmbG-0005vi-00 == p@test.ex R=client T=send_to_server defer (-44) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 451 Temp error 1 +1999-03-02 09:44:33 10HmbG-0005vi-00 ** q@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 551 Perm error 2 1999-03-02 09:44:33 10HmbH-0005vi-00 <= <> R=10HmbG-0005vi-00 U=EXIMUSER P=local S=sss 1999-03-02 09:44:33 10HmbH-0005vi-00 ** CALLER@test.ex R=bounce: just discard 1999-03-02 09:44:33 10HmbH-0005vi-00 CALLER@test.ex: error ignored 1999-03-02 09:44:33 10HmbH-0005vi-00 Completed 1999-03-02 09:44:33 10HmbI-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmbI-0005vi-00 ** a@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined DATA: 503 Sorry perm data error -1999-03-02 09:44:33 10HmbI-0005vi-00 ** b@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined DATA: 503 Sorry perm data error +1999-03-02 09:44:33 10HmbI-0005vi-00 ** r@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined DATA: 503 Sorry perm data error +1999-03-02 09:44:33 10HmbI-0005vi-00 ** s@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined DATA: 503 Sorry perm data error 1999-03-02 09:44:33 10HmbJ-0005vi-00 <= <> R=10HmbI-0005vi-00 U=EXIMUSER P=local S=sss 1999-03-02 09:44:33 10HmbJ-0005vi-00 ** CALLER@test.ex R=bounce: just discard 1999-03-02 09:44:33 10HmbJ-0005vi-00 CALLER@test.ex: error ignored 1999-03-02 09:44:33 10HmbJ-0005vi-00 Completed 1999-03-02 09:44:33 10HmbI-0005vi-00 Completed 1999-03-02 09:44:33 10HmbK-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmbK-0005vi-00 == a@test.ex R=client T=send_to_server defer (-46) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined DATA: 403 Sorry temp data error -1999-03-02 09:44:33 10HmbK-0005vi-00 == b@test.ex R=client T=send_to_server defer (-46) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined DATA: 403 Sorry temp data error +1999-03-02 09:44:33 10HmbK-0005vi-00 == t@test.ex R=client T=send_to_server defer (-46) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined DATA: 403 Sorry temp data error +1999-03-02 09:44:33 10HmbK-0005vi-00 == u@test.ex R=client T=send_to_server defer (-46) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined DATA: 403 Sorry temp data error 1999-03-02 09:44:33 10HmbL-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss 1999-03-02 09:44:33 10HmbL-0005vi-00 == yes@test.ex R=client T=send_to_server defer (-46) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined DATA: 403 Sorry temp data error 1999-03-02 09:44:33 10HmbL-0005vi-00 ** n00@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 550 NO @@ -258,12 +258,12 @@ 1999-03-02 09:44:33 10HmbM-0005vi-00 CALLER@test.ex: error ignored 1999-03-02 09:44:33 10HmbM-0005vi-00 Completed 1999-03-02 09:44:33 10HmbN-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmbN-0005vi-00 H=127.0.0.1 [127.0.0.1]: Remote host closed connection in response to RCPT TO: -1999-03-02 09:44:33 10HmbN-0005vi-00 == a@test.ex R=client T=send_to_server defer (-18) H=127.0.0.1 [127.0.0.1]: Remote host closed connection in response to RCPT TO: +1999-03-02 09:44:33 10HmbN-0005vi-00 H=127.0.0.1 [127.0.0.1]: Remote host closed connection in response to pipelined RCPT TO: +1999-03-02 09:44:33 10HmbN-0005vi-00 == a@test.ex R=client T=send_to_server defer (-18) H=127.0.0.1 [127.0.0.1]: Remote host closed connection in response to pipelined RCPT TO: 1999-03-02 09:44:33 10HmbN-0005vi-00 ** b@test.ex R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 550 NO -1999-03-02 09:44:33 10HmbN-0005vi-00 == c@test.ex R=client T=send_to_server defer (-18) H=127.0.0.1 [127.0.0.1]: Remote host closed connection in response to RCPT TO: -1999-03-02 09:44:33 10HmbN-0005vi-00 == d@test.ex R=client T=send_to_server defer (-18) H=127.0.0.1 [127.0.0.1]: Remote host closed connection in response to RCPT TO: -1999-03-02 09:44:33 10HmbN-0005vi-00 == e@test.ex R=client T=send_to_server defer (-18) H=127.0.0.1 [127.0.0.1]: Remote host closed connection in response to RCPT TO: +1999-03-02 09:44:33 10HmbN-0005vi-00 == c@test.ex R=client T=send_to_server defer (-18) H=127.0.0.1 [127.0.0.1]: Remote host closed connection in response to pipelined RCPT TO: +1999-03-02 09:44:33 10HmbN-0005vi-00 == d@test.ex R=client T=send_to_server defer (-18) H=127.0.0.1 [127.0.0.1]: Remote host closed connection in response to pipelined RCPT TO: +1999-03-02 09:44:33 10HmbN-0005vi-00 == e@test.ex R=client T=send_to_server defer (-18) H=127.0.0.1 [127.0.0.1]: Remote host closed connection in response to pipelined RCPT TO: 1999-03-02 09:44:33 10HmbO-0005vi-00 <= <> R=10HmbN-0005vi-00 U=EXIMUSER P=local S=sss 1999-03-02 09:44:33 10HmbO-0005vi-00 ** CALLER@test.ex R=bounce: just discard 1999-03-02 09:44:33 10HmbO-0005vi-00 CALLER@test.ex: error ignored diff --git a/test/log/0218 b/test/log/0218 index 4aac50dab..bdbd4141f 100644 --- a/test/log/0218 +++ b/test/log/0218 @@ -9,7 +9,7 @@ 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss 1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@test.ex U=CALLER P=local S=sss 1999-03-02 09:44:33 Start queue run: pid=pppp -qq -1999-03-02 09:44:33 10HmaZ-0005vi-00 ** a@test.ex F= R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after MAIL FROM:: 550 NO +1999-03-02 09:44:33 10HmaZ-0005vi-00 ** a@test.ex F= R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined MAIL FROM:: 550 NO 1999-03-02 09:44:33 10HmbB-0005vi-00 <= <> R=10HmaZ-0005vi-00 U=EXIMUSER P=local S=sss 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed 1999-03-02 09:44:33 10HmbA-0005vi-00 H=127.0.0.1 [127.0.0.1] Connection refused diff --git a/test/log/0322 b/test/log/0322 index 0c45cc5d2..f76f0695b 100644 --- a/test/log/0322 +++ b/test/log/0322 @@ -7,26 +7,26 @@ 1999-03-02 09:44:33 10HmaY-0005vi-00 Completed 1999-03-02 09:44:33 10HmaX-0005vi-00 Completed 1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmaZ-0005vi-00 H=127.0.0.1 [127.0.0.1]: Malformed SMTP reply (an empty line) in response to RCPT TO: -1999-03-02 09:44:33 10HmaZ-0005vi-00 == x@test.ex R=remote T=smtp defer (-19) H=127.0.0.1 [127.0.0.1]: Malformed SMTP reply (an empty line) in response to RCPT TO: +1999-03-02 09:44:33 10HmaZ-0005vi-00 H=127.0.0.1 [127.0.0.1]: Malformed SMTP reply (an empty line) in response to pipelined RCPT TO: +1999-03-02 09:44:33 10HmaZ-0005vi-00 == x@test.ex R=remote T=smtp defer (-19) H=127.0.0.1 [127.0.0.1]: Malformed SMTP reply (an empty line) in response to pipelined RCPT TO: 1999-03-02 09:44:33 10HmaZ-0005vi-00 ** x@test.ex: retry timeout exceeded 1999-03-02 09:44:33 10HmbA-0005vi-00 <= <> R=10HmaZ-0005vi-00 U=EXIMUSER P=local S=sss 1999-03-02 09:44:33 10HmbA-0005vi-00 => :blackhole: R=null 1999-03-02 09:44:33 10HmbA-0005vi-00 Completed 1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed 1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmbB-0005vi-00 H=127.0.0.1 [127.0.0.1]: Malformed SMTP reply (an empty line) in response to MAIL FROM: -1999-03-02 09:44:33 10HmbB-0005vi-00 == x@test.ex R=remote T=smtp defer (-19) H=127.0.0.1 [127.0.0.1]: Malformed SMTP reply (an empty line) in response to MAIL FROM: +1999-03-02 09:44:33 10HmbB-0005vi-00 H=127.0.0.1 [127.0.0.1]: Malformed SMTP reply (an empty line) in response to pipelined MAIL FROM: +1999-03-02 09:44:33 10HmbB-0005vi-00 == x@test.ex R=remote T=smtp defer (-19) H=127.0.0.1 [127.0.0.1]: Malformed SMTP reply (an empty line) in response to pipelined MAIL FROM: 1999-03-02 09:44:33 10HmbB-0005vi-00 ** x@test.ex: retry timeout exceeded 1999-03-02 09:44:33 10HmbC-0005vi-00 <= <> R=10HmbB-0005vi-00 U=EXIMUSER P=local S=sss 1999-03-02 09:44:33 10HmbC-0005vi-00 => :blackhole: R=null 1999-03-02 09:44:33 10HmbC-0005vi-00 Completed 1999-03-02 09:44:33 10HmbB-0005vi-00 Completed 1999-03-02 09:44:33 10HmbD-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmbD-0005vi-00 H=127.0.0.1 [127.0.0.1]: Malformed SMTP reply (an empty line) in response to RCPT TO: -1999-03-02 09:44:33 10HmbD-0005vi-00 == x@test.ex R=remote T=smtp defer (-19) H=127.0.0.1 [127.0.0.1]: Malformed SMTP reply (an empty line) in response to RCPT TO: -1999-03-02 09:44:33 10HmbD-0005vi-00 == y@test.ex R=remote T=smtp defer (-19) H=127.0.0.1 [127.0.0.1]: Malformed SMTP reply (an empty line) in response to RCPT TO: -1999-03-02 09:44:33 10HmbD-0005vi-00 == z@test.ex R=remote T=smtp defer (-19) H=127.0.0.1 [127.0.0.1]: Malformed SMTP reply (an empty line) in response to RCPT TO: +1999-03-02 09:44:33 10HmbD-0005vi-00 H=127.0.0.1 [127.0.0.1]: Malformed SMTP reply (an empty line) in response to pipelined RCPT TO: +1999-03-02 09:44:33 10HmbD-0005vi-00 == x@test.ex R=remote T=smtp defer (-19) H=127.0.0.1 [127.0.0.1]: Malformed SMTP reply (an empty line) in response to pipelined RCPT TO: +1999-03-02 09:44:33 10HmbD-0005vi-00 == y@test.ex R=remote T=smtp defer (-19) H=127.0.0.1 [127.0.0.1]: Malformed SMTP reply (an empty line) in response to pipelined RCPT TO: +1999-03-02 09:44:33 10HmbD-0005vi-00 == z@test.ex R=remote T=smtp defer (-19) H=127.0.0.1 [127.0.0.1]: Malformed SMTP reply (an empty line) in response to pipelined RCPT TO: 1999-03-02 09:44:33 10HmbD-0005vi-00 ** z@test.ex: retry timeout exceeded 1999-03-02 09:44:33 10HmbD-0005vi-00 ** y@test.ex: retry timeout exceeded 1999-03-02 09:44:33 10HmbD-0005vi-00 ** x@test.ex: retry timeout exceeded diff --git a/test/log/0495 b/test/log/0495 index 17886a809..d55d67923 100644 --- a/test/log/0495 +++ b/test/log/0495 @@ -12,12 +12,12 @@ 1999-03-02 09:44:33 10HmbA-0005vi-00 ** b@x.y R=r9 T=t1 H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 550 NOTOK 1999-03-02 09:44:33 10HmbA-0005vi-00 Completed 1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmbB-0005vi-00 ** a@x.y R=r9 T=t1 H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after MAIL FROM:: 550 BAD MAIL -1999-03-02 09:44:33 10HmbB-0005vi-00 ** b@x.y R=r9 T=t1 H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after MAIL FROM:: 550 BAD MAIL +1999-03-02 09:44:33 10HmbB-0005vi-00 ** a@x.y R=r9 T=t1 H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined MAIL FROM:: 550 BAD MAIL +1999-03-02 09:44:33 10HmbB-0005vi-00 ** b@x.y R=r9 T=t1 H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined MAIL FROM:: 550 BAD MAIL 1999-03-02 09:44:33 10HmbB-0005vi-00 Completed 1999-03-02 09:44:33 10HmbC-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmbC-0005vi-00 ** a@x.y R=r9 T=t1 H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after MAIL FROM:: 450 TEMPORARY MAIL FAIL -1999-03-02 09:44:33 10HmbC-0005vi-00 ** b@x.y R=r9 T=t1 H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after MAIL FROM:: 450 TEMPORARY MAIL FAIL +1999-03-02 09:44:33 10HmbC-0005vi-00 ** a@x.y R=r9 T=t1 H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined MAIL FROM:: 450 TEMPORARY MAIL FAIL +1999-03-02 09:44:33 10HmbC-0005vi-00 ** b@x.y R=r9 T=t1 H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined MAIL FROM:: 450 TEMPORARY MAIL FAIL 1999-03-02 09:44:33 10HmbC-0005vi-00 Completed 1999-03-02 09:44:33 10HmbD-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss 1999-03-02 09:44:33 10HmbD-0005vi-00 => pm@p.q R=r9 T=t1 H=127.0.0.1 [127.0.0.1] C="250 OK" diff --git a/test/log/0497 b/test/log/0497 index 9e55e5d29..8d47ac2b5 100644 --- a/test/log/0497 +++ b/test/log/0497 @@ -27,7 +27,7 @@ 1999-03-02 09:44:33 10HmbE-0005vi-00 Completed 1999-03-02 09:44:33 10HmbD-0005vi-00 Completed 1999-03-02 09:44:33 10HmbF-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmbF-0005vi-00 == userx@x.y R=r1 T=t1 defer (-45) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after MAIL FROM:: 452 temporary error +1999-03-02 09:44:33 10HmbF-0005vi-00 == userx@x.y R=r1 T=t1 defer (-45) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined MAIL FROM:: 452 temporary error 1999-03-02 09:44:33 10HmbF-0005vi-00 ** userx@x.y: retry timeout exceeded 1999-03-02 09:44:33 10HmbG-0005vi-00 <= <> R=10HmbF-0005vi-00 U=EXIMUSER P=local S=sss 1999-03-02 09:44:33 10HmbG-0005vi-00 => :blackhole: R=r0 @@ -55,8 +55,8 @@ 1999-03-02 09:44:33 10HmbM-0005vi-00 Completed 1999-03-02 09:44:33 10HmbL-0005vi-00 Completed 1999-03-02 09:44:33 10HmbN-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss -1999-03-02 09:44:33 10HmbN-0005vi-00 H=127.0.0.1 [127.0.0.1]: Remote host closed connection in response to RCPT TO: -1999-03-02 09:44:33 10HmbN-0005vi-00 == userx@x.y R=r1 T=t1 defer (-18) H=127.0.0.1 [127.0.0.1]: Remote host closed connection in response to RCPT TO: +1999-03-02 09:44:33 10HmbN-0005vi-00 H=127.0.0.1 [127.0.0.1]: Remote host closed connection in response to pipelined RCPT TO: +1999-03-02 09:44:33 10HmbN-0005vi-00 == userx@x.y R=r1 T=t1 defer (-18) H=127.0.0.1 [127.0.0.1]: Remote host closed connection in response to pipelined RCPT TO: 1999-03-02 09:44:33 10HmbN-0005vi-00 ** userx@x.y: retry timeout exceeded 1999-03-02 09:44:33 10HmbO-0005vi-00 <= <> R=10HmbN-0005vi-00 U=EXIMUSER P=local S=sss 1999-03-02 09:44:33 10HmbO-0005vi-00 => :blackhole: R=r0 diff --git a/test/log/0552 b/test/log/0552 index d070f9c8c..4ce57b114 100644 --- a/test/log/0552 +++ b/test/log/0552 @@ -1,9 +1,9 @@ 1999-03-02 09:44:33 10HmaX-0005vi-00 Accept non-SMTP 1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex U=CALLER P=local S=sss 1999-03-02 09:44:33 Start queue run: pid=pppp -qf -1999-03-02 09:44:33 10HmaX-0005vi-00 == userx1@test.ex R=r1 T=t1 defer (dd): Connection timed out H=127.0.0.1 [127.0.0.1]: SMTP timeout after MAIL FROM: SIZE=ssss -1999-03-02 09:44:33 10HmaX-0005vi-00 == userx2@test.ex R=r1 T=t1 defer (dd): Connection timed out H=127.0.0.1 [127.0.0.1]: SMTP timeout after MAIL FROM: SIZE=ssss -1999-03-02 09:44:33 10HmaX-0005vi-00 == userx3@test.ex R=r1 T=t1 defer (dd): Connection timed out H=127.0.0.1 [127.0.0.1]: SMTP timeout after MAIL FROM: SIZE=ssss +1999-03-02 09:44:33 10HmaX-0005vi-00 == userx1@test.ex R=r1 T=t1 defer (dd): Connection timed out H=127.0.0.1 [127.0.0.1]: SMTP timeout after pipelined MAIL FROM: SIZE=ssss +1999-03-02 09:44:33 10HmaX-0005vi-00 == userx2@test.ex R=r1 T=t1 defer (dd): Connection timed out H=127.0.0.1 [127.0.0.1]: SMTP timeout after pipelined MAIL FROM: SIZE=ssss +1999-03-02 09:44:33 10HmaX-0005vi-00 == userx3@test.ex R=r1 T=t1 defer (dd): Connection timed out H=127.0.0.1 [127.0.0.1]: SMTP timeout after pipelined MAIL FROM: SIZE=ssss 1999-03-02 09:44:33 End queue run: pid=pppp -qf 1999-03-02 09:44:33 Start queue run: pid=pppp -qf 1999-03-02 09:44:33 10HmaX-0005vi-00 => userx1@test.ex R=r1 T=t1 H=127.0.0.1 [127.0.0.1] C="250 OK id=10HmaY-0005vi-00" diff --git a/test/log/0901 b/test/log/0901 new file mode 100644 index 000000000..b2db284e3 --- /dev/null +++ b/test/log/0901 @@ -0,0 +1,38 @@ +1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmaX-0005vi-00 => a@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1] C="250 OK" +1999-03-02 09:44:33 10HmaX-0005vi-00 Completed +1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmaY-0005vi-00 == b@test.ex R=to_server T=remote_smtp defer (dd): Connection timed out H=127.0.0.1 [127.0.0.1]: SMTP timeout after end of data (ddd bytes written) +1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmaZ-0005vi-00 => c@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1] C="250 OK" +1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed +1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmbA-0005vi-00 ** d@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after end of data: 500 oops +1999-03-02 09:44:33 10HmbA-0005vi-00 d@test.ex: error ignored +1999-03-02 09:44:33 10HmbA-0005vi-00 Completed +1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmbB-0005vi-00 == e@test.ex R=to_server T=remote_smtp defer (-46) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after end of data: 400 not right now +1999-03-02 09:44:33 10HmbC-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmbC-0005vi-00 => p@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1] C="250 OK bdat" +1999-03-02 09:44:33 10HmbC-0005vi-00 Completed +1999-03-02 09:44:33 10HmbD-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmbD-0005vi-00 == q@test.ex R=to_server T=remote_smtp defer (dd): Connection timed out H=127.0.0.1 [127.0.0.1]: SMTP timeout after pipelined end of data (ddd bytes written) +1999-03-02 09:44:33 10HmbE-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmbE-0005vi-00 => r@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1] C="250 OK bdat" +1999-03-02 09:44:33 10HmbE-0005vi-00 Completed +1999-03-02 09:44:33 10HmbF-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmbF-0005vi-00 ** s@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined end of data: 550 unacceptable mail-from +1999-03-02 09:44:33 10HmbF-0005vi-00 s@test.ex: error ignored +1999-03-02 09:44:33 10HmbF-0005vi-00 Completed +1999-03-02 09:44:33 10HmbG-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmbG-0005vi-00 == s1@test.ex R=to_server T=remote_smtp defer (-45) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined end of data: 450 greylisted mail-from +1999-03-02 09:44:33 10HmbH-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmbH-0005vi-00 ** t@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 550 no such recipient +1999-03-02 09:44:33 10HmbH-0005vi-00 t@test.ex: error ignored +1999-03-02 09:44:33 10HmbH-0005vi-00 Completed +1999-03-02 09:44:33 10HmbI-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmbI-0005vi-00 ** u@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined end of data: 500 oops bdat +1999-03-02 09:44:33 10HmbI-0005vi-00 u@test.ex: error ignored +1999-03-02 09:44:33 10HmbI-0005vi-00 Completed +1999-03-02 09:44:33 10HmbJ-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmbJ-0005vi-00 == v@test.ex R=to_server T=remote_smtp defer (-46) H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined end of data: 400 not right now bdat diff --git a/test/log/0902 b/test/log/0902 new file mode 100644 index 000000000..31fb49eb0 --- /dev/null +++ b/test/log/0902 @@ -0,0 +1,31 @@ +1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmaX-0005vi-00 => a@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1] C="250 OK bdat" +1999-03-02 09:44:33 10HmaX-0005vi-00 Completed +1999-03-02 09:44:33 10HmaY-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmaY-0005vi-00 ** d@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after sending data block: 500 oops bdat-nonlast +1999-03-02 09:44:33 10HmaY-0005vi-00 d@test.ex: error ignored +1999-03-02 09:44:33 10HmaY-0005vi-00 Completed +1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmaZ-0005vi-00 => p@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1] C="250 OK bdat" +1999-03-02 09:44:33 10HmaZ-0005vi-00 Completed +1999-03-02 09:44:33 10HmbA-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmbA-0005vi-00 ** s@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined sending data block: 550 unacceptable mail-from +1999-03-02 09:44:33 10HmbA-0005vi-00 s@test.ex: error ignored +1999-03-02 09:44:33 10HmbA-0005vi-00 Completed +1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmbB-0005vi-00 ** t@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 550 no such recipient +1999-03-02 09:44:33 10HmbB-0005vi-00 t@test.ex: error ignored +1999-03-02 09:44:33 10HmbB-0005vi-00 Completed +1999-03-02 09:44:33 10HmbC-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmbC-0005vi-00 ** t1@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 550 no such recipient +1999-03-02 09:44:33 10HmbC-0005vi-00 => t2@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1] C="250 OK bdat" +1999-03-02 09:44:33 10HmbC-0005vi-00 t1@test.ex: error ignored +1999-03-02 09:44:33 10HmbC-0005vi-00 Completed +1999-03-02 09:44:33 10HmbD-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmbD-0005vi-00 ** u@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined sending data block: 500 oops nonlast bdat +1999-03-02 09:44:33 10HmbD-0005vi-00 u@test.ex: error ignored +1999-03-02 09:44:33 10HmbD-0005vi-00 Completed +1999-03-02 09:44:33 10HmbE-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss +1999-03-02 09:44:33 10HmbE-0005vi-00 ** v@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after end of data: 500 oops bdat +1999-03-02 09:44:33 10HmbE-0005vi-00 v@test.ex: error ignored +1999-03-02 09:44:33 10HmbE-0005vi-00 Completed diff --git a/test/log/2026 b/test/log/2026 index 90506c3cd..08255f8a1 100644 --- a/test/log/2026 +++ b/test/log/2026 @@ -1,6 +1,6 @@ 1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 1999-03-02 09:44:33 H=localhost (myhost.test.ex) [127.0.0.1] F= temporarily rejected RCPT -1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex H=localhost (myhost.test.ex) [127.0.0.1] P=esmtp S=sss id=E10HmaY-0005vi-00@myhost.test.ex +1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@myhost.test.ex H=localhost (myhost.test.ex) [127.0.0.1] P=esmtp K S=sss id=E10HmaY-0005vi-00@myhost.test.ex 1999-03-02 09:44:33 10HmaX-0005vi-00 no immediate delivery: queued by ACL -1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@myhost.test.ex H=the.local.host.name (myhost.test.ex) [ip4.ip4.ip4.ip4] P=esmtps X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no S=sss id=E10HmaY-0005vi-00@myhost.test.ex +1999-03-02 09:44:33 10HmaZ-0005vi-00 <= CALLER@myhost.test.ex H=the.local.host.name (myhost.test.ex) [ip4.ip4.ip4.ip4] P=esmtps X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no K S=sss id=E10HmaY-0005vi-00@myhost.test.ex 1999-03-02 09:44:33 10HmaZ-0005vi-00 no immediate delivery: queued by ACL diff --git a/test/scripts/0000-Basic/0217 b/test/scripts/0000-Basic/0217 index c47ae5c9e..a74be606f 100644 --- a/test/scripts/0000-Basic/0217 +++ b/test/scripts/0000-Basic/0217 @@ -36,7 +36,7 @@ RCPT TO 250 OK *sleep 2 **** -exim -odi a b c +exim -odi e f g . **** # Temp error on MAIL @@ -56,7 +56,7 @@ DATA QUIT 250 OK **** -exim -odi a b +exim -odi h i . **** # Perm error on MAIL @@ -76,7 +76,7 @@ DATA QUIT 250 OK **** -exim -odi a b +exim -odi j k . **** # All get temp errors @@ -96,7 +96,7 @@ DATA QUIT 250 OK **** -exim -odi a b +exim -odi l m . **** # All get perm errors @@ -116,7 +116,7 @@ DATA QUIT 250 OK **** -exim -odi a b +exim -odi n o . **** # Mixed temp and perm @@ -136,7 +136,7 @@ DATA QUIT 250 OK **** -exim -odi a b +exim -odi p q . **** # Perm error on DATA after good recipients @@ -156,7 +156,7 @@ DATA QUIT 250 OK **** -exim -odi a b +exim -odi r s . **** # Temp error on DATA after good recipients @@ -176,7 +176,7 @@ DATA QUIT 250 OK **** -exim -odi a b +exim -odi t u . **** # Temp error on DATA after good recipients, but in first block of a diff --git a/test/scripts/0000-Basic/0901 b/test/scripts/0000-Basic/0901 new file mode 100644 index 000000000..7b0172a59 --- /dev/null +++ b/test/scripts/0000-Basic/0901 @@ -0,0 +1,309 @@ +# CHUNKING transmission, short messages +# +# Start with non-pipelined cases +# +# Basic short message +server PORT_S +220 Greetings +EHLO +250-Hello there +250 CHUNKING +MAIL FROM +250 OK +RCPT TO +250 OK +BDAT 323 LAST +*data 323 +250 OK +QUIT +225 OK +*eof +**** +exim -odf a@test.ex +Subject: foo + +data +**** +# +# Error case: server wrongly expected more data, client gets timeout for data-ack +server PORT_S +220 Greetings +EHLO +250-Hello there +250 CHUNKING +MAIL FROM +250 good mail cmd +RCPT TO +250 acceptable rcpt cmd +BDAT 323 LAST +*data 324 +250 OK got that data +QUIT +225 OK quitting +**** +exim -odf b@test.ex +Subject: foo + +data +**** +# +# Error case: server wrongly expected less data +# client get the data-ack, sends quit - but server +# sees a munged quit due to the outstanding data tail +server PORT_S +220 Greetings +EHLO +250-Hello there +250 CHUNKING +MAIL FROM +250 OK +RCPT TO +250 OK +BDAT 323 LAST +*data 322 +250 OK +QUIT +225 OK +**** +exim -odf c@test.ex +Subject: foo + +data +**** +# +# server rejects BDAT cmd +server PORT_S +220 Greetings +EHLO +250-Hello there +250 CHUNKING +MAIL FROM +250 OK +RCPT TO +250 OK +BDAT 323 LAST +*data 323 +500 oops +QUIT +225 OK +**** +exim -odf d@test.ex +Subject: foo + +data +**** +# +# server tmp-rejects BDAT cmd +server PORT_S +220 Greetings +EHLO +250-Hello there +250 CHUNKING +MAIL FROM +250 OK +RCPT TO +250 OK +BDAT 323 LAST +*data 323 +400 not right now +QUIT +225 OK +**** +exim -odf e@test.ex +Subject: foo + +data +**** +# +# +################################################### +# +# Pipelined cases +# +# Basic short message +server PORT_S +220 Greetings +EHLO +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM +RCPT TO +BDAT 323 LAST +*data 323 +250 OK mail +250 OK rcpt +250 OK bdat +QUIT +225 OK +*eof +**** +exim -odf p@test.ex +Subject: foo + +data +**** +# +# Error case: server wrongly expected more data, client gets timeout for data-ack +server PORT_S +220 Greetings +EHLO +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM +RCPT TO +BDAT 323 LAST +*data 324 +250 good mail cmd +**** +exim -odf q@test.ex +Subject: foo + +data +**** +# +# Error case: server wrongly expected less data +# client get the data-ack, sends quit - but server +# sees a munged quit due to the outstanding data tail +server PORT_S +220 Greetings +EHLO +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM +RCPT TO +BDAT 323 LAST +*data 322 +250 OK mail +250 OK rcpt +250 OK bdat +QUIT +225 OK +**** +exim -odf r@test.ex +Subject: foo + +data +**** +# +# server rejects MAIL cmd +# transport coding does not handle the possible RSET-and-another transaction, +# but always QUITs +server PORT_S +220 Greetings +EHLO +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM +RCPT TO +BDAT 323 LAST +*data 323 +550 unacceptable mail-from +550 rcpt ungood lacking mail-from +500 bdat ungood lacking mail-from +QUIT +225 OK +**** +exim -odf s@test.ex +Subject: foo + +data +**** +# +# server tmp-rejects MAIL cmd +server PORT_S +220 Greetings +EHLO +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM +RCPT TO +BDAT 324 LAST +*data 324 +450 greylisted mail-from +550 rcpt ungood lacking mail-from +500 bdat ungood lacking mail-from +QUIT +225 OK +**** +exim -odf s1@test.ex +Subject: foo + +data +**** +# +# server rejects RCPT cmd +server PORT_S +220 Greetings +EHLO +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM +RCPT TO +BDAT 323 LAST +*data 323 +250 OK mail +550 no such recipient +500 oops bdat +QUIT +225 OK +**** +exim -odf t@test.ex +Subject: foo + +data +**** +# +# server rejects BDAT cmd +server PORT_S +220 Greetings +EHLO +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM +RCPT TO +BDAT 323 LAST +*data 323 +250 OK mail +250 OK rcpt +500 oops bdat +QUIT +225 OK +**** +exim -odf u@test.ex +Subject: foo + +data +**** +# +# server tmp-rejects BDAT cmd +server PORT_S +220 Greetings +EHLO +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM +RCPT TO +BDAT 323 LAST +*data 323 +250 OK mail +250 OK rcpt +400 not right now bdat +QUIT +225 OK +**** +exim -odf v@test.ex +Subject: foo + +data +**** +# +# +no_msglog_check diff --git a/test/scripts/0000-Basic/0902 b/test/scripts/0000-Basic/0902 new file mode 100644 index 000000000..a1c4de4e1 --- /dev/null +++ b/test/scripts/0000-Basic/0902 @@ -0,0 +1,925 @@ +# CHUNKING transmission, long messages +# +# Start with non-pipelined cases +# +# Basic long message +server PORT_S +220 Greetings +EHLO +250-Hello there +250 CHUNKING +MAIL FROM +250 OK +RCPT TO +250 OK +BDAT 317 +*data 317 +250 OK nonlast bdat +BDAT 8380 LAST +*data 8380 +250 OK bdat +QUIT +225 OK +*eof +**** +exim -odf a@test.ex +Subject: foo + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +**** +# +# +# server rejects BDAT cmd +server PORT_S +220 Greetings +EHLO +250-Hello there +250 CHUNKING +MAIL FROM +250 OK +RCPT TO +250 OK +BDAT 317 +*data 317 +500 oops bdat-nonlast +QUIT +225 OK +**** +exim -odf d@test.ex +Subject: foo + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +**** +# +# +################################################### +# +# Pipelined cases +# +# Basic long message +server PORT_S +220 Greetings +EHLO +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM +RCPT TO +BDAT 317 +250 OK mail +250 OK rcpt +*data 317 +250 OK nonlast bdat +BDAT 8380 LAST +*data 8380 +250 OK bdat +QUIT +225 OK +*eof +**** +exim -odf p@test.ex +Subject: foo + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +**** +# +# server rejects MAIL cmd +# transport coding does not handle the possible RSET-and-another transaction, +# but always QUITs +# +server PORT_S +220 Greetings +EHLO +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM +RCPT TO +BDAT 317 +*data 317 +550 unacceptable mail-from +550 rcpt ungood lacking mail-from +500 bdat (nonlast) ungood lacking mail-from +QUIT +225 OK +**** +exim -odf s@test.ex +Subject: foo + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +**** +# +# server rejects RCPT cmd +server PORT_S +220 Greetings +EHLO +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM +RCPT TO +BDAT 317 +*data 317 +250 OK mail +550 no such recipient +500 oops nonlast bdat - no rcpt +QUIT +225 OK +**** +exim -odf t@test.ex +Subject: foo + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +**** +# +# server rejects 1st RCPT cmd of two +server PORT_S +220 Greetings +EHLO +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM +RCPT TO +RCPT TO +BDAT 301 +*data 301 +250 OK mail +550 no such recipient +250 good recipient +200 OK nonlast bdat +BDAT 8380 LAST +*data 8380 +250 OK bdat +QUIT +225 OK +**** +exim -odf t1@test.ex t2@test.ex +Subject: foo + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +**** +# +# server rejects initial BDAT cmd +server PORT_S +220 Greetings +EHLO +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM +RCPT TO +BDAT 317 +*data 317 +250 OK mail +250 OK rcpt +500 oops nonlast bdat +QUIT +225 OK +**** +exim -odf u@test.ex +Subject: foo + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +**** +# +# server rejects final BDAT cmd +server PORT_S +220 Greetings +EHLO +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM +RCPT TO +BDAT 317 +*data 317 +250 OK mail +250 OK rcpt +250 OK nonlast bdat +BDAT 8380 LAST +*data 8380 +500 oops bdat +QUIT +225 OK +**** +exim -odf v@test.ex +Subject: foo + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 + +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 +**** +# +# +no_msglog_check diff --git a/test/src/server.c b/test/src/server.c index 4f2172376..1abd3f49a 100644 --- a/test/src/server.c +++ b/test/src/server.c @@ -640,6 +640,38 @@ for (count = 0; count < connection_count; count++) sleep(sleepfor); } + /* If the script line starts with "*data " we expect a numeric argument, + and we expect to read (and discard) that many data bytes from the input. */ + + else if (strncmp(ss, "*data ", 6) == 0) + { + int dlen = atoi(ss+6); + int n; + + alarm(timeout); + + if (!linebuf) + while (dlen > 0) + { + n = dlen < sizeof(buffer) ? dlen : sizeof(buffer); + if ((n = read(dup_accept_socket, CS buffer, n)) == 0) + { + printf("Unxpected EOF read from client\n"); + s = s->next; + goto END_OFF; + } + dlen -= n; + } + else + while (dlen-- > 0) + if (fgetc(in) == EOF) + { + printf("Unxpected EOF read from client\n"); + s = s->next; + goto END_OFF; + } + } + /* Otherwise the script line is the start of an input line we are expecting from the client, or "*eof" indicating we expect the client to close the connection. Read command line or data lines; the latter are indicated diff --git a/test/stderr/0218 b/test/stderr/0218 index fe4ee2df9..f9f1d6849 100644 --- a/test/stderr/0218 +++ b/test/stderr/0218 @@ -93,7 +93,7 @@ Connecting to 127.0.0.1 [127.0.0.1]:1224 ... connected SMTP>> QUIT SMTP(close)>> LOG: MAIN - ** a@test.ex F= R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after MAIL FROM:: 550 NO + ** a@test.ex F= R=client T=send_to_server H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined MAIL FROM:: 550 NO Exim version x.yz .... configuration file is TESTSUITE/test-config trusted user diff --git a/test/stderr/0495 b/test/stderr/0495 index b00cfd572..bfe9f6218 100644 --- a/test/stderr/0495 +++ b/test/stderr/0495 @@ -1,7 +1,7 @@ Delivery failed: Connection refused Delivery failed: H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after RCPT TO:: 550 NOTOK -Delivery failed: H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after MAIL FROM:: 550 BAD MAIL -Delivery failed: H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after MAIL FROM:: 450 TEMPORARY MAIL FAIL +Delivery failed: H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined MAIL FROM:: 550 BAD MAIL +Delivery failed: H=127.0.0.1 [127.0.0.1]: SMTP error from remote mail server after pipelined MAIL FROM:: 450 TEMPORARY MAIL FAIL routing file@x.y yielded a local delivery routing fail@x.y yielded a failed delivery: forcible fail message routing defer@x.y yielded a deferred delivery: forcible defer message diff --git a/test/stdout/0217 b/test/stdout/0217 index 8633a43ee..f08a3fab6 100644 --- a/test/stdout/0217 +++ b/test/stdout/0217 @@ -36,7 +36,7 @@ EHLO myhost.test.ex 250 PIPELINING MAIL FROM: 250 OK -RCPT TO: +RCPT TO: 250 OK *sleep 2 End of script @@ -48,9 +48,9 @@ EHLO myhost.test.ex 250 PIPELINING MAIL FROM: 451 Temp error -RCPT TO: +RCPT TO: 503 No sender given -RCPT TO: +RCPT TO: 503 No sender given DATA 503 No envelope @@ -65,9 +65,9 @@ EHLO myhost.test.ex 250 PIPELINING MAIL FROM: 550 Perm error -RCPT TO: +RCPT TO: 503 No sender given -RCPT TO: +RCPT TO: 503 No sender given DATA 503 No envelope @@ -82,9 +82,9 @@ EHLO myhost.test.ex 250 PIPELINING MAIL FROM: 250 OK -RCPT TO: +RCPT TO: 451 Temp error 1 -RCPT TO: +RCPT TO: 451 Temp error 2 DATA 503 No recipients @@ -99,9 +99,9 @@ EHLO myhost.test.ex 250 PIPELINING MAIL FROM: 250 OK -RCPT TO: +RCPT TO: 551 Perm error 1 -RCPT TO: +RCPT TO: 551 Perm error 2 DATA 503 No recipients @@ -116,9 +116,9 @@ EHLO myhost.test.ex 250 PIPELINING MAIL FROM: 250 OK -RCPT TO: +RCPT TO: 451 Temp error 1 -RCPT TO: +RCPT TO: 551 Perm error 2 DATA 503 No recipients @@ -133,9 +133,9 @@ EHLO myhost.test.ex 250 PIPELINING MAIL FROM: 250 OK -RCPT TO: +RCPT TO: 250 OK -RCPT TO: +RCPT TO: 250 OK DATA 503 Sorry perm data error @@ -150,9 +150,9 @@ EHLO myhost.test.ex 250 PIPELINING MAIL FROM: 250 OK -RCPT TO: +RCPT TO: 250 OK -RCPT TO: +RCPT TO: 250 OK DATA 403 Sorry temp data error diff --git a/test/stdout/0547 b/test/stdout/0547 index 7e931992c..418ddc4ba 100644 --- a/test/stdout/0547 +++ b/test/stdout/0547 @@ -61,31 +61,31 @@ End of script 250 Reset OK 250 OK 214-Commands supported: -214 AUTH HELO EHLO MAIL RCPT DATA NOOP QUIT RSET HELP +214 AUTH HELO EHLO MAIL RCPT DATA BDAT NOOP QUIT RSET HELP 250 Reset OK 250 OK 214-Commands supported: -214 AUTH HELO EHLO MAIL RCPT DATA NOOP QUIT RSET HELP +214 AUTH HELO EHLO MAIL RCPT DATA BDAT NOOP QUIT RSET HELP 250 Reset OK 250 OK 214-Commands supported: -214 AUTH HELO EHLO MAIL RCPT DATA NOOP QUIT RSET HELP +214 AUTH HELO EHLO MAIL RCPT DATA BDAT NOOP QUIT RSET HELP 250 Reset OK 250 OK 214-Commands supported: -214 AUTH HELO EHLO MAIL RCPT DATA NOOP QUIT RSET HELP +214 AUTH HELO EHLO MAIL RCPT DATA BDAT NOOP QUIT RSET HELP 250 Reset OK 250 OK 214-Commands supported: -214 AUTH HELO EHLO MAIL RCPT DATA NOOP QUIT RSET HELP +214 AUTH HELO EHLO MAIL RCPT DATA BDAT NOOP QUIT RSET HELP 250 Reset OK 250 OK 214-Commands supported: -214 AUTH HELO EHLO MAIL RCPT DATA NOOP QUIT RSET HELP +214 AUTH HELO EHLO MAIL RCPT DATA BDAT NOOP QUIT RSET HELP 250 Reset OK 250 OK 214-Commands supported: -214 AUTH HELO EHLO MAIL RCPT DATA NOOP QUIT RSET HELP +214 AUTH HELO EHLO MAIL RCPT DATA BDAT NOOP QUIT RSET HELP 221 myhost.test.ex closing connection 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 550 Administrative prohibition @@ -100,15 +100,15 @@ End of script 250 Reset OK 250 OK 214-Commands supported: -214 AUTH HELO EHLO MAIL RCPT DATA NOOP QUIT RSET HELP +214 AUTH HELO EHLO MAIL RCPT DATA BDAT NOOP QUIT RSET HELP 250 Reset OK 250 OK 214-Commands supported: -214 AUTH HELO EHLO MAIL RCPT DATA NOOP QUIT RSET HELP +214 AUTH HELO EHLO MAIL RCPT DATA BDAT NOOP QUIT RSET HELP 250 Reset OK 250 OK 214-Commands supported: -214 AUTH HELO EHLO MAIL RCPT DATA NOOP QUIT RSET HELP +214 AUTH HELO EHLO MAIL RCPT DATA BDAT NOOP QUIT RSET HELP 250 Reset OK 250 OK 554 Too many nonmail commands diff --git a/test/stdout/0572 b/test/stdout/0572 index dbdf4b989..12cd05b78 100644 --- a/test/stdout/0572 +++ b/test/stdout/0572 @@ -57,6 +57,7 @@ no_hosts_override no_hosts_randomize hosts_require_auth = hosts_try_auth = +hosts_try_chunking = * hosts_try_prdr = * interface = ip4.ip4.ip4.ip4 keepalive diff --git a/test/stdout/0901 b/test/stdout/0901 new file mode 100644 index 000000000..12ed5ce0f --- /dev/null +++ b/test/stdout/0901 @@ -0,0 +1,199 @@ + +******** SERVER ******** +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250 CHUNKING +MAIL FROM:<> +250 OK +RCPT TO: +250 OK +BDAT 323 LAST +250 OK +QUIT +225 OK +Expected EOF read from client +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250 CHUNKING +MAIL FROM:<> +250 good mail cmd +RCPT TO: +250 acceptable rcpt cmd +BDAT 323 LAST +Unxpected EOF read from client +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250 CHUNKING +MAIL FROM:<> +250 OK +RCPT TO: +250 OK +BDAT 323 LAST +250 OK + +Comparison failed - bailing out +Expected: QUIT +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250 CHUNKING +MAIL FROM:<> +250 OK +RCPT TO: +250 OK +BDAT 323 LAST +500 oops +QUIT +225 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250 CHUNKING +MAIL FROM:<> +250 OK +RCPT TO: +250 OK +BDAT 323 LAST +400 not right now +QUIT +225 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM:<> +RCPT TO: +BDAT 323 LAST +250 OK mail +250 OK rcpt +250 OK bdat +QUIT +225 OK +Expected EOF read from client +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM:<> +RCPT TO: +BDAT 323 LAST +Unxpected EOF read from client +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM:<> +RCPT TO: +BDAT 323 LAST +250 OK mail +250 OK rcpt +250 OK bdat + +Comparison failed - bailing out +Expected: QUIT +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM:<> +RCPT TO: +BDAT 323 LAST +550 unacceptable mail-from +550 rcpt ungood lacking mail-from +500 bdat ungood lacking mail-from +QUIT +225 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM:<> +RCPT TO: +BDAT 324 LAST +450 greylisted mail-from +550 rcpt ungood lacking mail-from +500 bdat ungood lacking mail-from +QUIT +225 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM:<> +RCPT TO: +BDAT 323 LAST +250 OK mail +550 no such recipient +500 oops bdat +QUIT +225 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM:<> +RCPT TO: +BDAT 323 LAST +250 OK mail +250 OK rcpt +500 oops bdat +QUIT +225 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM:<> +RCPT TO: +BDAT 323 LAST +250 OK mail +250 OK rcpt +400 not right now bdat +QUIT +225 OK +End of script diff --git a/test/stdout/0902 b/test/stdout/0902 new file mode 100644 index 000000000..58dba6788 --- /dev/null +++ b/test/stdout/0902 @@ -0,0 +1,140 @@ + +******** SERVER ******** +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250 CHUNKING +MAIL FROM:<> +250 OK +RCPT TO: +250 OK +BDAT 317 +250 OK nonlast bdat +BDAT 8380 LAST +250 OK bdat +QUIT +225 OK +Expected EOF read from client +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250 CHUNKING +MAIL FROM:<> +250 OK +RCPT TO: +250 OK +BDAT 317 +500 oops bdat-nonlast +QUIT +225 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM:<> +RCPT TO: +BDAT 317 +250 OK mail +250 OK rcpt +250 OK nonlast bdat +BDAT 8380 LAST +250 OK bdat +QUIT +225 OK +Expected EOF read from client +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM:<> +RCPT TO: +BDAT 317 +550 unacceptable mail-from +550 rcpt ungood lacking mail-from +500 bdat (nonlast) ungood lacking mail-from +QUIT +225 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM:<> +RCPT TO: +BDAT 317 +250 OK mail +550 no such recipient +500 oops nonlast bdat - no rcpt +QUIT +225 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM:<> +RCPT TO: +RCPT TO: +BDAT 301 +250 OK mail +550 no such recipient +250 good recipient +200 OK nonlast bdat +BDAT 8380 LAST +250 OK bdat +QUIT +225 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM:<> +RCPT TO: +BDAT 317 +250 OK mail +250 OK rcpt +500 oops nonlast bdat +QUIT +225 OK +End of script +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Greetings +EHLO the.local.host.name +250-Hello there +250-PIPELINING +250 CHUNKING +MAIL FROM:<> +RCPT TO: +BDAT 317 +250 OK mail +250 OK rcpt +250 OK nonlast bdat +BDAT 8380 LAST +500 oops bdat +QUIT +225 OK +End of script diff --git a/test/stdout/2022 b/test/stdout/2022 index c6124c698..3f280e0d5 100644 --- a/test/stdout/2022 +++ b/test/stdout/2022 @@ -23,7 +23,7 @@ Succeeded in starting TLS ??? 214- <<< 214-Commands supported: ??? 214 -<<< 214 AUTH HELO EHLO MAIL RCPT DATA NOOP QUIT RSET HELP +<<< 214 AUTH HELO EHLO MAIL RCPT DATA BDAT NOOP QUIT RSET HELP >>> quit ??? 221 <<< 221 myhost.test.ex closing connection -- cgit v1.2.3 From e7621e8371917cc06d0abce0929c3166e29007fb Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Mon, 1 Aug 2016 22:39:20 +0100 Subject: testcases for TLS --- test/confs/0900 | 5 +- test/confs/2090 | 1 + test/confs/2091 | 1 + test/confs/2190 | 1 + test/confs/2191 | 1 + test/log/2090 | 5 ++ test/log/2091 | 7 +++ test/log/2190 | 5 ++ test/log/2191 | 9 +++ test/scripts/2000-GnuTLS/2090 | 78 +++++++++++++++++++++++ test/scripts/2000-GnuTLS/2091 | 9 +++ test/scripts/2100-OpenSSL/2190 | 77 +++++++++++++++++++++++ test/scripts/2100-OpenSSL/2191 | 1 + test/stdout/2090 | 110 ++++++++++++++++++++++++++++++++ test/stdout/2190 | 138 +++++++++++++++++++++++++++++++++++++++++ 15 files changed, 447 insertions(+), 1 deletion(-) create mode 120000 test/confs/2090 create mode 120000 test/confs/2091 create mode 120000 test/confs/2190 create mode 120000 test/confs/2191 create mode 100644 test/log/2090 create mode 100644 test/log/2091 create mode 100644 test/log/2190 create mode 100644 test/log/2191 create mode 100644 test/scripts/2000-GnuTLS/2090 create mode 100644 test/scripts/2000-GnuTLS/2091 create mode 100644 test/scripts/2100-OpenSSL/2190 create mode 120000 test/scripts/2100-OpenSSL/2191 create mode 100644 test/stdout/2090 create mode 100644 test/stdout/2190 (limited to 'test/stdout') diff --git a/test/confs/0900 b/test/confs/0900 index 3235f1ee7..245d9fa96 100644 --- a/test/confs/0900 +++ b/test/confs/0900 @@ -1,6 +1,7 @@ # Exim test configuration 0900 SERVER= X= +Y= OPT= exim_path = EXIM_PATH @@ -11,7 +12,7 @@ log_file_path = DIR/spool/log/SERVER%slog gecos_pattern = "" gecos_name = CALLER_NAME chunking_advertise_hosts = * -tls_advertise_hosts = +tls_advertise_hosts = ${if eq {Y}{tls} {*}} # ----- Main settings ----- @@ -25,6 +26,8 @@ queue_only smtp_receive_timeout = 2s log_selector = +received_recipients +tls_certificate = ${if eq {SERVER}{server}{DIR/aux-fixed/cert1}fail} +tls_privatekey = ${if eq {SERVER}{server}{DIR/aux-fixed/cert1}fail} # ----- ACL ----- diff --git a/test/confs/2090 b/test/confs/2090 new file mode 120000 index 000000000..1bb987150 --- /dev/null +++ b/test/confs/2090 @@ -0,0 +1 @@ +0900 \ No newline at end of file diff --git a/test/confs/2091 b/test/confs/2091 new file mode 120000 index 000000000..1bb987150 --- /dev/null +++ b/test/confs/2091 @@ -0,0 +1 @@ +0900 \ No newline at end of file diff --git a/test/confs/2190 b/test/confs/2190 new file mode 120000 index 000000000..1bb987150 --- /dev/null +++ b/test/confs/2190 @@ -0,0 +1 @@ +0900 \ No newline at end of file diff --git a/test/confs/2191 b/test/confs/2191 new file mode 120000 index 000000000..1bb987150 --- /dev/null +++ b/test/confs/2191 @@ -0,0 +1 @@ +0900 \ No newline at end of file diff --git a/test/log/2090 b/test/log/2090 new file mode 100644 index 000000000..630d2c6a4 --- /dev/null +++ b/test/log/2090 @@ -0,0 +1,5 @@ + +******** SERVER ******** +1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 +1999-03-02 09:44:33 10HmaX-0005vi-00 <= someone@some.domain H=(rhu.barb) [127.0.0.1] P=esmtps X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no K S=sss for CALLER@the.local.host.name +1999-03-02 09:44:33 10HmaY-0005vi-00 <= someone@some.domain H=(rhu.barb) [127.0.0.1] P=esmtps X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no K S=sss for CALLER@the.local.host.name diff --git a/test/log/2091 b/test/log/2091 new file mode 100644 index 000000000..3c1be5c84 --- /dev/null +++ b/test/log/2091 @@ -0,0 +1,7 @@ +1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for CALLER@test.ex +1999-03-02 09:44:33 10HmaX-0005vi-00 => CALLER@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1] X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no C="250- 340 byte chunk, total 340\\n250 OK id=10HmaY-0005vi-00" +1999-03-02 09:44:33 10HmaX-0005vi-00 Completed + +******** SERVER ******** +1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1224 +1999-03-02 09:44:33 10HmaY-0005vi-00 <= <> H=localhost (the.local.host.name) [127.0.0.1] P=esmtps X=TLS1.x:xxxxRSA_AES_256_CBC_SHAnnn:256 CV=no K S=sss id=E10HmaX-0005vi-00@the.local.host.name for CALLER@test.ex diff --git a/test/log/2190 b/test/log/2190 new file mode 100644 index 000000000..356a4ad92 --- /dev/null +++ b/test/log/2190 @@ -0,0 +1,5 @@ + +******** SERVER ******** +1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 +1999-03-02 09:44:33 10HmaX-0005vi-00 <= someone@some.domain H=(rhu.barb) [127.0.0.1] P=esmtps X=TLSv1:AES256-SHA:256 CV=no K S=sss for CALLER@the.local.host.name +1999-03-02 09:44:33 10HmaY-0005vi-00 <= someone@some.domain H=(rhu.barb) [127.0.0.1] P=esmtps X=TLSv1:AES256-SHA:256 CV=no K S=sss for CALLER@the.local.host.name diff --git a/test/log/2191 b/test/log/2191 new file mode 100644 index 000000000..4ff843230 --- /dev/null +++ b/test/log/2191 @@ -0,0 +1,9 @@ +1999-03-02 09:44:33 10HmaX-0005vi-00 <= CALLER@the.local.host.name U=CALLER P=local S=sss for CALLER@test.ex +1999-03-02 09:44:33 10HmaX-0005vi-00 [127.0.0.1] SSL verify error: depth=0 error=self signed certificate cert=/C=UK/O=The Exim Maintainers/OU=Test Suite/CN=Phil Pennock +1999-03-02 09:44:33 10HmaX-0005vi-00 [127.0.0.1] SSL verify error: certificate name mismatch: "/C=UK/O=The Exim Maintainers/OU=Test Suite/CN=Phil Pennock" +1999-03-02 09:44:33 10HmaX-0005vi-00 => CALLER@test.ex R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1] X=TLSv1:AES256-SHA:256 CV=no C="250- 340 byte chunk, total 340\\n250 OK id=10HmaY-0005vi-00" +1999-03-02 09:44:33 10HmaX-0005vi-00 Completed + +******** SERVER ******** +1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1224 +1999-03-02 09:44:33 10HmaY-0005vi-00 <= <> H=localhost (the.local.host.name) [127.0.0.1] P=esmtps X=TLSv1:AES256-SHA:256 CV=no K S=sss id=E10HmaX-0005vi-00@the.local.host.name for CALLER@test.ex diff --git a/test/scripts/2000-GnuTLS/2090 b/test/scripts/2000-GnuTLS/2090 new file mode 100644 index 000000000..f799016f1 --- /dev/null +++ b/test/scripts/2000-GnuTLS/2090 @@ -0,0 +1,78 @@ +# TLS server, CHUNKING reception +gnutls +exim -DSERVER=server -DY=tls -bd -oX PORT_D +**** +# +# non-piplined +client-gnutls 127.0.0.1 PORT_D +??? 220 +EHLO rhu.barb +??? 250- +??? 250-SIZE +??? 250-8BITMIME +??? 250-PIPELINING +??? 250-CHUNKING +??? 250-STARTTLS +??? 250 HELP +STARTTLS +??? 220 +EHLO rhu.barb +??? 250- +??? 250-SIZE +??? 250-8BITMIME +??? 250-PIPELINING +??? 250-CHUNKING +??? 250 HELP +MAIL FROM: +??? 250 +RCPT TO: +??? 250 +BDAT 88 LAST +To: Susan@random.com +From: Sam@random.com +Subject: This is a bodyless test message + +??? 250- +??? 250 +QUIT +??? 221 +**** +# +# pipelined +client-gnutls 127.0.0.1 PORT_D +??? 220 +EHLO rhu.barb +??? 250- +??? 250-SIZE +??? 250-8BITMIME +??? 250-PIPELINING +??? 250-CHUNKING +??? 250-STARTTLS +??? 250 HELP +STARTTLS +??? 220 +EHLO rhu.barb +??? 250- +??? 250-SIZE +??? 250-8BITMIME +??? 250-PIPELINING +??? 250-CHUNKING +??? 250 HELP +MAIL FROM: +RCPT TO: +BDAT 88 LAST +To: Susan@random.com +From: Sam@random.com +Subject: This is a bodyless test message + +??? 250 +??? 250 +??? 250- +??? 250 +QUIT +??? 221 +**** +# +# +killdaemon +no_msglog_check diff --git a/test/scripts/2000-GnuTLS/2091 b/test/scripts/2000-GnuTLS/2091 new file mode 100644 index 000000000..aa7b26058 --- /dev/null +++ b/test/scripts/2000-GnuTLS/2091 @@ -0,0 +1,9 @@ +# TLS client, CHUNKING transmission +gnutls +exim -DSERVER=server -DY=tls -bd -oX PORT_S +**** +exim -odf CALLER@test.ex +Test message. Contains FF: ÿ +**** +killdaemon +no_msglog_check diff --git a/test/scripts/2100-OpenSSL/2190 b/test/scripts/2100-OpenSSL/2190 new file mode 100644 index 000000000..bacca676d --- /dev/null +++ b/test/scripts/2100-OpenSSL/2190 @@ -0,0 +1,77 @@ +# TLS server, CHUNKING reception +exim -DSERVER=server -DY=tls -bd -oX PORT_D +**** +# +# non-piplined +client-ssl 127.0.0.1 PORT_D +??? 220 +EHLO rhu.barb +??? 250- +??? 250-SIZE +??? 250-8BITMIME +??? 250-PIPELINING +??? 250-CHUNKING +??? 250-STARTTLS +??? 250 HELP +STARTTLS +??? 220 +EHLO rhu.barb +??? 250- +??? 250-SIZE +??? 250-8BITMIME +??? 250-PIPELINING +??? 250-CHUNKING +??? 250 HELP +MAIL FROM: +??? 250 +RCPT TO: +??? 250 +BDAT 88 LAST +To: Susan@random.com +From: Sam@random.com +Subject: This is a bodyless test message + +??? 250- +??? 250 +QUIT +??? 221 +**** +# +# pipelined +client-ssl 127.0.0.1 PORT_D +??? 220 +EHLO rhu.barb +??? 250- +??? 250-SIZE +??? 250-8BITMIME +??? 250-PIPELINING +??? 250-CHUNKING +??? 250-STARTTLS +??? 250 HELP +STARTTLS +??? 220 +EHLO rhu.barb +??? 250- +??? 250-SIZE +??? 250-8BITMIME +??? 250-PIPELINING +??? 250-CHUNKING +??? 250 HELP +MAIL FROM: +RCPT TO: +BDAT 88 LAST +To: Susan@random.com +From: Sam@random.com +Subject: This is a bodyless test message + +??? 250 +??? 250 +??? 250- +??? 250 +QUIT +??? 221 +**** +# +# +killdaemon +no_msglog_check diff --git a/test/scripts/2100-OpenSSL/2191 b/test/scripts/2100-OpenSSL/2191 new file mode 120000 index 000000000..825b021c3 --- /dev/null +++ b/test/scripts/2100-OpenSSL/2191 @@ -0,0 +1 @@ +../2000-GnuTLS/2091 \ No newline at end of file diff --git a/test/stdout/2090 b/test/stdout/2090 new file mode 100644 index 000000000..e198f1279 --- /dev/null +++ b/test/stdout/2090 @@ -0,0 +1,110 @@ +Connecting to 127.0.0.1 port 1225 ... connected +??? 220 +<<< 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +>>> EHLO rhu.barb +??? 250- +<<< 250-the.local.host.name Hello rhu.barb [127.0.0.1] +??? 250-SIZE +<<< 250-SIZE 52428800 +??? 250-8BITMIME +<<< 250-8BITMIME +??? 250-PIPELINING +<<< 250-PIPELINING +??? 250-CHUNKING +<<< 250-CHUNKING +??? 250-STARTTLS +<<< 250-STARTTLS +??? 250 HELP +<<< 250 HELP +>>> STARTTLS +??? 220 +<<< 220 TLS go ahead +Attempting to start TLS +Succeeded in starting TLS +>>> EHLO rhu.barb +??? 250- +<<< 250-the.local.host.name Hello rhu.barb [127.0.0.1] +??? 250-SIZE +<<< 250-SIZE 52428800 +??? 250-8BITMIME +<<< 250-8BITMIME +??? 250-PIPELINING +<<< 250-PIPELINING +??? 250-CHUNKING +<<< 250-CHUNKING +??? 250 HELP +<<< 250 HELP +>>> MAIL FROM: +??? 250 +<<< 250 OK +>>> RCPT TO: +??? 250 +<<< 250 Accepted +>>> BDAT 88 LAST +>>> To: Susan@random.com +>>> From: Sam@random.com +>>> Subject: This is a bodyless test message +>>> +??? 250- +<<< 250- 88 byte chunk, total 88 +??? 250 +<<< 250 OK id=10HmaX-0005vi-00 +>>> QUIT +??? 221 +<<< 221 the.local.host.name closing connection +End of script +Connecting to 127.0.0.1 port 1225 ... connected +??? 220 +<<< 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +>>> EHLO rhu.barb +??? 250- +<<< 250-the.local.host.name Hello rhu.barb [127.0.0.1] +??? 250-SIZE +<<< 250-SIZE 52428800 +??? 250-8BITMIME +<<< 250-8BITMIME +??? 250-PIPELINING +<<< 250-PIPELINING +??? 250-CHUNKING +<<< 250-CHUNKING +??? 250-STARTTLS +<<< 250-STARTTLS +??? 250 HELP +<<< 250 HELP +>>> STARTTLS +??? 220 +<<< 220 TLS go ahead +Attempting to start TLS +Succeeded in starting TLS +>>> EHLO rhu.barb +??? 250- +<<< 250-the.local.host.name Hello rhu.barb [127.0.0.1] +??? 250-SIZE +<<< 250-SIZE 52428800 +??? 250-8BITMIME +<<< 250-8BITMIME +??? 250-PIPELINING +<<< 250-PIPELINING +??? 250-CHUNKING +<<< 250-CHUNKING +??? 250 HELP +<<< 250 HELP +>>> MAIL FROM: +>>> RCPT TO: +>>> BDAT 88 LAST +>>> To: Susan@random.com +>>> From: Sam@random.com +>>> Subject: This is a bodyless test message +>>> +??? 250 +<<< 250 OK +??? 250 +<<< 250 Accepted +??? 250- +<<< 250- 88 byte chunk, total 88 +??? 250 +<<< 250 OK id=10HmaY-0005vi-00 +>>> QUIT +??? 221 +<<< 221 the.local.host.name closing connection +End of script diff --git a/test/stdout/2190 b/test/stdout/2190 new file mode 100644 index 000000000..7942a8ce5 --- /dev/null +++ b/test/stdout/2190 @@ -0,0 +1,138 @@ +Connecting to 127.0.0.1 port 1225 ... connected +??? 220 +<<< 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +>>> EHLO rhu.barb +??? 250- +<<< 250-the.local.host.name Hello rhu.barb [127.0.0.1] +??? 250-SIZE +<<< 250-SIZE 52428800 +??? 250-8BITMIME +<<< 250-8BITMIME +??? 250-PIPELINING +<<< 250-PIPELINING +??? 250-CHUNKING +<<< 250-CHUNKING +??? 250-STARTTLS +<<< 250-STARTTLS +??? 250 HELP +<<< 250 HELP +>>> STARTTLS +??? 220 +<<< 220 TLS go ahead +Attempting to start TLS +SSL info: before/connect initialization +SSL info: before/connect initialization +SSL info: SSLv3 read server hello A +SSL info: SSLv3 read server certificate A +SSL info: SSLv3 read server done A +SSL info: SSLv3 write client key exchange A +SSL info: SSLv3 write change cipher spec A +SSL info: SSLv3 write finished A +SSL info: SSLv3 flush data +SSL info: SSLv3 read server session ticket A +SSL info: SSLv3 read finished A +SSL info: SSL negotiation finished successfully +SSL info: SSL negotiation finished successfully +SSL connection using AES256-SHA +Succeeded in starting TLS +>>> EHLO rhu.barb +??? 250- +<<< 250-the.local.host.name Hello rhu.barb [127.0.0.1] +??? 250-SIZE +<<< 250-SIZE 52428800 +??? 250-8BITMIME +<<< 250-8BITMIME +??? 250-PIPELINING +<<< 250-PIPELINING +??? 250-CHUNKING +<<< 250-CHUNKING +??? 250 HELP +<<< 250 HELP +>>> MAIL FROM: +??? 250 +<<< 250 OK +>>> RCPT TO: +??? 250 +<<< 250 Accepted +>>> BDAT 88 LAST +>>> To: Susan@random.com +>>> From: Sam@random.com +>>> Subject: This is a bodyless test message +>>> +??? 250- +<<< 250- 88 byte chunk, total 88 +??? 250 +<<< 250 OK id=10HmaX-0005vi-00 +>>> QUIT +??? 221 +<<< 221 the.local.host.name closing connection +End of script +Connecting to 127.0.0.1 port 1225 ... connected +??? 220 +<<< 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +>>> EHLO rhu.barb +??? 250- +<<< 250-the.local.host.name Hello rhu.barb [127.0.0.1] +??? 250-SIZE +<<< 250-SIZE 52428800 +??? 250-8BITMIME +<<< 250-8BITMIME +??? 250-PIPELINING +<<< 250-PIPELINING +??? 250-CHUNKING +<<< 250-CHUNKING +??? 250-STARTTLS +<<< 250-STARTTLS +??? 250 HELP +<<< 250 HELP +>>> STARTTLS +??? 220 +<<< 220 TLS go ahead +Attempting to start TLS +SSL info: before/connect initialization +SSL info: before/connect initialization +SSL info: SSLv3 read server hello A +SSL info: SSLv3 read server certificate A +SSL info: SSLv3 read server done A +SSL info: SSLv3 write client key exchange A +SSL info: SSLv3 write change cipher spec A +SSL info: SSLv3 write finished A +SSL info: SSLv3 flush data +SSL info: SSLv3 read server session ticket A +SSL info: SSLv3 read finished A +SSL info: SSL negotiation finished successfully +SSL info: SSL negotiation finished successfully +SSL connection using AES256-SHA +Succeeded in starting TLS +>>> EHLO rhu.barb +??? 250- +<<< 250-the.local.host.name Hello rhu.barb [127.0.0.1] +??? 250-SIZE +<<< 250-SIZE 52428800 +??? 250-8BITMIME +<<< 250-8BITMIME +??? 250-PIPELINING +<<< 250-PIPELINING +??? 250-CHUNKING +<<< 250-CHUNKING +??? 250 HELP +<<< 250 HELP +>>> MAIL FROM: +>>> RCPT TO: +>>> BDAT 88 LAST +>>> To: Susan@random.com +>>> From: Sam@random.com +>>> Subject: This is a bodyless test message +>>> +??? 250 +<<< 250 OK +??? 250 +<<< 250 Accepted +??? 250- +<<< 250- 88 byte chunk, total 88 +??? 250 +<<< 250 OK id=10HmaY-0005vi-00 +>>> QUIT +??? 221 +<<< 221 the.local.host.name closing connection +End of script -- cgit v1.2.3 From 0b20855c02c44cb79a33824596e3ad8dc906131f Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Tue, 2 Aug 2016 00:24:00 +0100 Subject: testcases for PRDR --- test/confs/0900 | 8 ++++++++ test/confs/5590 | 1 + test/confs/5591 | 1 + test/log/5590 | 7 +++++++ test/log/5591 | 4 ++++ test/scripts/5500-PRDR/5590 | 40 ++++++++++++++++++++++++++++++++++++++++ test/scripts/5500-PRDR/5591 | 32 ++++++++++++++++++++++++++++++++ test/scripts/5500-PRDR/REQUIRES | 1 + test/stdout/5591 | 24 ++++++++++++++++++++++++ 9 files changed, 118 insertions(+) create mode 120000 test/confs/5590 create mode 120000 test/confs/5591 create mode 100644 test/log/5590 create mode 100644 test/log/5591 create mode 100644 test/scripts/5500-PRDR/5590 create mode 100644 test/scripts/5500-PRDR/5591 create mode 100644 test/stdout/5591 (limited to 'test/stdout') diff --git a/test/confs/0900 b/test/confs/0900 index 245d9fa96..427669c4b 100644 --- a/test/confs/0900 +++ b/test/confs/0900 @@ -3,6 +3,7 @@ SERVER= X= Y= OPT= +ALLOW= exim_path = EXIM_PATH keep_environment = @@ -20,6 +21,7 @@ tls_advertise_hosts = ${if eq {Y}{tls} {*}} domainlist local_domains = @ : test.ex acl_smtp_rcpt = check_recipient +acl_smtp_data_prdr = check_prdr acl_smtp_data = check_data trusted_users = CALLER queue_only @@ -29,6 +31,8 @@ log_selector = +received_recipients tls_certificate = ${if eq {SERVER}{server}{DIR/aux-fixed/cert1}fail} tls_privatekey = ${if eq {SERVER}{server}{DIR/aux-fixed/cert1}fail} +ALLOW + # ----- ACL ----- begin acl @@ -38,6 +42,10 @@ check_recipient: accept domains = +local_domains deny message = relay not permitted +check_prdr: + accept local_parts = good + deny + check_data: warn message = X-acl-message-linecount: $message_linecount accept diff --git a/test/confs/5590 b/test/confs/5590 new file mode 120000 index 000000000..1bb987150 --- /dev/null +++ b/test/confs/5590 @@ -0,0 +1 @@ +0900 \ No newline at end of file diff --git a/test/confs/5591 b/test/confs/5591 new file mode 120000 index 000000000..1bb987150 --- /dev/null +++ b/test/confs/5591 @@ -0,0 +1 @@ +0900 \ No newline at end of file diff --git a/test/log/5590 b/test/log/5590 new file mode 100644 index 000000000..1959dac0f --- /dev/null +++ b/test/log/5590 @@ -0,0 +1,7 @@ + +******** SERVER ******** +1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225 +1999-03-02 09:44:33 10HmaX-0005vi-00 PRDR R= refusal +1999-03-02 09:44:33 10HmaX-0005vi-00 PRDR R= acceptance +1999-03-02 09:44:33 10HmaX-0005vi-00 PRDR R= refusal +1999-03-02 09:44:33 10HmaX-0005vi-00 <= someone@some.domain H=(tester) [127.0.0.1] P=esmtp PRDR K S=sss for bad1@test.ex good@test.ex bad2@test.ex diff --git a/test/log/5591 b/test/log/5591 new file mode 100644 index 000000000..0b9bd84ef --- /dev/null +++ b/test/log/5591 @@ -0,0 +1,4 @@ +1999-03-02 09:44:33 10HmaX-0005vi-00 <= sender_gets_replaced@the.local.host.name U=CALLER P=local S=sss for usery userz +1999-03-02 09:44:33 10HmaX-0005vi-00 => usery@the.local.host.name R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1] PRDR C="250 first rcpt was good" +1999-03-02 09:44:33 10HmaX-0005vi-00 -> userz@the.local.host.name R=to_server T=remote_smtp H=127.0.0.1 [127.0.0.1] PRDR C="250 second rcpt was good" +1999-03-02 09:44:33 10HmaX-0005vi-00 Completed diff --git a/test/scripts/5500-PRDR/5590 b/test/scripts/5500-PRDR/5590 new file mode 100644 index 000000000..a9722ff81 --- /dev/null +++ b/test/scripts/5500-PRDR/5590 @@ -0,0 +1,40 @@ +# PRDR and CHUNKING reception +exim -DALLOW=prdr_enable -DSERVER=server -bd -oX PORT_D +**** +# +client 127.0.0.1 PORT_D +??? 220 +EHLO tester +??? 250- +??? 250-SIZE +??? 250-8BITMIME +??? 250-PIPELINING +??? 250-CHUNKING +??? 250-PRDR +??? 250 +MAIL FROM: PRDR +??? 250 +RCPT TO: +??? 250 +RCPT TO: +??? 250 +RCPT TO: +??? 250 +BDAT 100 last +To: Susan@random.com +From: Sam@random.com +Subject: This is a bodyfull test message + +1234567890 +??? 353 +??? 550 +??? 250 +??? 550 +??? 250 +QUIT +??? 221 +**** +# +# +killdaemon +no_msglog_check diff --git a/test/scripts/5500-PRDR/5591 b/test/scripts/5500-PRDR/5591 new file mode 100644 index 000000000..67b9de298 --- /dev/null +++ b/test/scripts/5500-PRDR/5591 @@ -0,0 +1,32 @@ +# PRDR and CHUNKING transmission +need_ipv4 +no_msglog_check +# +# Two recipients, accepted by full PRDR response sequence +server PORT_S +220 Server ready +EHLO +250-hiya matey +250-PRDR +250-CHUNKING +250 OK +MAIL FROM:<> PRDR +250 OK +RCPT TO +250 OK +RCPT TO +250 OK +BDAT 317 LAST +*data 317 +353 prdr responses coming up +250 first rcpt was good +250 second rcpt was good +250 OK, overall +QUIT +250 OK +**** +exim -odi -f sender_gets_replaced usery userz +Some message text. +**** +# +# diff --git a/test/scripts/5500-PRDR/REQUIRES b/test/scripts/5500-PRDR/REQUIRES index e69de29bb..bca921eaf 100644 --- a/test/scripts/5500-PRDR/REQUIRES +++ b/test/scripts/5500-PRDR/REQUIRES @@ -0,0 +1 @@ +support PRDR diff --git a/test/stdout/5591 b/test/stdout/5591 new file mode 100644 index 000000000..1a65e063d --- /dev/null +++ b/test/stdout/5591 @@ -0,0 +1,24 @@ + +******** SERVER ******** +Listening on port 1224 ... +Connection request from [127.0.0.1] +220 Server ready +EHLO the.local.host.name +250-hiya matey +250-PRDR +250-CHUNKING +250 OK +MAIL FROM:<> PRDR +250 OK +RCPT TO: +250 OK +RCPT TO: +250 OK +BDAT 317 LAST +353 prdr responses coming up +250 first rcpt was good +250 second rcpt was good +250 OK, overall +QUIT +250 OK +End of script -- cgit v1.2.3 From 2d14f39731e88a6d6bb9f1b5c56f497eb12198c4 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Tue, 2 Aug 2016 12:10:41 +0100 Subject: pass advertised facility to continued-transport process --- doc/doc-docbook/spec.xfpt | 2 +- src/src/exim.c | 67 +++++++++------------- src/src/globals.c | 6 +- src/src/globals.h | 6 +- src/src/transport.c | 24 ++++---- src/src/transports/smtp.c | 130 +++++++++++++++++++++++-------------------- src/src/verify.c | 2 +- test/log/0900 | 1 + test/scripts/0000-Basic/0900 | 31 ++++++++++- test/stdout/0900 | 35 +++++++++++- 10 files changed, 176 insertions(+), 128 deletions(-) (limited to 'test/stdout') diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 5edeee442..6302f5185 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -27767,7 +27767,7 @@ associated with the DATA command. .cindex "RFC 3030" CHUNKING If CHUNKING was advertised and a BDAT command sequence is received, the &%acl_smtp_predata%& ACL is not run. -.XXX why not? It should be possible, for the first BDAT. +. XXX why not? It should be possible, for the first BDAT. The &%acl_smtp_data%& is run after the last BDAT command and all of the data specified is received. .wen diff --git a/src/src/exim.c b/src/src/exim.c index 01770df73..14e0b9d67 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -2717,76 +2717,63 @@ for (i = 1; i < argc; i++) break; } + else if (*argrest == 'C' && argrest[1] && !argrest[2]) + { + switch(argrest[1]) + { /* -MCA: set the smtp_authenticated flag; this is useful only when it precedes -MC (see above). The flag indicates that the host to which Exim is connected has accepted an AUTH sequence. */ - else if (Ustrcmp(argrest, "CA") == 0) - { - smtp_authenticated = TRUE; - break; - } + case 'A': smtp_authenticated = TRUE; break; /* -MCD: set the smtp_use_dsn flag; this indicates that the host that exim is connected to supports the esmtp extension DSN */ - else if (Ustrcmp(argrest, "CD") == 0) - { - smtp_use_dsn = TRUE; - break; - } + case 'D': smtp_peer_options |= PEER_OFFERED_DSN; break; /* -MCG: set the queue name, to a non-default value */ - else if (Ustrcmp(argrest, "CG") == 0) - { - if (++i < argc) queue_name = string_copy(argv[i]); - else badarg = TRUE; - break; - } + case 'G': if (++i < argc) queue_name = string_copy(argv[i]); + else badarg = TRUE; + break; + + /* -MCK: the peer offered CHUNKING. Must precede -MC */ + + case 'K': smtp_peer_options |= PEER_OFFERED_CHUNKING; break; /* -MCP: set the smtp_use_pipelining flag; this is useful only when it preceded -MC (see above) */ - else if (Ustrcmp(argrest, "CP") == 0) - { - smtp_use_pipelining = TRUE; - break; - } + case 'P': smtp_peer_options |= PEER_OFFERED_PIPE; break; /* -MCQ: pass on the pid of the queue-running process that started this chain of deliveries and the fd of its synchronizing pipe; this is useful only when it precedes -MC (see above) */ - else if (Ustrcmp(argrest, "CQ") == 0) - { - if (++i < argc) passed_qr_pid = (pid_t)(Uatol(argv[i])); - else badarg = TRUE; - if (++i < argc) passed_qr_pipe = (int)(Uatol(argv[i])); - else badarg = TRUE; - break; - } + case 'Q': if (++i < argc) passed_qr_pid = (pid_t)(Uatol(argv[i])); + else badarg = TRUE; + if (++i < argc) passed_qr_pipe = (int)(Uatol(argv[i])); + else badarg = TRUE; + break; /* -MCS: set the smtp_use_size flag; this is useful only when it precedes -MC (see above) */ - else if (Ustrcmp(argrest, "CS") == 0) - { - smtp_use_size = TRUE; - break; - } + case 'S': smtp_peer_options |= PEER_OFFERED_SIZE; break; +#ifdef SUPPORT_TLS /* -MCT: set the tls_offered flag; this is useful only when it precedes -MC (see above). The flag indicates that the host to which Exim is connected has offered TLS support. */ - #ifdef SUPPORT_TLS - else if (Ustrcmp(argrest, "CT") == 0) - { - tls_offered = TRUE; - break; + case 'T': smtp_peer_options |= PEER_OFFERED_TLS; break; +#endif + + default: badarg = TRUE; break; + } + break; } - #endif /* -M[x]: various operations on the following list of message ids: -M deliver the messages, ignoring next retry times and thawing diff --git a/src/src/globals.c b/src/src/globals.c index ba1336633..9e6f9d347 100644 --- a/src/src/globals.c +++ b/src/src/globals.c @@ -138,7 +138,6 @@ tls_support tls_out = { uschar *dsn_envid = NULL; int dsn_ret = 0; const pcre *regex_DSN = NULL; -BOOL smtp_use_dsn = FALSE; uschar *dsn_advertise_hosts = NULL; #ifdef SUPPORT_TLS @@ -158,7 +157,6 @@ uschar *tls_eccurve = US"prime256v1"; # ifndef DISABLE_OCSP uschar *tls_ocsp_file = NULL; # endif -BOOL tls_offered = FALSE; uschar *tls_privatekey = NULL; BOOL tls_remember_esmtp = FALSE; uschar *tls_require_ciphers = NULL; @@ -1322,8 +1320,8 @@ int smtp_rlr_base = 0; double smtp_rlr_factor = 0.0; int smtp_rlr_limit = 0; int smtp_rlr_threshold = INT_MAX; -BOOL smtp_use_pipelining = FALSE; -BOOL smtp_use_size = FALSE; +unsigned smtp_peer_options = 0; +unsigned smtp_peer_options_wrap= 0; #ifdef SUPPORT_I18N uschar *smtputf8_advertise_hosts = US"*"; /* overridden under test-harness */ #endif diff --git a/src/src/globals.h b/src/src/globals.h index f9af38ef5..b2bfca64c 100644 --- a/src/src/globals.h +++ b/src/src/globals.h @@ -119,7 +119,6 @@ extern uschar *tls_eccurve; /* EC curve */ # ifndef DISABLE_OCSP extern uschar *tls_ocsp_file; /* OCSP stapling proof file */ # endif -extern BOOL tls_offered; /* Server offered TLS */ extern uschar *tls_privatekey; /* Private key file */ extern BOOL tls_remember_esmtp; /* For YAEB */ extern uschar *tls_require_ciphers; /* So some can be avoided */ @@ -132,7 +131,6 @@ extern uschar *tls_advertise_hosts; /* host for which TLS is advertised */ extern uschar *dsn_envid; /* DSN envid string */ extern int dsn_ret; /* DSN ret type*/ extern const pcre *regex_DSN; /* For recognizing DSN settings */ -extern BOOL smtp_use_dsn; /* Global for passed connections */ extern uschar *dsn_advertise_hosts; /* host for which TLS is advertised */ /* Input-reading functions for messages, so we can use special ones for @@ -838,8 +836,8 @@ extern int smtp_rlr_base; /* Base interval for RCPT rate limit */ extern double smtp_rlr_factor; /* Factor for RCPT rate limit */ extern int smtp_rlr_limit; /* Max delay */ extern int smtp_rlr_threshold; /* Threshold for RCPT rate limit */ -extern BOOL smtp_use_pipelining; /* Global for passed connections */ -extern BOOL smtp_use_size; /* Global for passed connections */ +extern unsigned smtp_peer_options; /* Global flags for passed connections */ +extern unsigned smtp_peer_options_wrap; /* stacked version hidden by TLS */ #ifdef SUPPORT_I18N extern uschar *smtputf8_advertise_hosts; /* ingress control */ #endif diff --git a/src/src/transport.c b/src/src/transport.c index 3987fad3e..88d925e39 100644 --- a/src/src/transport.c +++ b/src/src/transport.c @@ -826,12 +826,12 @@ Arguments: end_dot if TRUE, send a terminating "." line at the end no_headers if TRUE, omit the headers no_body if TRUE, omit the body - size_limit if > 0, this is a limit to the size of message written; + check_string a string to check for at the start of lines, or NULL + escape_string a string to insert in front of any check string + size_limit if > 0, this is a limit to the size of message written; it is used when returning messages to their senders, and is approximate rather than exact, owing to chunk buffering - check_string a string to check for at the start of lines, or NULL - escape_string a string to insert in front of any check string Returns: TRUE on success; FALSE (with errno) on failure. In addition, the global variable transport_count @@ -1228,7 +1228,6 @@ set up a filtering process, fork another process to call the internal function to write to the filter, and in this process just suck from the filter and write down the given fd. At the end, tidy up the pipes and the processes. -XXX Arguments: as for internal_transport_write_message() above Returns: TRUE on success; FALSE (with errno) for any failure @@ -1944,7 +1943,7 @@ DEBUG(D_transport) debug_printf("transport_pass_socket entered\n"); if ((pid = fork()) == 0) { - int i = 16; + int i = 17; const uschar **argv; /* Disconnect entirely from the parent process. If we are running in the @@ -1960,16 +1959,15 @@ if ((pid = fork()) == 0) argv = CUSS child_exec_exim(CEE_RETURN_ARGV, TRUE, &i, FALSE, 0); - if (smtp_use_dsn) argv[i++] = US"-MCD"; - if (smtp_authenticated) argv[i++] = US"-MCA"; - #ifdef SUPPORT_TLS - if (tls_offered) argv[i++] = US"-MCT"; - #endif - - if (smtp_use_size) argv[i++] = US"-MCS"; - if (smtp_use_pipelining) argv[i++] = US"-MCP"; + if (smtp_peer_options & PEER_OFFERED_CHUNKING) argv[i++] = US"-MCK"; + if (smtp_peer_options & PEER_OFFERED_DSN) argv[i++] = US"-MCD"; + if (smtp_peer_options & PEER_OFFERED_PIPE) argv[i++] = US"-MCP"; + if (smtp_peer_options & PEER_OFFERED_SIZE) argv[i++] = US"-MCS"; +#ifdef SUPPORT_TLS + if (smtp_peer_options & PEER_OFFERED_TLS) argv[i++] = US"-MCT"; +#endif if (queue_run_pid != (pid_t)0) { diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index 110ced240..25e493433 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -12,6 +12,8 @@ #define PENDING_DEFER (PENDING + DEFER) #define PENDING_OK (PENDING + OK) +#define DELIVER_BUFFER_SIZE 4096 + /* Options specific to the smtp transport. This transport also supports LMTP over TCP/IP. The options must be in alphabetic order (note that "_" comes @@ -1406,8 +1408,7 @@ if (flags & tc_reap_prev && prev_cmd_count > 0) tctx->pending_MAIL, 0, tctx->inblock, ob->command_timeout, - buffer, 4096)) -/*XXX buffer size! */ + buffer, DELIVER_BUFFER_SIZE)) { case 1: /* 2xx (only) => OK */ case 3: tctx->good_RCPT = TRUE; /* 2xx & 5xx => OK & progress made */ @@ -1426,8 +1427,7 @@ if (flags & tc_reap_prev && prev_cmd_count > 0) if (flags & tc_reap_one || tctx->pending_BDAT) { -/*XXX buffer size! */ - if (!smtp_read_response(tctx->inblock, buffer, 4096, '2', + if (!smtp_read_response(tctx->inblock, buffer, DELIVER_BUFFER_SIZE, '2', ob->command_timeout)) { if (errno == 0 && buffer[0] == '4') @@ -1521,7 +1521,7 @@ BOOL completed_address = FALSE; BOOL esmtp = TRUE; BOOL pending_MAIL; BOOL pass_message = FALSE; -uschar peer_offered = 0; /*XXX should this be handed on cf. tls_offered, smtp_use_dsn ? */ +uschar peer_offered = 0; #ifndef DISABLE_PRDR BOOL prdr_active; #endif @@ -1548,7 +1548,7 @@ uschar *helo_data = NULL; uschar *message = NULL; uschar new_message_id[MESSAGE_ID_LENGTH + 1]; uschar *p; -uschar buffer[4096]; +uschar buffer[DELIVER_BUFFER_SIZE]; uschar inbuffer[4096]; uschar outbuffer[4096]; @@ -1756,7 +1756,7 @@ goto SEND_QUIT; #ifdef SUPPORT_TLS if (smtps) { - tls_offered = TRUE; + smtp_peer_options |= PEER_OFFERED_TLS; suppress_tls = FALSE; ob->tls_tempfail_tryclear = FALSE; smtp_command = US"SSL-on-connect"; @@ -1805,7 +1805,10 @@ goto SEND_QUIT; if (!good_response) goto RESPONSE_FAILED; } + peer_offered = smtp_peer_options = 0; + if (esmtp || lmtp) + { peer_offered = ehlo_response(buffer, Ustrlen(buffer), PEER_OFFERED_TLS /* others checked later */ ); @@ -1813,14 +1816,15 @@ goto SEND_QUIT; /* Set tls_offered if the response to EHLO specifies support for STARTTLS. */ #ifdef SUPPORT_TLS - tls_offered = !!(peer_offered & PEER_OFFERED_TLS); + smtp_peer_options |= peer_offered & PEER_OFFERED_TLS; #endif + } } /* For continuing deliveries down the same channel, the socket is the standard input, and we don't need to redo EHLO here (but may need to do so for TLS - see below). Set up the pointer to where subsequent commands will be left, for -error messages. Note that smtp_use_size and smtp_use_pipelining will have been +error messages. Note that smtp_peer_options will have been set from the command line if they were set in the process that passed the connection on. */ @@ -1845,7 +1849,7 @@ the client not be required to use TLS. If the response is bad, copy the buffer for error analysis. */ #ifdef SUPPORT_TLS -if ( tls_offered +if ( smtp_peer_options & PEER_OFFERED_TLS && !suppress_tls && verify_check_given_host(&ob->hosts_avoid_tls, host) != OK) { @@ -1907,6 +1911,7 @@ if ( tls_offered /* TLS session is set up */ + smtp_peer_options_wrap = smtp_peer_options; for (addr = addrlist; addr; addr = addr->next) if (addr->transport_return == PENDING_DEFER) { @@ -1976,6 +1981,7 @@ if (tls_out.active >= 0) helo_response = string_copy(buffer); #endif if (!good_response) goto RESPONSE_FAILED; + smtp_peer_options = 0; } /* If the host is required to use a secure channel, ensure that we @@ -1990,8 +1996,8 @@ else if ( smtps { save_errno = ERRNO_TLSREQUIRED; message = string_sprintf("a TLS session is required, but %s", - tls_offered ? "an attempt to start TLS failed" - : "the server did not offer TLS support"); + smtp_peer_options & PEER_OFFERED_TLS + ? "an attempt to start TLS failed" : "the server did not offer TLS support"); goto TLS_FAILED; } #endif /*SUPPORT_TLS*/ @@ -2008,6 +2014,7 @@ if (continue_hostname == NULL ) { if (esmtp || lmtp) + { peer_offered = ehlo_response(buffer, Ustrlen(buffer), 0 /* no TLS */ | (lmtp && ob->lmtp_ignore_quota ? PEER_OFFERED_IGNQ : 0) @@ -2015,7 +2022,7 @@ if (continue_hostname == NULL | PEER_OFFERED_PRDR #ifdef SUPPORT_I18N | (addrlist->prop.utf8_msg ? PEER_OFFERED_UTF8 : 0) - /*XXX if we hand peercaps on to continued-conn processes, + /*XXX if we hand peercaps on to continued-conn processes, must not depend on this addr */ #endif | PEER_OFFERED_DSN @@ -2023,61 +2030,64 @@ if (continue_hostname == NULL | (ob->size_addition >= 0 ? PEER_OFFERED_SIZE : 0) ); - /* Set for IGNOREQUOTA if the response to LHLO specifies support and the - lmtp_ignore_quota option was set. */ + /* Set for IGNOREQUOTA if the response to LHLO specifies support and the + lmtp_ignore_quota option was set. */ - igquotstr = peer_offered & PEER_OFFERED_IGNQ ? US" IGNOREQUOTA" : US""; + igquotstr = peer_offered & PEER_OFFERED_IGNQ ? US" IGNOREQUOTA" : US""; - /* If the response to EHLO specified support for the SIZE parameter, note - this, provided size_addition is non-negative. */ + /* If the response to EHLO specified support for the SIZE parameter, note + this, provided size_addition is non-negative. */ - smtp_use_size = !!(peer_offered & PEER_OFFERED_SIZE); + smtp_peer_options |= peer_offered & PEER_OFFERED_SIZE; - /* Note whether the server supports PIPELINING. If hosts_avoid_esmtp matched - the current host, esmtp will be false, so PIPELINING can never be used. If - the current host matches hosts_avoid_pipelining, don't do it. */ + /* Note whether the server supports PIPELINING. If hosts_avoid_esmtp matched + the current host, esmtp will be false, so PIPELINING can never be used. If + the current host matches hosts_avoid_pipelining, don't do it. */ - smtp_use_pipelining = peer_offered & PEER_OFFERED_PIPE - && verify_check_given_host(&ob->hosts_avoid_pipelining, host) != OK; + if ( peer_offered & PEER_OFFERED_PIPE + && verify_check_given_host(&ob->hosts_avoid_pipelining, host) != OK) + smtp_peer_options |= PEER_OFFERED_PIPE; - DEBUG(D_transport) debug_printf("%susing PIPELINING\n", - smtp_use_pipelining ? "" : "not "); + DEBUG(D_transport) debug_printf("%susing PIPELINING\n", + smtp_peer_options & PEER_OFFERED_PIPE ? "" : "not "); - if ( peer_offered & PEER_OFFERED_CHUNKING - && verify_check_given_host(&ob->hosts_try_chunking, host) != OK) - peer_offered &= ~PEER_OFFERED_CHUNKING; + if ( peer_offered & PEER_OFFERED_CHUNKING + && verify_check_given_host(&ob->hosts_try_chunking, host) != OK) + peer_offered &= ~PEER_OFFERED_CHUNKING; - if (peer_offered & PEER_OFFERED_CHUNKING) - {DEBUG(D_transport) debug_printf("CHUNKING usable\n");} + if (peer_offered & PEER_OFFERED_CHUNKING) + {DEBUG(D_transport) debug_printf("CHUNKING usable\n");} #ifndef DISABLE_PRDR - if ( peer_offered & PEER_OFFERED_PRDR - && verify_check_given_host(&ob->hosts_try_prdr, host) != OK) - peer_offered &= ~PEER_OFFERED_PRDR; + if ( peer_offered & PEER_OFFERED_PRDR + && verify_check_given_host(&ob->hosts_try_prdr, host) != OK) + peer_offered &= ~PEER_OFFERED_PRDR; - if (peer_offered & PEER_OFFERED_PRDR) - {DEBUG(D_transport) debug_printf("PRDR usable\n");} + if (peer_offered & PEER_OFFERED_PRDR) + {DEBUG(D_transport) debug_printf("PRDR usable\n");} #endif - /* Note if the server supports DSN */ - smtp_use_dsn = !!(peer_offered & PEER_OFFERED_DSN); - DEBUG(D_transport) debug_printf("%susing DSN\n", smtp_use_dsn ? "" : "not "); + /* Note if the server supports DSN */ + smtp_peer_options |= peer_offered & PEER_OFFERED_DSN; + DEBUG(D_transport) debug_printf("%susing DSN\n", + peer_offered & PEER_OFFERED_DSN ? "" : "not "); - /* Note if the response to EHLO specifies support for the AUTH extension. - If it has, check that this host is one we want to authenticate to, and do - the business. The host name and address must be available when the - authenticator's client driver is running. */ + /* Note if the response to EHLO specifies support for the AUTH extension. + If it has, check that this host is one we want to authenticate to, and do + the business. The host name and address must be available when the + authenticator's client driver is running. */ - switch (yield = smtp_auth(buffer, sizeof(buffer), addrlist, host, - ob, esmtp, &inblock, &outblock)) - { - default: goto SEND_QUIT; - case OK: break; - case FAIL_SEND: goto SEND_FAILED; - case FAIL: goto RESPONSE_FAILED; + switch (yield = smtp_auth(buffer, sizeof(buffer), addrlist, host, + ob, esmtp, &inblock, &outblock)) + { + default: goto SEND_QUIT; + case OK: break; + case FAIL_SEND: goto SEND_FAILED; + case FAIL: goto RESPONSE_FAILED; + } } } -pipelining_active = smtp_use_pipelining; +pipelining_active = !!(smtp_peer_options & PEER_OFFERED_PIPE); /* The setting up of the SMTP call is now complete. Any subsequent errors are message-specific. */ @@ -2162,7 +2172,7 @@ included in the count.) */ p = buffer; *p = 0; -if (smtp_use_size) +if (peer_offered & PEER_OFFERED_SIZE) { sprintf(CS p, " SIZE=%d", message_size+message_linecount+ob->size_addition); while (*p) p++; @@ -2206,7 +2216,7 @@ for (dsn_all_lasthop = TRUE, addr = first_addr; /* Add any DSN flags to the mail command */ -if (smtp_use_dsn && !dsn_all_lasthop) +if (peer_offered & PEER_OFFERED_DSN && !dsn_all_lasthop) { if (dsn_ret == dsn_ret_hdrs) { Ustrcpy(p, " RET=HDRS"); p += 9; } @@ -2264,7 +2274,7 @@ pending_MAIL = TRUE; /* The block starts with MAIL */ } #endif - rc = smtp_write_command(&outblock, smtp_use_pipelining, + rc = smtp_write_command(&outblock, pipelining_active, "MAIL FROM:<%s>%s\r\n", s, buffer); } @@ -2311,21 +2321,22 @@ for (addr = first_addr; BOOL no_flush; uschar * rcpt_addr; - addr->dsn_aware = smtp_use_dsn ? dsn_support_yes : dsn_support_no; + addr->dsn_aware = peer_offered & PEER_OFFERED_DSN + ? dsn_support_yes : dsn_support_no; if (addr->transport_return != PENDING_DEFER) continue; address_count++; - no_flush = smtp_use_pipelining && (!mua_wrapper || addr->next); + no_flush = pipelining_active && (!mua_wrapper || addr->next); /* Add any DSN flags to the rcpt command and add to the sent string */ p = buffer; *p = 0; - if (smtp_use_dsn && !(addr->dsn_flags & rf_dsnlasthop)) + if (peer_offered & PEER_OFFERED_DSN && !(addr->dsn_flags & rf_dsnlasthop)) { - if ((addr->dsn_flags & rf_dsnflags) != 0) + if (addr->dsn_flags & rf_dsnflags) { int i; BOOL first = TRUE; @@ -2424,7 +2435,7 @@ If using CHUNKING, do not send a BDAT until we know how big a chunk we want to send is. */ if ( !(peer_offered & PEER_OFFERED_CHUNKING) - && (ok || (smtp_use_pipelining && !mua_wrapper))) + && (ok || (pipelining_active && !mua_wrapper))) { int count = smtp_write_command(&outblock, FALSE, "DATA\r\n"); @@ -3031,6 +3042,7 @@ if (completed_address && ok && send_quit) if (tls_out.active >= 0) { tls_close(FALSE, TRUE); + smtp_peer_options = smtp_peer_options_wrap; if (smtps) ok = FALSE; else diff --git a/src/src/verify.c b/src/src/verify.c index 4c4dfc599..d890f5fc6 100644 --- a/src/src/verify.c +++ b/src/src/verify.c @@ -759,7 +759,7 @@ can do it there for the non-rcpt-verify case. For this we keep an addresscount. ? string_sprintf(" SIZE=%d", message_size + ob->size_addition) : US""; #ifdef SUPPORT_TLS - tls_offered = !!(peer_offered & PEER_OFFERED_TLS); + smtp_peer_options |= peer_offered & PEER_OFFERED_TLS; #endif /* If TLS is available on this connection attempt to diff --git a/test/log/0900 b/test/log/0900 index 10e96f9a3..63072b9a9 100644 --- a/test/log/0900 +++ b/test/log/0900 @@ -7,3 +7,4 @@ 1999-03-02 09:44:33 10HmbA-0005vi-00 SMTP data timeout (message abandoned) on connection from (tester) [127.0.0.1] F= 1999-03-02 09:44:33 SMTP connection from (tester) [127.0.0.1] lost while reading message data 1999-03-02 09:44:33 SMTP connection from (tester) [127.0.0.1] lost while reading message data +1999-03-02 09:44:33 10HmbB-0005vi-00 <= someone@some.domain H=(tester) [127.0.0.1] P=esmtp K S=sss for CALLER@the.local.host.name diff --git a/test/scripts/0000-Basic/0900 b/test/scripts/0000-Basic/0900 index cb8cf63e3..435906d60 100644 --- a/test/scripts/0000-Basic/0900 +++ b/test/scripts/0000-Basic/0900 @@ -2,13 +2,14 @@ exim -DSERVER=server -bd -oX PORT_D **** # +# plain, small message (no body) client 127.0.0.1 PORT_D ??? 220 ehlo tester ??? 250- -??? 250- -??? 250- -??? 250- +??? 250-SIZE +??? 250-8BITMIME +??? 250-PIPELINING ??? 250-CHUNKING ??? 250 HELP mail from:someone@some.domain @@ -26,6 +27,9 @@ quit ??? 221 **** # +# plain, small message (with body) +# nonlast 1st bdat, noop, last-bdat(0) +# immediate followon 2nd message client 127.0.0.1 PORT_D ??? 220 ehlo tester @@ -118,6 +122,7 @@ quit ??? 221 **** # +# followon EHLO and another message client 127.0.0.1 PORT_D ??? 220 ehlo tester @@ -166,5 +171,25 @@ quit ??? 221 **** # +# plain, small message (no body) +# pipelined +client 127.0.0.1 PORT_D +??? 220 +EHLO tester +??? 250- +??? 250-SIZE +??? 250-8BITMIME +??? 250-PIPELINING +??? 250-CHUNKING +??? 250 HELP +MAIL FROM:\r\nRCPT TO:\r\nBDAT 88 LAST\r\nTo: Susan@random.com\r\nFrom: Sam@random.com\r\nSubject: This is a bodyless test message\r\n +??? 250 +??? 250 +??? 250- +??? 250 +quit +??? 221 +**** +# killdaemon no_msglog_check diff --git a/test/stdout/0900 b/test/stdout/0900 index 24c591617..28f479c22 100644 --- a/test/stdout/0900 +++ b/test/stdout/0900 @@ -4,11 +4,11 @@ Connecting to 127.0.0.1 port 1225 ... connected >>> ehlo tester ??? 250- <<< 250-the.local.host.name Hello tester [127.0.0.1] -??? 250- +??? 250-SIZE <<< 250-SIZE 52428800 -??? 250- +??? 250-8BITMIME <<< 250-8BITMIME -??? 250- +??? 250-PIPELINING <<< 250-PIPELINING ??? 250-CHUNKING <<< 250-CHUNKING @@ -230,3 +230,32 @@ Connecting to 127.0.0.1 port 1225 ... connected ??? 221 <<< 221 the.local.host.name closing connection End of script +Connecting to 127.0.0.1 port 1225 ... connected +??? 220 +<<< 220 the.local.host.name ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000 +>>> EHLO tester +??? 250- +<<< 250-the.local.host.name Hello tester [127.0.0.1] +??? 250-SIZE +<<< 250-SIZE 52428800 +??? 250-8BITMIME +<<< 250-8BITMIME +??? 250-PIPELINING +<<< 250-PIPELINING +??? 250-CHUNKING +<<< 250-CHUNKING +??? 250 HELP +<<< 250 HELP +>>> MAIL FROM:\r\nRCPT TO:\r\nBDAT 88 LAST\r\nTo: Susan@random.com\r\nFrom: Sam@random.com\r\nSubject: This is a bodyless test message\r\n +??? 250 +<<< 250 OK +??? 250 +<<< 250 Accepted +??? 250- +<<< 250- 88 byte chunk, total 88 +??? 250 +<<< 250 OK id=10HmbB-0005vi-00 +>>> quit +??? 221 +<<< 221 the.local.host.name closing connection +End of script -- cgit v1.2.3