R.Smits wrote:
> Hi,
> With the amavis release, I found a Ldap schema file with some
> interesting things. My question is this :
> Can I do a sql or ldap lookup for just the Spam_lovers_map ?
Not the map. You would set spam_lover to Y or N (or NULL) in the
policy table for the policy that has been assigned to the user/domain
listed in the users table.
If the only difference you wanted site-wide was spam_lover Y or N then
you may only need to configure two or three policies. If everyone wanted to
set their own spam_kill_level for example, then you could have as many
as one policy per user, plus one policy per domain, plus a catchall,
where each policy was potentially different. If you can build a front end
for it, you can have users change any policy you allow them to change. Or
you can set up a few predefined policies and let them choose which one they
want to use. The more choices, the more policies. Look at the policy table
for all the possible settings. If fields are left NULL, then the static
tables/settings are used (the lookups fall through to static lookups).
For example, if spam_lover is left at NULL, then @spam_lovers_maps would be
used (if configured). You could have an entire domain get their spam regardless
of spam score by placing their domain there (for example). Then once a user from
their domain is added to SQL, they can override this decision by setting
spam_lover to N by choosing a policy with that value set, or by given the
opportunity to have their own personal policy created if an existing
one does not meet their needs.
>From amavisd:
# The SQL select clause to fetch per-recipient policy settings
# The %k will be replaced by a comma-separated list of query addresses
# (e.g. full address, domain only, catchall). Use ORDER, if there
# is a chance that multiple records will match - the first match wins
# If field names are not unique (e.g. 'id'), the later field overwrites the
# earlier in a hash returned by lookup, which is why we use '*,users.id'.
# This is a separate legacy variable for upwards compatibility, now only
# referenced by the program through %sql_clause entry 'sel_policy'.
$sql_select_policy =
'SELECT *, users.id'.
' FROM users LEFT JOIN policy ON users.policy_id=policy.id'.
' WHERE users.email IN (%k) ORDER BY users.priority DESC';
> SO I can build a web frontend for users who want their spam delivered
> instead of quarantined ?
> I'm working on Mailzu right now. But this has only quarantine. (I think)
> Also no documentation with mailzu on which Mysql tables I should create.
I believe Brian Wong recently answered that:
http://marc.theaimsgroup.com/?l=amavis-user&m=115772587324960&w=2
But if you intend on assigning policies, then simply create them all.
> I found the documentation with amavis on the mysql fields a bit
> difficult. (But I'l manage :-)
> Greetings... R.Smits
Gary V
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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/