From: Jeremy Harris Date: Wed, 4 Apr 2018 15:15:22 +0000 (+0100) Subject: Add client-ip info to iprev ${authres } line X-Git-Tag: exim-4.92-RC1~219 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/da85c8695a867db6a69665db30eddb6b7f9cda18 Add client-ip info to iprev ${authres } line --- diff --git a/src/src/expand.c b/src/src/expand.c index d6039e3ea..25ae55983 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -1687,7 +1687,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) diff --git a/test/mail/3700.smtps b/test/mail/3700.smtps index 60a3d234b..eea14193f 100644 --- a/test/mail/3700.smtps +++ b/test/mail/3700.smtps @@ -1,6 +1,6 @@ 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) diff --git a/test/mail/3700.x b/test/mail/3700.x index 81544998d..9413a73e1 100644 --- a/test/mail/3700.x +++ b/test/mail/3700.x @@ -1,6 +1,6 @@ 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) diff --git a/test/mail/4560.a b/test/mail/4560.a index dd38aa6da..dcc30dffb 100644 --- a/test/mail/4560.a +++ b/test/mail/4560.a @@ -28,7 +28,7 @@ This is a simple test. From CALLER@bloggs.com Tue Mar 02 09:44:33 1999 Authentication-Results: test.ex; - iprev=pass (localhost); + iprev=pass (localhost) smtp.client-ip=127.0.0.1; arc=pass (i=1) header.s=sel arc.oldest-pass=1 smtp.client-ip=127.0.0.1 Received: from localhost ([127.0.0.1] helo=test.ex) by test.ex with esmtp (Exim x.yz) @@ -60,7 +60,7 @@ This is a test body. From CALLER@bloggs.com Tue Mar 02 09:44:33 1999 Authentication-Results: test.ex; - iprev=pass (localhost); + iprev=pass (localhost) smtp.client-ip=127.0.0.1; arc=pass (i=2) header.s=sel arc.oldest-pass=2 smtp.client-ip=127.0.0.1 Received: from localhost ([127.0.0.1] helo=test.ex) by test.ex with esmtp (Exim x.yz) @@ -68,11 +68,11 @@ Received: from localhost ([127.0.0.1] helo=test.ex) id 10HmbC-0005vi-00 for a@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 ARC-Seal: i=2; cv=pass; a=rsa-sha256; d=test.ex; s=sel; - b=yjlE1/MuuhrLFWK1L1/4OyMyvK47vEmb9dlUF0JGxKTUgJRTqd725Qqzv5ArRQDbCGDah3Pttx - NfKYLDijgST4z5MSTQbiQAoXuGEIfwPSJjMm/cQ37FMcBA2l0gVLNoQIT6GlO8B0i4cigHGEZx - fhUOLvI8pYW8KY8ZiBLY4qE=; + b=MYYY1fE5A9EbBkaRpJD6OvFBUALCd7U3J/zro6xlQJXJLW+NaeDCRtStbk/ARCcTkOgnX7ZOzs + iLuOphCpepZTMAGWhZtit1d19HK33+s0nCIzvx31BNqpEn3xewb4/jtxBvkyVomuUudSrjbO+u + 8nNmcIB7siu2S8lrTSj1PPw=; ARC-Authentication-Results: i=2; test.ex; - iprev=pass (localhost); + iprev=pass (localhost) smtp.client-ip=127.0.0.1; arc=pass (i=1) header.s=sel arc.oldest-pass=1 smtp.client-ip=127.0.0.1 ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed; d=test.ex; s=sel; bh=HUzfKKxIjPIa07lkj5uzDQ3q5YTRF/NwAUE7dhrrfvs=; @@ -81,7 +81,7 @@ ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed; d=test.ex; s=sel; P4RkRsmKXqHCoaOiSOqLvBvc8822Ap0l7F/cT2Gk3VRR5ITZI2piAsgLzFpLOEJsGwGVdYsNdx 5rxBKMPvXAWZip//tBngMRw=; Authentication-Results: test.ex; - iprev=pass (localhost); + iprev=pass (localhost) smtp.client-ip=127.0.0.1; arc=pass (i=1) header.s=sel arc.oldest-pass=1 smtp.client-ip=127.0.0.1 Received: from localhost ([127.0.0.1] helo=test.ex) by test.ex with esmtp (Exim x.yz) @@ -113,7 +113,7 @@ This is a test body. From CALLER@bloggs.com Tue Mar 02 09:44:33 1999 Authentication-Results: test.ex; - iprev=pass (localhost); + iprev=pass (localhost) smtp.client-ip=127.0.0.1; arc=pass (i=3) header.s=sel arc.oldest-pass=0 smtp.client-ip=127.0.0.1 Received: from localhost ([127.0.0.1] helo=test.ex) by test.ex with esmtp (Exim x.yz) @@ -121,11 +121,11 @@ Received: from localhost ([127.0.0.1] helo=test.ex) id 10HmbG-0005vi-00 for a@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 ARC-Seal: i=3; cv=pass; a=rsa-sha256; d=test.ex; s=sel; - b=HfcLGHnX3KFIqq4Hj5/+WI4kkcNEpDCTHUbuLlB8PAdwgW2ZwwD2keARxqpkeFUz0KeedU/XZc - 54F5otXO+EkfzVP7l3nugFl4CAOGHqPOnXNU83o/tZmFb9OWDUpfB0AKN7pQZCcNbLaEdDjWuk - YkuDNVDM0PBQ2EXpLCIbTrE=; + b=toV+uStte4whonmLSQreJpbH4aVVPtd+7SRqSC37YAIQugpQMe3V3RL+ThxRfxQHvAeGn5K9sh + pRpkAdOrY38izcXtYx9aJw/kkSjsRHQURUFeIb5hk5RiqiKnQSPP17k5b+50IYVL1K7wGxWFza + 4a1dn6ILHMTRyax7sxgeCrs=; ARC-Authentication-Results: i=3; test.ex; - iprev=pass (localhost); + iprev=pass (localhost) smtp.client-ip=127.0.0.1; arc=pass (i=2) header.s=sel arc.oldest-pass=0 smtp.client-ip=127.0.0.1 ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed; d=test.ex; s=sel; bh=31zA4VNQZ2yhHUh+7vWASIL9kKqo6pSym1QghgPyUkM=; @@ -134,7 +134,7 @@ ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed; d=test.ex; s=sel; Ke1FhjdC7iXPv/Dj86J40D9yib5y7YC9Ce3px0xJSXDD+ml1eDi45rVo9GDkm1zVG3eZdESktT Iv0EvpWIFn7dpelS30IKk78=; Authentication-Results: test.ex; - iprev=pass (localhost); + iprev=pass (localhost) smtp.client-ip=127.0.0.1; arc=pass (i=2) header.s=sel arc.oldest-pass=0 smtp.client-ip=127.0.0.1 Received: from localhost ([127.0.0.1] helo=test.ex) by test.ex with esmtp (Exim x.yz) @@ -142,11 +142,11 @@ Received: from localhost ([127.0.0.1] helo=test.ex) id 10HmbF-0005vi-00 for za@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 ARC-Seal: i=2; cv=pass; a=rsa-sha256; d=test.ex; s=sel; - b=l/OY+REy6qXxE2df0mxzk2Fyv4C9dTuIr2GfnpylYmIr2m/9a8uJRahXa7Ygk9wR8ofnJS+7mr - PTM33+jhCQidq7ZgE28Q7XVMPGmqE4Frs+OmzIL4j7UpK1CYktEzYwOOCSAf8/Yu1XH5w2XNqA - rfIrGPWlAcSoxwfnbyYxVXQ=; + b=SN3ee5Elw4yqVxQjcNV978Nj4mHfyVpWxau+IX9cSo9oHfx8Cn7nbjjPK7gwwu+tu9i2//afhl + sc+7qNkz3TLDVlII0DU9obOKks4zQXboWKIs0/b4yGUf1m/KaJNU9ClMVzHHwvDkFYh1OMpqCn + oPvOntgmIYGBp2JYDaPubmc=; ARC-Authentication-Results: i=2; test.ex; - iprev=pass (localhost); + iprev=pass (localhost) smtp.client-ip=127.0.0.1; arc=pass (i=1) header.s=sel arc.oldest-pass=1 smtp.client-ip=127.0.0.1 ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed; d=test.ex; s=sel; bh=31zA4VNQZ2yhHUh+7vWASIL9kKqo6pSym1QghgPyUkM=; @@ -155,7 +155,7 @@ ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed; d=test.ex; s=sel; Avoox5GkxPCBgYfO6wzh801k7F12Usgo7ryY8lOgQ/4OQ77TawNHFnlQ1WxhpaR/lUYkTXZXm2 LDzSoSVOQ0uFYg3cFzp54OA=; Authentication-Results: test.ex; - iprev=pass (localhost); + iprev=pass (localhost) smtp.client-ip=127.0.0.1; arc=pass (i=1) header.s=sel arc.oldest-pass=1 smtp.client-ip=127.0.0.1 Received: from localhost ([127.0.0.1] helo=test.ex) by test.ex with esmtp (Exim x.yz) @@ -191,7 +191,7 @@ This is a generic mailinglist footer From CALLER@bloggs.com Tue Mar 02 09:44:33 1999 Authentication-Results: test.ex; - iprev=pass (localhost); + iprev=pass (localhost) smtp.client-ip=127.0.0.1; arc=fail (i=3 (cv, sequence or missing header)) Received: from localhost ([127.0.0.1] helo=test.ex) by test.ex with esmtp (Exim x.yz) @@ -199,11 +199,11 @@ Received: from localhost ([127.0.0.1] helo=test.ex) id 10HmbL-0005vi-00 for a@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 ARC-Seal: i=3; cv=fail; a=rsa-sha256; d=test.ex; s=sel; - b=kz0kMxmRu3kimu9tZvLx4HCAt6Scs+hbhEjjE30exA6FCQtaT9UjBekWGRtMLFSmR7CBlRRmOq - Rl6lWMahfAvmdnLVKyX2FrfQLiCGBadOFeZVv5uGX0sdZXDqgjGJLGlNfnk1dtP/y4durC28LL - 8PiM7An58gtCVWyiygt1Qk4=; + b=SWUvDQ1P3lgo13tJJeM68YmtvWI7gQqNWkCotGXdMN4wBcOpHPWI1oWcXb8uXu0VZOGi7tnznT + GokNUeB0MLtwsYMEr1JTlffMvwxqWaD37CmUsWg7JrTJ2NXPZ1qHKT21oFUvFEvkjd/RuoBiXJ + G7jbR5IG8oefz5Juq/ymDXU=; ARC-Authentication-Results: i=3; test.ex; - iprev=pass (localhost); + iprev=pass (localhost) smtp.client-ip=127.0.0.1; arc=fail (i=2)(AMS body hash miscompare) header.s=sel arc.oldest-pass=0 smtp.client-ip=127.0.0.1 ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed; d=test.ex; s=sel; bh=31zA4VNQZ2yhHUh+7vWASIL9kKqo6pSym1QghgPyUkM=; @@ -212,7 +212,7 @@ ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed; d=test.ex; s=sel; Ke1FhjdC7iXPv/Dj86J40D9yib5y7YC9Ce3px0xJSXDD+ml1eDi45rVo9GDkm1zVG3eZdESktT Iv0EvpWIFn7dpelS30IKk78=; Authentication-Results: test.ex; - iprev=pass (localhost); + iprev=pass (localhost) smtp.client-ip=127.0.0.1; arc=fail (i=2)(AMS body hash miscompare) header.s=sel arc.oldest-pass=0 smtp.client-ip=127.0.0.1 Received: from localhost ([127.0.0.1] helo=test.ex) by test.ex with esmtp (Exim x.yz) @@ -220,7 +220,7 @@ Received: from localhost ([127.0.0.1] helo=test.ex) id 10HmbK-0005vi-00 for za@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 Authentication-Results: test.ex; - iprev=pass (localhost); + iprev=pass (localhost) smtp.client-ip=127.0.0.1; arc=pass (i=2) header.s=sel arc.oldest-pass=2 smtp.client-ip=127.0.0.1 Received: from localhost ([127.0.0.1] helo=test.ex) by test.ex with esmtp (Exim x.yz) @@ -228,11 +228,11 @@ Received: from localhost ([127.0.0.1] helo=test.ex) id 10HmbJ-0005vi-00 for mza@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 ARC-Seal: i=2; cv=pass; a=rsa-sha256; d=test.ex; s=sel; - b=yjlE1/MuuhrLFWK1L1/4OyMyvK47vEmb9dlUF0JGxKTUgJRTqd725Qqzv5ArRQDbCGDah3Pttx - NfKYLDijgST4z5MSTQbiQAoXuGEIfwPSJjMm/cQ37FMcBA2l0gVLNoQIT6GlO8B0i4cigHGEZx - fhUOLvI8pYW8KY8ZiBLY4qE=; + b=MYYY1fE5A9EbBkaRpJD6OvFBUALCd7U3J/zro6xlQJXJLW+NaeDCRtStbk/ARCcTkOgnX7ZOzs + iLuOphCpepZTMAGWhZtit1d19HK33+s0nCIzvx31BNqpEn3xewb4/jtxBvkyVomuUudSrjbO+u + 8nNmcIB7siu2S8lrTSj1PPw=; ARC-Authentication-Results: i=2; test.ex; - iprev=pass (localhost); + iprev=pass (localhost) smtp.client-ip=127.0.0.1; arc=pass (i=1) header.s=sel arc.oldest-pass=1 smtp.client-ip=127.0.0.1 ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed; d=test.ex; s=sel; bh=HUzfKKxIjPIa07lkj5uzDQ3q5YTRF/NwAUE7dhrrfvs=; @@ -241,7 +241,7 @@ ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed; d=test.ex; s=sel; P4RkRsmKXqHCoaOiSOqLvBvc8822Ap0l7F/cT2Gk3VRR5ITZI2piAsgLzFpLOEJsGwGVdYsNdx 5rxBKMPvXAWZip//tBngMRw=; Authentication-Results: test.ex; - iprev=pass (localhost); + iprev=pass (localhost) smtp.client-ip=127.0.0.1; arc=pass (i=1) header.s=sel arc.oldest-pass=1 smtp.client-ip=127.0.0.1 Received: from localhost ([127.0.0.1] helo=test.ex) by test.ex with esmtp (Exim x.yz) @@ -277,7 +277,7 @@ This is a generic mailinglist footer From CALLER@bloggs.com Tue Mar 02 09:44:33 1999 Authentication-Results: test.ex; - iprev=pass (localhost); + iprev=pass (localhost) smtp.client-ip=127.0.0.1; arc=pass (i=1) header.s=sel arc.oldest-pass=1 smtp.client-ip=127.0.0.1 Received: from localhost ([127.0.0.1] helo=test.ex) by test.ex with esmtp (Exim x.yz) @@ -285,7 +285,7 @@ Received: from localhost ([127.0.0.1] helo=test.ex) id 10HmbO-0005vi-00 for a@test.ex; Tue, 2 Mar 1999 09:44:33 +0000 Authentication-Results: test.ex; - iprev=pass (localhost); + iprev=pass (localhost) smtp.client-ip=127.0.0.1; arc=pass (i=1) header.s=sel arc.oldest-pass=1 smtp.client-ip=127.0.0.1 Received: from localhost ([127.0.0.1] helo=test.ex) by test.ex with esmtp (Exim x.yz) @@ -317,7 +317,7 @@ This is a test body. From CALLER@bloggs.com Tue Mar 02 09:44:33 1999 Authentication-Results: test.ex; - iprev=pass (localhost); + iprev=pass (localhost) smtp.client-ip=127.0.0.1; dkim=pass header.d=dmarc.org header.s=clochette header.a=rsa-sha256; dkim=fail (body hash mismatch; body probably modified in transit) header.d=convivian.com header.s=default header.a=rsa-sha256;