[PATCH] missing ", " in report header
2010-05-22 by Kouhei Sutou
Hi,
milter-greylist reports 'not delayed' reason in X-Greylist
header. e.g.:
X-Greylist: ACL 160 matched, not delayed ...
greylist.conf:
159: sm_macro "no_stress" "{stress}" unset
160: racl whitelist sm_macro "no_stress"
If matched ACL line (in the above example greylist.conf,
line 160) has two or more conditions, header report may miss
", ". e.g.:
X-Greylist: Message whitelisted by tarpit 125sACL 160 matched, not delayed ...
greylist.conf:
159: sm_macro "no_stress" "{stress}" unset
160: racl whitelist sm_macro "no_stress" tarpit 125s
Here is a patch that adds a ", " if it's needed:
Index: milter-greylist.c
===================================================================
RCS file: /milter-greylist/milter-greylist/milter-greylist.c,v
retrieving revision 1.230
diff -u -p -r1.230 milter-greylist.c
--- milter-greylist.c 18 Apr 2010 04:03:56 -0000 1.230
+++ milter-greylist.c 22 May 2010 14:35:41 -0000
@@ -1242,6 +1242,8 @@ passed:
/* Silently ignore other codes, just report ACL */
if (priv->priv_last_whitelist != 0) {
priv->priv_last_whitelist = 0;
+ if (whystr[0] != '\0')
+ mystrlcat (whystr, ", ", HDRLEN);
mystrlcat (whystr, "ACL %a matched", HDRLEN);
}
Thanks,
--
kou