X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/01fa9fe01e542c12fbe380356a8402e6dca59953..2b60ac102164f379dff0f26a42f9bb14c9ce94ad:/src/src/verify.c?ds=sidebyside diff --git a/src/src/verify.c b/src/src/verify.c index 73d2d7659..ab513dab3 100644 --- a/src/src/verify.c +++ b/src/src/verify.c @@ -3,6 +3,7 @@ *************************************************/ /* Copyright (c) University of Cambridge 1995 - 2018 */ +/* Copyright (c) The Exim Maintainers 2020 */ /* See the file NOTICE for conditions of use and distribution. */ /* Functions concerned with verifying things. The original code for callout @@ -1611,7 +1612,7 @@ address testing (-bt), which is indicated by address_test_mode being set. Arguments: vaddr contains the address to verify; the next field in this block must be NULL - f if not NULL, write the result to this file + fp if not NULL, write the result to this file options various option bits: vopt_fake_sender => this sender verify is not for the real sender (it was verify=sender=xxxx or an address from a @@ -1662,9 +1663,9 @@ BOOL expn = (options & vopt_expn) != 0; BOOL success_on_redirect = (options & vopt_success_on_redirect) != 0; int i; int yield = OK; -int verify_type = expn? v_expn : - f.address_test_mode? v_none : - options & vopt_is_recipient? v_recipient : v_sender; +int verify_type = expn ? v_expn : + f.address_test_mode ? v_none : + options & vopt_is_recipient ? v_recipient : v_sender; address_item *addr_list; address_item *addr_new = NULL; address_item *addr_remote = NULL; @@ -2155,7 +2156,7 @@ for (addr_list = addr_local, i = 0; i < 2; addr_list = addr_remote, i++) addr_list = addr->next; fprintf(fp, "%s", CS addr->address); -#ifdef EXPERIMENTAL_SRS +#ifdef EXPERIMENTAL_SRS_ALT if(addr->prop.srs_sender) fprintf(fp, " [srs = %s]", addr->prop.srs_sender); #endif @@ -2945,17 +2946,20 @@ if (*t == 0 || (*t == '/' && t != ss)) return ERROR; } -/* See if there is a semicolon in the pattern */ +/* See if there is a semicolon in the pattern, separating a searchtype +prefix. If there is one then check for comma-sep options. */ if ((semicolon = Ustrchr(ss, ';'))) - { - endname = (opts = Ustrchr(ss, ',')) ? opts : semicolon; - if (opts) + if ((opts = Ustrchr(ss, ',')) && opts < semicolon) { - opts++; + endname = opts++; opts = string_copyn(opts, semicolon - opts); } - } + else + { + endname = semicolon; + opts = NULL; + } /* If we are doing an IP address only match, then all lookups must be IP address lookups, even if there is no "net-". */