[#7231] Amavis LDAP backend for SAM
Summary Amavis LDAP backend for SAM
Queue Sam
Queue Version HEAD
Type Enhancement
State Accepted
Priority 1. Low
Owners Horde Developers
Requester okelet@gmail.com
Created 2008-08-23 (4718 days ago)
Updated 2014-11-05 (2453 days ago)
Assigned 2008-08-25 (4716 days ago)
Patch Yes

okelet@gmail.com 2008-08-23 22:33:04
SAM backend for options for Amavis stored in a LDAP server.

Not much flexible in the configuration, but working for me.

Attached tar.gz with driver, attributes file example and backend 
configuration example. Some new string should be added to *.po and 
translated. Please contact me to do this in spanish.


okelet@gmail.com 2008-08-25 21:38:23
Please add this new attribute to attributes.php so the translation for 
the text will be available:

$_attributes['amavisReminderFrequency'] = array(

     'label' => _("Reminder frequency"),

     'type' => 'enum',

     'default' => 2,

     'required' => false,

     'params' => array(array(

           '' => _("Select Value:"),

           '1' => _("Daily"),

           '2' => _("Weekly"),

           '3' => _("Weekly + Daily"),

           '4' => _("Monthly"),

           '5' => _("Monthly + Daily"),

           '6' => _("Monthly + Weekly"),

           '7' => _("Monthly + Weekly + Daily"),



This is not a standard attribute from the Amavis LDAP schema, but 
could be useful for sending reminders to the users about the messages 
stored in the quarintine.

okelet@gmail.com 2008-08-31 18:47:46

I have updated tar file:

- Modified driver, so it can manage now black and white lists correctly

- Updated amavis_ldap attributes.php and backends.php example 
configuration files; it now uses the most of the standard attributes 
yet defined (new attributes from dist: rewrite_sub, subject_tag, 
subject_tag2, hit_level, warn_virus_rcpt, warn_banned_rcpt, 
warn_header_rcpt, size_limit and reminder_freq)

- Updated spanish help file:

   - Modified subject_tag (this options adds the text when spam level 
is more than tag_level, different from subject_tag2)

   - Added subject_tag2 (this options adds the text when spam level is 
more than hit_level, different from subject_tag), warn_virus_rcpt, 
warn_banned_rcpt, warn_header_rcpt, size_limit, reminder_freq

- Updated spanish translation

falon@csi.it 2008-09-17 09:19:12
Very useful!

I tried this patch, beautiful!

I notice this:

if I set every attribute in forms (spam options, whitelist, blacklist 
options), then when I reload the page I don't see any changes made.

It should be a pre-check that compile the form reading from LDAP 
attributes already set.

falon@csi.it 2008-09-17 12:10:05
Testing this patch in my environment I also found what follow.

1) Net_LDAP2 is linked by horde only if I modify lib/core.php adding 
include_path written in php.ini:

line 33 of core.php - horde 3.2.2:

ini_set('include_path', ini_get('include_path') . ':' . 
dirname(__FILE__) . PATH_SEPARATOR . dirname(__FILE__) . '/../pear');

2) In "Level Options" of SAM "Spam Options", using web form, I can't 
set decimal values with '.'(dot), but only using separator 
','(commas). Unfortunately, amavisd-new accepts only values with '.', 
and not ','.

Jan Schneider <jan@horde.org> 2009-08-18 21:50:36
Are you going to update your patch with the suggestions that falon made?

Jan Schneider <jan@horde.org> 2009-10-01 22:05:39

okelet@gmail.com 2009-10-04 16:20:41
Sorry, but I no longer use Horde, and I can't do any more modifications.