Martin,
> Can I use different 'policy' (SQL) based on which 'policy bank' the
> mail arrived?
The %sql_clause associative array is part of policy banks,
so you can switch SQL clauses to be used, based on a policy bank.
For example:
$interface_policy{'10026'} = 'ALT';
$policy_bank{'ALT'} = {
sql_clause => {
'sel_policy' => 'SELECT *, altusers.id'.
' FROM altusers LEFT JOIN policy ON altusers.policy_id=policy.id'.
' WHERE altusers.email IN (%k) ORDER BY altusers.priority DESC',
},
};
...may be used to let SQL lookups access a table 'altusers'
instead of a table 'users', when a policy bank ALT is loaded,
i.e. when a requests comes in on a TCP port 10026.
> Actually what I want to setup is an Amavisd-new server that is using
> @lookup_sql_dsn, @storage_sql_dsn and different policy (SQL) for
> incoming and outgoing mails:
>
> Incoming
> - spamcheck (port 10024)
> - viruscheck (D_PASS)
> - W/B lists (for individual users ??)
> - pen pals
> Outgoing (port 10025)
> - viruscheck (D_DISCARD)
> - build up pen pals lists
>
> Is there any problems in that?
There is probably no need to fiddle with %sql_clause in policy banks,
this looks like a straightforward use of settings in policy banks.
Btw, penpals already know whether mail is outgoing or not
by checking recipient address against @local_domains_maps.
Mark
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/