my $add_discl = $ruledb->create_group_with_obj(
$obj, 'Disclaimer', 'Add Disclaimer');
+ # Move to attachment quarantine
+ $obj = PMG::RuleDB::Remove->new(0, undef, undef, 1);
+ my $attach_quar = $ruledb->create_group_with_obj(
+ $obj, 'Attachment Quarantine (remove matching)', 'Remove matching attachments and move the whole mail to the attachment quarantine.');
+
+ # Remove all attachments
+ $obj = PMG::RuleDB::Remove->new(1, undef, undef, 1);
+ my $attach_quar_all = $ruledb->create_group_with_obj(
+ $obj, 'Attachment Quarantine (remove all)', 'Remove all attachments and move the whole mail to the attachment quarantine.');
+
# Attach original mail
#$obj = Proxmox::RuleDB::Attach->new ();
#my $attach_orig = $ruledb->create_group_with_obj ($obj, 'Attach Original Mail',
$ruledb->rule_add_what_group ($rule, $mm_content);
$ruledb->rule_add_action ($rule, $remove);
+ # Quarantine Office Files
+ $rule = PMG::RuleDB::Rule->new ('Quarantine Office Files', 89, 0, 0);
+ $ruledb->save_rule ($rule);
+
+ $ruledb->rule_add_what_group ($rule, $office_content);
+ $ruledb->rule_add_action ($rule, $attach_quar);
+
#$ruledb->rule_add_from_group ($rule, $anybody);
#$ruledb->rule_add_from_group ($rule, $trusted);
#$ruledb->rule_add_to_group ($rule, $anybody);
OBJECT 21: filename=.*\.\{.+\}
FOUND ACTION GROUP 14: Remove attachments
OBJECT 28: remove matching attachments
+Found RULE 12: Quarantine Office Files
+ FOUND WHAT GROUP 6: Office Files
+ OBJECT 9: content-type=application/msword
+ OBJECT 7: content-type=application/vnd\.ms-excel
+ OBJECT 8: content-type=application/vnd\.ms-powerpoint
+ OBJECT 11: content-type=application/vnd\.oasis\.opendocument\..*
+ OBJECT 10: content-type=application/vnd\.openxmlformats-officedocument\..*
+ OBJECT 12: content-type=application/vnd\.stardivision\..*
+ OBJECT 13: content-type=application/vnd\.sun\.xml\..*
+ FOUND ACTION GROUP 22: Attachment Quarantine (remove matching)
+ OBJECT 36: remove matching attachments
Found RULE 11: Block Multimedia Files
FOUND WHAT GROUP 5: Multimedia
OBJECT 5: content-type=audio/.*