esackbauer Hi. How to write correctly:
require ["reject","body","regex","notify"];
if anyof (body :raw :regex ["filename=.*\.pdf","filename=.*\.doc","filename=.*\.xls","filename=.*\.gif","filename=.*\.docx","filename=.*\.xlsx"]) {
keep; # The filter skips the necessary extensions
if anyof (body :raw :regex ["filename=.*\.gz","filename=.*\.exe","filename=.*\.js","filename=.*\.zip","filename=.*\.rar","filename=.*\.7z"]) {
redirect "blocked@domain.com"; # The filter sends to the desired mail
notify :low :message " You have 1 mail !" :method "mailto" :options ["user@domain.com"];
}
}
I think to cheat and do so. one or two filters. This code will save the original to the mailbox and send notify. How to separate them? Thank you for helping. I definitely can’t do it myself