Missing a little bit of magic in lookup2

Michael Storz Michael.Storz at lrz.de
Wed Apr 24 16:26:41 CEST 2013


Mark,

using a SCALAR as suggested by

   %defang_maps_by_ccat = (
...
   # CC_BADH.',3',   1,  # NUL or CR character in header section
   # CC_BADH.',5',   1,  # header line longer than 998 characters
   # CC_BADH.',6',   1,  # header field syntax error
...

seems not to work in other %mumble_maps_by_ccat than 
%defang_maps_by_ccat
(which is specially handled, see !ref($mangle_map_ref) ? 
$mangle_map_ref  # compatibility)

I suppose changing

   for my $tb (!$tables_ref ? () : @$tables_ref) {
to
   for my $tb (!$tables_ref ? () : ref($tables_ref) eq 'ARRAY' ? 
@$tables_ref : ($tables_ref)) {

in sub lookup2 would allow using SCALAR in all %mumble_maps_by_ccat and 
the special handling of
%defang_maps_by_ccat could be eliminated.

Regards,
Michael
PS: happy to see your posts on the list again



More information about the amavis-users mailing list