hash matching

Michael Storz Michael.Storz at lrz.de
Thu May 28 22:21:07 CEST 2020


Am 2020-05-20 14:38, schrieb Matus UHLAR - fantomas:
> Hello,
> 
> I encountered this case where hash matching did not work properly:
> 
> default:
> 
>  @spam_lovers_maps = (
>    \%spam_lovers, \@spam_lovers_acl, \$spam_lovers_re);
> 
> # DOES NOT work, no idea why
> %spam_lovers = {
>       'archive at xxx'    => 1
> };
> 
> # DOES work
> @spam_lovers_acl = ( 'archive at xxx' );
> 
> where can the error be? did I fill bad values for %spam_lovers?

You are assigning a hashref instead of a hash. Use

%spam_lovers = (
       'archive at xxx'    => 1
);


More information about the amavis-users mailing list