X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fsmtp_in.c;h=b5bef64cd41d8b663f090a748f764eb2a1828dce;hb=0ec020ea98fcff1a3c4a286f9a168c0004cf5d91;hp=e3b4dcecec60992e8b46c89188f94011cda5256e;hpb=4deaf07d6cdd04468e4bc383945b9e19d7d55aa3;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c index e3b4dcece..b5bef64cd 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.4 2004/11/04 12:19:48 ph10 Exp $ */ +/* $Cambridge: exim/src/src/smtp_in.c,v 1.6 2004/12/16 15:11:47 tom Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -167,17 +167,18 @@ static smtp_cmd_list *cmd_list_end = #define CMD_LIST_STARTTLS 4 static uschar *protocols[] = { - US"local-smtp", - US"local-esmtp", - US"local-esmtpa", - US"local-esmtps", - US"local-esmtpsa" + US"local-smtp", /* HELO */ + US"local-smtps", /* The rare case EHLO->STARTTLS->HELO */ + US"local-esmtp", /* EHLO */ + US"local-esmtps", /* EHLO->STARTTLS->EHLO */ + US"local-esmtpa", /* EHLO->AUTH */ + US"local-esmtpsa" /* EHLO->STARTTLS->EHLO->AUTH */ }; #define pnormal 0 -#define pextend 1 -#define pauthed 1 /* added to pextend */ -#define pcrpted 2 /* added to pextend */ +#define pextend 2 +#define pcrpted 1 /* added to pextend or pnormal */ +#define pauthed 2 /* added to pextend */ #define pnlocal 6 /* offset to remove "local" */ /* When reading SMTP from a remote host, we have to use our own versions of the @@ -804,6 +805,10 @@ message_size = -1; acl_warn_headers = NULL; queue_only_policy = FALSE; deliver_freeze = FALSE; /* Can be set by ACL */ +#ifdef WITH_CONTENT_SCAN +fake_reject = FALSE; /* Can be set by ACL */ +no_mbox_unspool = FALSE; /* Can be set by ACL */ +#endif submission_mode = FALSE; /* Can be set by ACL */ active_local_from_check = local_from_check; /* Can be set by ACL */ active_local_sender_retain = local_sender_retain; /* Can be set by ACL */ @@ -814,6 +819,16 @@ sender_verified_list = NULL; /* No senders verified */ memset(sender_address_cache, 0, sizeof(sender_address_cache)); memset(sender_domain_cache, 0, sizeof(sender_domain_cache)); authenticated_sender = NULL; +#ifdef EXPERIMENTAL_BRIGHTMAIL +bmi_run = 0; +bmi_verdicts = NULL; +#endif +#ifdef EXPERIMENTAL_SPF +spf_header_comment = NULL; +spf_received = NULL; +spf_result = NULL; +spf_smtp_comment = NULL; +#endif body_linecount = body_zerocount = 0; for (i = 0; i < ACL_M_MAX; i++) acl_var[ACL_C_MAX + i] = NULL; @@ -1773,6 +1788,9 @@ BOOL drop = rc == FAIL_DROP; uschar *lognl; 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 (where == ACL_WHERE_DATA)? US"after DATA" : string_sprintf("%s %s", acl_wherenames[where], smtp_data); @@ -1784,7 +1802,11 @@ fixed, sender_address at this point became the rewritten address. I'm not sure this is what should be logged, so I've changed to logging the unrewritten address to retain backward compatibility. */ +#ifndef WITH_CONTENT_SCAN if (where == ACL_WHERE_RCPT || where == ACL_WHERE_DATA) +#else +if (where == ACL_WHERE_RCPT || where == ACL_WHERE_DATA || where == ACL_WHERE_MIME) +#endif { sender_info = string_sprintf("F=<%s> ", (sender_address_unrewritten != NULL)? sender_address_unrewritten : sender_address); @@ -2339,6 +2361,11 @@ while (done <= 0) } } +#ifdef EXPERIMENTAL_SPF + /* set up SPF context */ + spf_init(sender_helo_name, sender_host_address); +#endif + /* Apply an ACL check if one is defined */ if (acl_smtp_helo != NULL) @@ -2362,7 +2389,7 @@ while (done <= 0) ((sender_host_authenticated != NULL)? pauthed : 0) + ((tls_active >= 0)? pcrpted : 0)] : - protocols[pnormal]) + protocols[pnormal + ((tls_active >= 0)? pcrpted : 0)]) + ((sender_host_address != NULL)? pnlocal : 0); @@ -3182,7 +3209,7 @@ while (done <= 0) protocols[pextend + pcrpted + ((sender_host_authenticated != NULL)? pauthed : 0)] : - protocols[pnormal]) + protocols[pnormal + pcrpted]) + ((sender_host_address != NULL)? pnlocal : 0);