Re: [AMaViS-user] SQL lookups : Which amavisd-new version to use additional fields

This is a discussion on Re: [AMaViS-user] SQL lookups : Which amavisd-new version to use additional fields within the Amavis User forums, part of the Anti-Spam and Anti-Virus Related Forums category; Andr=E9 Lu=EDs, > I'm building a mail server with antispam and antivirus capabilities > and one of ...


Go Back   Usenet Forums > Anti-Spam and Anti-Virus Related Forums > Amavis User

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-17-2005
Mark Martinec
 
Posts: n/a
Default Re: [AMaViS-user] SQL lookups : Which amavisd-new version to use additional fields

Andr=E9 Lu=EDs,

> I'm building a mail server with antispam and antivirus capabilities
> and one of the requirements is that each user should be able to choose
> if he/she wants to enable spam and/or virus checking as well as his/her
> antispam settings. We have people in-house which is going to develop a
> nice end-user interface which would allow the users to choose what they
> want easily, that's not a problem.


You may want to look at the Maia Mailguard for the GUI.

> However, I need to provide a way to let the end-user interface to
> store values on a database representing user's choices. I have already
> did something like this before using amavisd-new and SQL lookups, but
> now I need to provide users (through the end-user interface) the ability
> to set more fields in the database than I provided before.
>
> I have been searching and I found some new supported (optional)
> fields given as examples in the README.lookups file in the
> amavisd-new-2.2.1 source tree. That's exactly what I want, but I'm
> currently using amavisd-new-20030616p10 in my test server and, for
> various (non-technical) reasons I would like to stick with this older
> version.


Doesn't the security implications and listed bug fixes in later versions
provide enough reasons to upgrade? See release notes.

> I'm most interested in having the possibility to store per-user
> settings for the following amavisd-new settings in a SQL (MySQL)
> database : spam_quarantine_to, virus_lover, spam_lover and
> banned_files_lover. These ones "seems" (but I'm not sure yet) to be
> supported by my current amavisd-new version (20030616p10).


They are. Here is the relevant part of amavisd 20030616p10
which lists the supported SQL fields for that version:

$user_id_sql =3D $nf->('id', 'S');
$virus_lovers_sql =3D $nf->('virus_lover', 'B0');
$spam_lovers_sql =3D $nf->('spam_lover', 'B-');
$banned_files_lovers_sql=3D $nf->('banned_files_lover', 'B-');
$bad_header_lovers_sql =3D $nf->('bad_header_lover', 'B-');
$bypass_virus_checks_sql=3D $nf->('bypass_virus_checks', 'B0');
$bypass_spam_checks_sql =3D $nf->('bypass_spam_checks', 'B0');
$bypass_banned_checks_sql=3D$nf->('bypass_banned_checks','B-');
$bypass_header_checks_sql=3D$nf->('bypass_header_checks','B-');
$spam_tag_level_sql =3D $nf->('spam_tag_level', 'N' );
$spam_tag2_level_sql =3D $nf->('spam_tag2_level', 'N' );
$spam_kill_level_sql =3D $nf->('spam_kill_level', 'N' );
$spam_modifies_subj_sql =3D $nf->('spam_modifies_subj', 'B-');
$spam_quarantine_to_sql =3D $nf->('spam_quarantine_to', 'S-');
$local_domains_sql =3D $nf->('local', 'B1');

> There are some additional amavisd-new settings which I would like to
> store also in a SQL database, but I found a comment into the
> README.lookups to be somewhat discouraging :
>
> "--Here are some additional (more recent) optional fields,
> --not accounted for in the INSERT INTO examples further down.
> --Add them to you schema (into table 'policy') if you need them:"
>
> This "more recent" is what I din't understood. Does this means that
> in order to have amavisd-new look up the database for these "more
> recent" settings I shold be using a "more recent" amavisd-new version ?


Exactly. Non-supported fields may exist in SQL tables,
but will be ignored if not recognized.

> If so, which one specifically ?
> Is there a way I could check (in the amavisd-new sources, probably)
> if a lookup for a given amavisd-new parameter is supported ?


I believe the RELEASE_NOTES lists each newly added SQL field
for each version where it was introduced. You can also look at the
code and find code section similar to the one above. But it really
does not matter much - your choice is either to stick with your
version, or upgrade to 2.2.1 - and not bother with interim versions.

Mark


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
AMaViS-user mailing list
AMaViS-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/...fo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:50 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0