If a user chooses to blacklist a specific sender of a mail, the mail
is highly probably undesired too, so delete it in that case.
The reverse should hold for white listing a mail's sender, deliver it
in that case.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
if ($action eq 'whitelist') {
PMG::Quarantine::add_to_blackwhite($dbh, $ref->{pmail}, 'WL', [ $sender ]);
if ($action eq 'whitelist') {
PMG::Quarantine::add_to_blackwhite($dbh, $ref->{pmail}, 'WL', [ $sender ]);
+ PMG::Quarantine::deliver_quarantined_mail($dbh, $ref, $ref->{receiver} // $ref->{pmail});
} elsif ($action eq 'blacklist') {
PMG::Quarantine::add_to_blackwhite($dbh, $ref->{pmail}, 'BL', [ $sender ]);
} elsif ($action eq 'blacklist') {
PMG::Quarantine::add_to_blackwhite($dbh, $ref->{pmail}, 'BL', [ $sender ]);
+ PMG::Quarantine::delete_quarantined_mail($dbh, $ref);
} elsif ($action eq 'deliver') {
PMG::Quarantine::deliver_quarantined_mail($dbh, $ref, $ref->{receiver} // $ref->{pmail});
} elsif ($action eq 'delete') {
} elsif ($action eq 'deliver') {
PMG::Quarantine::deliver_quarantined_mail($dbh, $ref, $ref->{receiver} // $ref->{pmail});
} elsif ($action eq 'delete') {