Re: hash matching
Michael Storz <[email protected]>
| Newsgroups | gmane.mail.virus.amavis.user |
|---|---|
| Message-ID | <[email protected]> |
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@xxx' => 1
> };
>
> # DOES work
> @spam_lovers_acl = ( 'archive@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@xxx' => 1
);