Yahoo Groups archive

Milter-greylist

Index last updated: 2026-04-28 23:32 UTC

Message

Re: [milter-greylist] RFC: checking sendmail macros in ACL

2006-08-25 by AIDA Shinra

> I had an idea about this: what about allowing random macros to be checked,
> instead of just this particular one? I think about such a syntax:
> sm_macro "may_be_forged" "{client_resolve}" "FORGED"
> acl blacklist domain /.*\.info/ sm_macro "may_be_forged"
> 
> It would bring much more flexibility, as any sendmail setting could be 
> used in the ACL. For instance, someone asked for a sendmail bound to 
> multiple IP with a different milter-greylist configuration for each IP.
> Using the if_addr macro in the ACL would allow that:
> 
> sm_macro "ip1" "{if_addr}" "192.0.2.3"
> sm_macro "ip2" "{if_addr}" "192.0.2.4"
> acl whitelist sm_macro "ip1"
> acl greylist sm_macro "ip2" delay 15m autowhite 3d
> 
> Likewise, SMTP AUTH status could be used in the ACL just by checking
> {auth_authen}.
> 
> I wonder if going further is of any interest: should we support regexp for
> the macro value? lists of sm_macros? Anyone sees an usage for that? Here is an 
> example of macro + list that we could support:
> 
> sm_macro "may_be_forged" "{client_resolve}" "FORGED"
> sm_macro "blacklist" "{blacklist}" "BLACK"
> list "bad_macros" sm_macro { "may_be_forged" "blacklist" }
> acl blacklist domain /.*\.info/ list "bad_macros"
> 
> Any comment?

1. What is the advantage of giving names to macro conditions rather
than the following syntax? Line length?

acl greylist macro "{client_resolve}" "FORGED"
list "bad_macros" macro "{foobar}" { "foo" "bar" }

2. If we introduce your sm_macro syntax, we need to consider the
sm_macro as a part of ACL rather than config. The sm_macro must be
protected by the ACL lock and may be inconsistent with the config.

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.