X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fsmtp_in.c;h=148486161afc24da7fd997766be438497ac56183;hb=91bde4a0253d38118dc227e184b793d476a013ce;hp=9282352aca2793622929a78c1bca82149b1c9ddd;hpb=8d330698b5121d75af35b62b420314f68026d1e5;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index 9282352ac..148486161 100644 --- a/src/src/smtp_in.c +++ b/src/src/smtp_in.c @@ -143,8 +143,6 @@ static BOOL pipelining_advertised; static BOOL rcpt_smtp_response_same; static BOOL rcpt_in_progress; static int nonmail_command_count; -static int off = 0; -static int on = 1; static BOOL smtp_exit_function_called = 0; #ifdef SUPPORT_I18N static BOOL smtputf8_advertised; @@ -1378,8 +1376,8 @@ Returns: a string describing the connection uschar * smtp_get_connection_info(void) { -uschar *hostname = (sender_fullhost == NULL)? - sender_host_address : sender_fullhost; +const uschar * hostname = sender_fullhost + ? sender_fullhost : sender_host_address; if (host_checking) return string_sprintf("SMTP connection from %s", hostname); @@ -3514,7 +3512,7 @@ while (done <= 0) uschar *orcpt = NULL; int flags; -#if defined(SUPPORT_TLS) && defined(AUTH_TLS) +#ifdef AUTH_TLS /* Check once per STARTTLS or SSL-on-connect for a TLS AUTH */ if ( tls_in.active >= 0 && tls_in.peercert @@ -3930,7 +3928,7 @@ while (done <= 0) them in either case in the AUTH command. */ if ( auths -#if defined(SUPPORT_TLS) && defined(AUTH_TLS) +#ifdef AUTH_TLS && !sender_host_authenticated #endif && verify_check_host(&auth_advertise_hosts) == OK @@ -4655,20 +4653,22 @@ while (done <= 0) there may be a delay in this, re-check for a synchronization error afterwards, unless pipelining was advertised. */ - if (recipients_discarded) rc = DISCARD; else - { - rc = acl_check(ACL_WHERE_RCPT, recipient, acl_smtp_rcpt, &user_msg, - &log_msg); - if (rc == OK && !pipelining_advertised && !check_sync()) + if (recipients_discarded) + rc = DISCARD; + else + if ( (rc = acl_check(ACL_WHERE_RCPT, recipient, acl_smtp_rcpt, &user_msg, + &log_msg)) == OK + && !pipelining_advertised && !check_sync()) goto SYNC_FAILURE; - } /* The ACL was happy */ if (rc == OK) { - if (user_msg == NULL) smtp_printf("250 Accepted\r\n"); - else smtp_user_msg(US"250", user_msg); + if (user_msg) + smtp_user_msg(US"250", user_msg); + else + smtp_printf("250 Accepted\r\n"); receive_add_recipient(recipient, -1); /* Set the dsn flags in the recipients_list */ @@ -4684,8 +4684,10 @@ while (done <= 0) else if (rc == DISCARD) { - if (user_msg == NULL) smtp_printf("250 Accepted\r\n"); - else smtp_user_msg(US"250", user_msg); + if (user_msg) + smtp_user_msg(US"250", user_msg); + else + smtp_printf("250 Accepted\r\n"); rcpt_fail_count++; discarded = TRUE; log_write(0, LOG_MAIN|LOG_REJECT, "%s F=<%s> RCPT %s: " @@ -4799,9 +4801,7 @@ while (done <= 0) } if (chunking_state > CHUNKING_OFFERED) - { /* No predata ACL or go-ahead output for BDAT */ - rc = OK; - } + rc = OK; /* No predata ACL or go-ahead output for BDAT */ else { /* If there is an ACL, re-check the synchronization afterwards, since the