<attila.bruncsak@...> wrote:
> dacl blacklist rcpt /@domain\.com[ >]*$/ header /^Subject: ADV:/
[That breaks, althought the doc says it's okay]
> That implies the I can use rcpt clause at data stage filtering.
> So which one is incorrect: the documentation or the code?
The code, of course. Here is a quick fix (not tested, not even
compiled). Please test it and tell me if it's okay for commit.
Index: acl.c
===================================================================
RCS file: /milter-greylist/milter-greylist/acl.c,v
retrieving revision 1.67
diff -U2 -r1.67 acl.c
--- acl.c 14 Jul 2007 16:03:43 -0000 1.67
+++ acl.c 20 Jul 2007 12:17:08 -0000
@@ -646,11 +646,15 @@
struct mlfi_priv *priv;
{
- if (stage != AS_RCPT) {
- mg_log(LOG_ERR, "rcpt filter called at non RCPT stage");
- exit(EX_SOFTWARE);
+ if (stage == AS_RCPT) {
+ if (myregexec(priv, ad, ap, priv->priv_cur_rcpt) == 0)
+ return 1;
+ } else {
+ struct rcpt *r;
+
+ LIST_FOREACH(r, &priv->priv_rcpt, r_list)
+ if (myregexec(priv, ad, ap, r->r_addr) == 0)
+ return 1;
}
- if (myregexec(priv, ad, ap, priv->priv_cur_rcpt) == 0)
- return 1;
return 0;
}
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu@...Message
Re: [milter-greylist] rcpt filter called at non RCPT stage
2007-07-20 by manu@netbsd.org
Attachments
- No local attachments were found for this message.