Hi,
I manage to make everything work
But it doesn't work as expected with Admin Notifications or i miss
something
I have look at the code and make some debug. For me it come from it
Because It doesn't overwrite the variable like it should so the
resulting array is not structure as expected.
The problem with not overwriting the variable is that when
spam_admin_maps is define in amavisd.conf is that ne new add thing will
not be process by amavisd.
to be more clear, I join a patch making thing work like i thing it should
Regards
--- amavisd-policyd.pm 2013-10-26 20:53:14.000000000 +0200
+++ amavisd-policyd_mod.pm 2014-03-06 20:40:58.098728887 +0100
@@ -548,37 +548,27 @@
# Check if we have a list of new virus admins
if (defined($amavisConfig{'notify_admin_newvirus'})) {
- push(@{$pbn->{'newvirus_admin_maps'}},\{
- $emailAddy => $amavisConfig{'notify_admin_newvirus'}
- });
+ splice(@{$pbn->{'newvirus_admin_maps'}}, 1, scalar @{$pbn->{'newvirus_admin_maps'}},{$emailAddy => $amavisConfig{'notify_admin_newvirus'}[0]});
}
# Check if we have a list of virus admins
if (defined($amavisConfig{'notify_admin_virus'})) {
- push(@{$pbn->{'virus_admin_maps'}},\{
- $emailAddy => $amavisConfig{'notify_admin_virus'}
- });
+ splice(@{$pbn->{'virus_admin_maps'}}, 1, scalar @{$pbn->{'virus_admin_maps'}},{$emailAddy => $amavisConfig{'notify_admin_newvirus'}[0]});
}
# Check if we have a list of spam admins
if (defined($amavisConfig{'notify_admin_spam'})) {
- push(@{$pbn->{'spam_admin_maps'}},\{
- $emailAddy => $amavisConfig{'notify_admin_spam'}
- });
+ splice(@{$pbn->{'spam_admin_maps'}}, 1, scalar @{$pbn->{'spam_admin_maps'}},{$emailAddy => $amavisConfig{'notify_admin_spam'}[0]});
}
# Check if we have a list of banned file admins
if (defined($amavisConfig{'notify_admin_banned_file'})) {
- push(@{$pbn->{'banned_admin_maps'}},\{
- $emailAddy => $amavisConfig{'notify_admin_banned_file'}
- });
+ splice(@{$pbn->{'banned_admin_maps'}}, 1, scalar @{$pbn->{'virus_admin_maps'}},{$emailAddy => $amavisConfig{'notify_admin_banned_file'}[0]});
}
# Check if we have a list of bad header admins
if (defined($amavisConfig{'notify_admin_bad_header'})) {
- push(@{$pbn->{'bad_header_admin_maps'}},\{
- $emailAddy => $amavisConfig{'notify_admin_bad_header'}
- });
+ splice(@{$pbn->{'bad_header_admin_maps'}}, 1, scalar @{$pbn->{'virus_admin_maps'}},{$emailAddy => $amavisConfig{'notify_admin_bad_header'}[0]});
}
_______________________________________________
Users mailing list
[email protected]
http://lists.policyd.org/mailman/listinfo/users_lists.policyd.org