|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Noel Jones (njones_at_megan.vbhcs.org)
Date: Mon Feb 03 2003 - 19:27:47 CST
----- Original Message -----
From: "Colin Campbell" <sgcccdc
citec.qld.gov.au>
To: <postfix-users
postfix.org>
Sent: Monday, February 03, 2003 5:18 PM
Subject: access map enhancement suggestion
> Hi,
>
> Near as I can work out there is no way to define a "catchall" for
indexed access
> maps. Would it be possible to have something like "[NOTFOUND]" added
as a
> catchall key? It doesn't appear to match any of the "legitimate" keys,
so it
> should be okay. I know I could use it. Or am I just being stupid
trying to avoid
> using pcre/regexp maps where ".*" is the answer. (or is that just
"."?)
>
> Why do I want it? I want to do a lot of compund comparisons, like, for
example
> to control access by internal hosts but also do selective filtering.
I'm
> guessing something like the following would work. If we get to the
sender domain
> check we know the host is allowed to send email - hosts not listed
would have
> been denied access. (or do I misunderstand this completely).
>
> check_client_access
> # reject all but a list of known hosts, eg
> # ip1 DUNNO
> # ip2 DUNNO
> # [NOTFOUND] REJECT
> check_sender_domain
> # d1.tld OK
> # d2.tld FILTER:smtp:myfilterhost
>
> Colin
>
Use a regexp or PCRE map if you want a 'default' action. The proper
syntax would be:
/./ ACTION
Remember that the order matters in regexp tables, so this must come
last.
The correct syntax for the FILTER action (example for a regexp table):
/d2\.tld$/ FILTER smtp:myfilter
Note whitespace, not a ":" following the FILTER keyword. I failed to
catch this error on a previous example I posted.
-- Noel Jones
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]