Add client-ip info to iprev ${authres } line
authorJeremy Harris <jgh146exb@wizmail.org>
Wed, 4 Apr 2018 15:15:22 +0000 (16:15 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Wed, 4 Apr 2018 15:15:22 +0000 (16:15 +0100)
src/src/expand.c
test/mail/3700.smtps
test/mail/3700.x

index 10fadfd892379fcaa7a45293dde87a1d3b625fa6..a5ddb277dc11fe5165f090a5d58926622fe84837 100644 (file)
@@ -1672,7 +1672,9 @@ static gstring *
 authres_iprev(gstring * g)
 {
 if (sender_host_name)
-  return string_append(g, 3, US";\n\tiprev=pass (", sender_host_name, US")");
+  return string_append(g, sender_host_address ? 5 : 3,
+    US";\n\tiprev=pass (", sender_host_name, US")",
+    US" smtp.client-ip=", sender_host_address);
 if (host_lookup_deferred)
   return string_catn(g, US";\n\tiprev=temperror", 19);
 if (host_lookup_failed)
index 60a3d234ba74f0bd7a5ecb291dd70b1e86b6167f..ff57e01ed765a687839bfc59825e22965207a715 100644 (file)
@@ -1,9 +1,9 @@
 From ok@test.ex Tue Mar 02 09:44:33 1999
 Authentication-Results: myhost.test.ex;
-       iprev=pass (localhost);
+       iprev=pass (localhost) smtp.client-ip=127.0.0.1;
        auth=pass (tls) x509.auth="Phil Pennock"
 Received: from localhost ([127.0.0.1] helo=myhost.test.ex)
-       by myhost.test.ex with esmtpsa (TLSv1:ke-RSA-AES256-SHA:xxx)
+       by myhost.test.ex with esmtpsa (TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256)
        (Exim x.yz)
        (envelope-from <ok@test.ex>)
        id 10HmbA-0005vi-00
index 81544998d8eb6e6b26971665ef733103572d2383..d1f269a3742f43109407a43f32e1e8ca7a6e79b5 100644 (file)
@@ -1,9 +1,9 @@
 From ok@test.ex Tue Mar 02 09:44:33 1999
 Authentication-Results: myhost.test.ex;
-       iprev=pass (localhost);
+       iprev=pass (localhost) smtp.client-ip=127.0.0.1;
        auth=pass (tls) x509.auth="Phil Pennock"
 Received: from localhost ([127.0.0.1] helo=myhost.test.ex)
-       by myhost.test.ex with esmtpsa (TLSv1:ke-RSA-AES256-SHA:xxx)
+       by myhost.test.ex with esmtpsa (TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256)
        (Exim x.yz)
        (envelope-from <ok@test.ex>)
        id 10HmaZ-0005vi-00