Gérald,

> > As a minimum it should encompass From, To and Subject.
> ok, so a list of allowed unencrypted headers would be the best I think ?

Right. Put existing lookups mechanisms to good use.
If a lookup key is a header field head (i.e. 'subject', 'from', ...),
you could use existing mechanisms, e.g.:

  my($result,$matching_key) =
    lookup(0, lc($field_head), @allow_8bit_in_header_field_maps);

where one could then put in amavisd.conf:
  @allow_8bit_in_header_field_maps = (
    {'subject' => 1, 'from' => 1}
  );

or by using a list (acl):
 @allow_8bit_in_header_field_maps = (
   [qw(subject from to)]
 );

> In fact what you say is that it would be better to have a generic solution
> to refine any of the first class categories (I reformulate to be sure to
> understand) ?

Right.

> If my understanding is correct, what I propose is to do it (ie: I will do
> it) for banned by suggesting a solution that would be easily extensible to
> other categories, is it coherent to you?

Yes.

Eventually a more general categories mechanism could incorporate
(supersede, in an upwards compatible way) existing settings.

E.g., replace the following hard-wired settings:

  $virus_quarantine_method        = 'local:virus-%m';
  $spam_quarantine_method         = 'local:spam-%m.gz';
  $banned_files_quarantine_method = 'local:banned-%m';
  $bad_header_quarantine_method   = 'local:badh-%m';

with:
  $quarantine_method{'virus'} = 'local:virus-%m';
  $quarantine_method{'spam'}  = 'local:spam-%m.gz';
  $quarantine_method{'banned'} = 'local:banned-%m';
  ...
  $quarantine_method{'clean'} = 'local:archive-%m';
  $quarantine_method{''} = undef;  # catchall

etc,. and extended perhaps by using a similar mechanism
to e-mail address extensions (plus addressing), e.g.:

  $quarantine_method{'banned+executable'} = 'local:banned-%m';
  $quarantine_method{'banned+encrypted'} = 'local:banned-%m';

where in the absence of and entry for 'banned+encrypted'
the setting would fall back to an entry for 'banned',
and in turn, in absence of a 'banned' entry, it would fall
to some catchall default, like an entry with a '' as a key.

Same logic would then apply to other category-dependent settings,
like:
  $final_destiny{'virus'} ...
  $quarantine_to_maps{'virus'} = [ ... ];
  $admin_maps{'virus'} = [ ... ];
  $warnrecip_maps{'virus'}
  $addr_extension_maps{'virus'}
  $bypass_checks_maps{'virus'}
  $lovers_maps{'virus'}
 
with full compatibility with existing config files
and an intention to gradually phase out the currently
separate config variables for each category.

It might be possible to do this face-lift even in time for 2.4.0.

  Mark
  
  







-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_idv37&alloc_id865&op=click
_______________________________________________
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