Open Relay testing based on recipient domain? Disable?

Mark Martinec Mark.Martinec+amavis at
Fri Aug 5 17:08:36 CEST 2011


> > $sql_select_policy =
> >   "SELECT 1 AS id FROM mydomains WHERE ('.' || domain_name) IN (%k)";
> By the way, how does this match correctly?  If %k is something like
> "test at,," (or whatever - maybe it's
> just not clear what %k is), then "" does not match.  I know I
> must be misunderstanding this.....
>   $sql_lookups_no_at_means_domain = 1;
> Woa, that's a cryptic setting name.  :-) 

The %k exands into:

when $sql_lookups_no_at_means_domain is 0:

        test at

or when $sql_lookups_no_at_means_domain is 1:

        test at

As you can see, the (with a leading dot) is in the list,
so a  ('.' || domain_name)  would match.  (the || is a contacenation op,
same as a concat() function in MySQL).


More information about the amavis-users mailing list