Hi all,

I'm using amavisd-new with postfix and cyrus in a virtual domain setup.
As all the information about mail is stored in mysql I'd like to have
all spam/virus settings in mysql too. Initially I thought it is possible
to ask mysql for all @*_maps parameters (postfix style):

@local_domains_maps =
(["mydefault.tld", "mysql://configfile"])

(don't ask where this whishful thinking came from ;))

Reading docs and scanning the list it seems like there are only two
parameters that can be used:

$sql_select_policy and $sql_select_white_black_list

and column names will act as parameters, that is there is only ONE (ok,
actually two but I don't need W/B lists) query to return ALL possible
values which have to be sorted for priority.

Given I want to have:
1. per-mailuser prefs for things like: $virus_lover, $spam_lover,
$spam_tag_level, ...

2. per-domain prefs for things like: $virus_admin, $spam_admin,
$addr_extension_virus, ...

So I need to make a UNION of the domain_policy and normal user_policy
tables hardcoding dummy values to match the number of columns?

If column types and number match it's easy:
$sql_select_policy = '(SELECT up.*,a.email FROM ##MAILACCOUNTS## a,
##USERPOLICY## up WHERE (a.policy_id=up.id) AND (a.email IN (%k))
)UNION (
SELECT dp.*,d.zone FROM ##DOMAINS## d ##DOMAINPOLICY## dp WHERE
(d.policy_id = dp.id) AND (d.zone IN (%k)))';

But I don't expect column types/numbers to match for user and domain
policy as the user policy overrides the domain policy in some aspects
but don't provide values for other parameters like $virus_admin. And
what about other parameters like the @local_domains_maps?

What exacly gets inserted for %k? How do people deal with virtual
domains + sql and amavis?

thanks
 Paul



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
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/

Reply via email to