X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/00f00ca5c40d7deec2a8eddb9153b47830554b83..36a3b0416e0bed61d78e44f119cdafb1fde941ba:/src/src/smtp_in.c diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index 063d74a96..7328280be 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/smtp_in.c,v 1.9 2005/01/13 16:15:53 ph10 Exp $ */ +/* $Cambridge: exim/src/src/smtp_in.c,v 1.13 2005/03/15 14:09:12 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -823,10 +823,13 @@ authenticated_sender = NULL; bmi_run = 0; bmi_verdicts = NULL; #endif +#ifdef EXPERIMENTAL_DOMAINKEYS +dk_do_verify = 0; +#endif #ifdef EXPERIMENTAL_SPF spf_header_comment = NULL; spf_received = NULL; -spf_result = NULL; +spf_result = NULL; spf_smtp_comment = NULL; #endif body_linecount = body_zerocount = 0; @@ -1121,11 +1124,13 @@ int size = 256; int i, ptr; uschar *p, *s, *ss; -/* If we are running in the test harness, and the incoming call is from -127.0.0.2 (sic), have a short delay. This makes it possible to test handling of +/* If we are running in the test harness, and the incoming call is from +127.0.0.2 (sic), have a short delay. This makes it possible to test handling of input sent too soon (before the banner is output). */ -if (running_in_test_harness && Ustrcmp(sender_host_address, "127.0.0.2") == 0) +if (running_in_test_harness && + sender_host_address != NULL && + Ustrcmp(sender_host_address, "127.0.0.2") == 0) sleep(1); /* Default values for certain variables */ @@ -1257,16 +1262,16 @@ if (!sender_host_unknown) if (!host_checking && !sender_host_notsocket) { #if OPTSTYLE == 1 - SOCKLEN_T optlen = sizeof(struct ip_options) + MAX_IPOPTLEN; + EXIM_SOCKLEN_T optlen = sizeof(struct ip_options) + MAX_IPOPTLEN; struct ip_options *ipopt = store_get(optlen); #elif OPTSTYLE == 2 struct ip_opts ipoptblock; struct ip_opts *ipopt = &ipoptblock; - SOCKLEN_T optlen = sizeof(ipoptblock); + EXIM_SOCKLEN_T optlen = sizeof(ipoptblock); #else struct ipoption ipoptblock; struct ipoption *ipopt = &ipoptblock; - SOCKLEN_T optlen = sizeof(ipoptblock); + EXIM_SOCKLEN_T optlen = sizeof(ipoptblock); #endif /* Occasional genuine failures of getsockopt() have been seen - for @@ -1609,7 +1614,7 @@ if (smtp_enforce_sync && sender_host_address != NULL && !sender_host_notsocket) { int rc = read(fileno(smtp_in), smtp_inbuffer, in_buffer_size); if (rc > 150) rc = 150; - smtp_inbuffer[rc] = 0; + smtp_inbuffer[rc] = 0; log_write(0, LOG_MAIN|LOG_REJECT, "SMTP protocol violation: " "synchronization error (input sent without waiting for greeting): " "rejected connection from %s input=\"%s\"", host_and_ident(TRUE), @@ -1803,7 +1808,7 @@ uschar *sender_info = US""; uschar *what = (where == ACL_WHERE_PREDATA)? US"DATA" : #ifdef WITH_CONTENT_SCAN (where == ACL_WHERE_MIME)? US"during MIME ACL checks" : -#endif +#endif (where == ACL_WHERE_DATA)? US"after DATA" : string_sprintf("%s %s", acl_wherenames[where], smtp_data); @@ -3073,11 +3078,11 @@ while (done <= 0) smtp_printf("554 Too many recipients\r\n"); break; } - + if (acl_smtp_predata == NULL) rc = OK; else - { + { enable_dollar_recipients = TRUE; - rc = acl_check(ACL_WHERE_PREDATA, NULL, acl_smtp_predata, &user_msg, + rc = acl_check(ACL_WHERE_PREDATA, NULL, acl_smtp_predata, &user_msg, &log_msg); enable_dollar_recipients = FALSE; } @@ -3155,7 +3160,7 @@ while (done <= 0) BOOL save_log_testing_mode = log_testing_mode; address_test_mode = log_testing_mode = TRUE; (void) verify_address(deliver_make_addr(smtp_data, FALSE), smtp_out, - vopt_is_recipient | vopt_qualify | vopt_expn, -1, -1, -1, NULL, NULL, + vopt_is_recipient | vopt_qualify | vopt_expn, -1, -1, -1, NULL, NULL, NULL); address_test_mode = FALSE; log_testing_mode = save_log_testing_mode; /* true for -bh */