On Thursday 04 October 2007 4:43:41 pm Gary V wrote:
> > > On 10/4/07, Ray wrote:
> > > > I think I understand a little more about what is going on. The system
> > > > is set up so that you create one table, that is specific to
> > > > amavis-new. It then performs it's own lookup on that table with it's
> > > > own, built in, select statement. (details in documentation)
> > > > Am I right so far?
> > >
> > > Yes, except it's not just one table. There are a number of tables in
> > > the schema. There are actually two sets of tables. One which contains
> > > recipient settings and whitelist/blacklist data, and the other which
> > > records information about messages and provides for optional SQL
> > > quarantine.
> > >
> > > > I am running postfix and dovecot with MySQL tables that provide all
> > > > information. I would like to let amavis go look at those tables to
> > > > find out what domains are to be considered local (this is in
> > > > "amavisd.conf-sample", right)
> > >
> > > Right
> > >
> > > > and possibly in the future find custom spam cutoff levels,
> > > > white/black lists, etc.
> > >
> > > At that point you would have to reset your $sql_select_policy
> > > (probably back to the default) and @lookup_sql_dsn.
> > >
> > > > I guess that I could create the database structure that amavis
> > > > expects, and repopulate it every 1/2 hour or so from the
> > > > postfix/dovecot tables, but I would prefer not to.
> > > > Any other suggestions?
> > > > Thanks,
> > > > Ray
> > >
> > > How often are new domains added, or old domains deleted? If all you
> > > want for the time being is set set up the local domains, I would set
> > > up the amavis schema, create a policy with all the fields NULL (except
> > > for id and policy name) and then add all the domains (@example.com,
> > > @example.net etc.) to the users table and assign them that policy. I
> > > would not add the optional local field to the users table. This way,
> > > all I need to do is maintain the list of domains. The fact that they
> > > exist makes them local. In the future, you could create additional
> > > policies and add users as you see fit.
> >
> > domain changes occur on the order of once a week.
> > So the best solution is to create the default table structure that amavis
> > expects, and maintain 2 sets of data?
> > Ray
>
> I think it depends on how often you are going to have to change
> per-recipient settings. If the domains (or individual recipients) you
> host want to have settings that differ from the static settings in
> amavisd.conf, setting this up now will make it easier to make changes
> on the fly. With static settings, you must reload amavisd-new when
> changes are made. With SQL settings, the changes are dynamic so they
> are recognized immediately.

I found what I was looking for.
it is '%sql_clause' as detailed in amavisd.conf-default around line 400. I 
rewrote $sql_select_policy to alias the columns in my users table to the 
names that amavisd expects.
Ray

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
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/

Reply via email to