Mailing List Archive

ACL / string expansion question
in my RCPT ACL, I'm trying to accept mail bounces for lists I have,
regardless of how broken the sending mail server is, so I'm trying to add a
an accept ACL like this one:

accept domains = +local_domains
condition = ${extract{1}{-bounces+}{$local_part}{false}}

The RCPT I'm trying to match is:
Envelope-to: <svlug-bounces+lsann=hotmail.com@svlug.org>

Ideally, I'd like to get 'svlug' out of it if the match is successful so
that I can then check that svlug is a valid list before I accept the RCPT.

Unfortunately, my condition doesn't seem to work:

rcpt to: <svlug-bounces+lsann=hotmail.com@svlug.org>
>>> using ACL "acl_check_rcpt"
(...)
>>> check condition = ${extract{1}{-bounces+}{$local_part}{false}}
>>> = false

Suggestions?

Thanks
Marc
--
Microsoft is to operating systems & security ....
.... what McDonalds is to gourmet cooking

Home page: http://marc.merlins.org/ | Finger marc_f@merlins.org for PGP key
Re: ACL / string expansion question [ In reply to ]
On Sun, May 26, 2002 at 12:45:21AM -0700, Marc MERLIN wrote:
> in my RCPT ACL, I'm trying to accept mail bounces for lists I have,
> regardless of how broken the sending mail server is, so I'm trying to add a
> an accept ACL like this one:
>
> accept domains = +local_domains
> condition = ${extract{1}{-bounces+}{$local_part}{false}}
>
> The RCPT I'm trying to match is:
> Envelope-to: <svlug-bounces+lsann=hotmail.com@svlug.org>
>
> Ideally, I'd like to get 'svlug' out of it if the match is successful so
> that I can then check that svlug is a valid list before I accept the RCPT.
>
> Unfortunately, my condition doesn't seem to work:
>
> rcpt to: <svlug-bounces+lsann=hotmail.com@svlug.org>
> >>> using ACL "acl_check_rcpt"
> (...)
> >>> check condition = ${extract{1}{-bounces+}{$local_part}{false}}
> >>> = false

I look at it some more, is the problem that extract can only use one
character as the separator (i.e. that "-bounces+" is not valid)?

Marc
--
Microsoft is to operating systems & security ....
.... what McDonalds is to gourmet cooking

Home page: http://marc.merlins.org/ | Finger marc_f@merlins.org for PGP key
Re: ACL / string expansion question [ In reply to ]
On Tue, 28 May 2002, Marc MERLIN wrote:

> > >>> check condition = ${extract{1}{-bounces+}{$local_part}{false}}
> > >>> = false
>
> I look at it some more, is the problem that extract can only use one
> character as the separator (i.e. that "-bounces+" is not valid)?

Correct. "Extract" uses one-character separators. You will have to use a
regular expression (${if match...).


--
Philip Hazel University of Cambridge Computing Service,
ph10@cus.cam.ac.uk Cambridge, England. Phone: +44 1223 334714.