Rename EXPERIMENTAL_SRS to EXPERIMENTAL_SRS_ALT
[exim.git] / src / src / verify.c
index 73d2d7659e709f9dae37db09c89afe787ad8f71e..76f6c91673bd8cebc91f0466c208d3360a8e2c37 100644 (file)
@@ -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
@@ -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-". */