rocsca, > I have felt that that I could apply avery interesting solution to the > issue that have raised, for my system. > > But I have some doubt: > > 1) Above there is a veriable mentioned: "$sql_select_polic", while at > the top of tyhis message it seems to me that I have to set > $sql_clause{'sel_policy'} to the clause
Same thing - a compatibility mechanism. Initially the setting was $sql_select_polic, later a more general mechanism was introduces for all SQL clauses: %sql_clause. To preserve compatibility, an implied initialization is: $sql_clause{'sel_policy'} = \$sql_select_policy; so either set the $sql_select_policy (which will be passed on to $sql_clause{'sel_policy'} ), or assign to $sql_clause{'sel_policy'} directly and ignore $sql_select_policy. The code in amavisd only uses values in %sql_clause, not $sql_select_policy. > that have to return "0" (as for > previous solution based on associative array) if the domain is internal, > and "1" other wise. The clause should be a SELECT, which may return any number of records but only the first record (if any) is used. The record should provide field names (with their values) as expected by amavisd, not all are needed, any additional (unrecognized) fields are ignored. Missing fields or NULLs fall back to statical lookups for that setting. So for example, a trivial SELECT would provide two constant values regardless of a recipient address: SELECT 'Y' as virus_lover, 6.3 as spam_kill_level; +-------------+-----------------+ | virus_lover | spam_kill_level | +-------------+-----------------+ | Y | 6.3 | +-------------+-----------------+ 1 row in set (0.01 sec) > 2) Which field of the select has to contains the 0,1 values? See README.lookups, section 'SQL LOOKUPS'. For boolean fields use 0 or 'N' for false, 1 or 'Y' for a true. > 3) could you depict this solution with a practical example? Perhaps it would be best to start with your schema, i.e. that part of it which tells which domains are your local. Mark ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ AMaViS-user mailing list AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/