Nerijus Baliunas <nerijus@...> wrote:
> The computed message size increases monotonously with each delivery,
> which is obviously wrong. Apparently, milter-greylist does not
> RESET its message size count between mail deliveries. This explains
> why the count keeps going up.
Would reseting everything about DATA stage when entering the
mlfi_envfrom function help?
Index: milter-greylist.c
===================================================================
RCS file: /milter-greylist/milter-greylist/milter-greylist.c,v
retrieving revision 1.191
diff -U2 -r1.191 milter-greylist.c
--- milter-greylist.c 14 Jul 2007 03:45:00 -0000 1.191
+++ milter-greylist.c 20 Jul 2007 03:25:52 -0000
@@ -355,4 +355,30 @@
priv = (struct mlfi_priv *) smfi_getpriv(ctx);
+ /*
+ * First cleanup anything we still know about a previous
+ * message we received in the same SMTP session.
+ */
+ reset_acl_values(priv);
+
+ while ((r = LIST_FIRST(&priv->priv_rcpt)) != NULL) {
+ LIST_REMOVE(r, r_list);
+ free(r);
+ }
+ while ((h = TAILQ_FIRST(&priv->priv_header)) != NULL) {
+ free(h->h_line);
+ TAILQ_REMOVE(&priv->priv_header, h, h_list);
+ free(h);
+ }
+ while ((b = TAILQ_FIRST(&priv->priv_body)) != NULL) {
+ free(b->b_lines);
+ TAILQ_REMOVE(&priv->priv_body, b, b_list);
+ free(b);
+ }
+ if (priv->priv_buf)
+ free(priv->priv_buf);
+
+ /*
+ * Now let's handle this new message...
+ */
if ((priv->priv_queueid = smfi_getsymval(ctx, "{i}")) == NULL) {
#ifndef USE_POSTFIX
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...Message
Re: [milter-greylist] Image SPAM embedded in PDF
2007-07-20 by manu@netbsd.org
Attachments
- No local attachments were found for this message.