Hi,
Does Rollernet's Sieve implementation offer a sensible method of refusing messages with known bad file extensions e.g. Office macros etc?
If not, is there any other sensible way of refusing messages containing certain types of attachment?
Sieve and bad file extensions?
Moderator: Moderators
Re: Sieve and bad file extensions?
For the benefit of anybody else that stumbles across this, I don't believe Pigeonhole has many graceful methods of handling file attachments.
It's probably a bit dirty, but I eventually worked around the problem like this:
You'll need to require "reject","body" and "regex" when declaring the extensions for your script.
It's probably a bit dirty, but I eventually worked around the problem like this:
Code: Select all
if body :raw :regex ["filename=.*\.docm","filename=.*\.dotm","filename=.*\.xlm","filename=.*\.xlsm","filename=.*\.xltm","filename=.*\.xla","filename=.*\.pptm","filename=.*\.potm","filename=.*\.ppsm","filename=.*\.sldm"]
{
reject "Attachment contains a banned file extension.";
}
Re: Sieve and bad file extensions?
Can't edit the above post, but turns out that in some cases my regex was matching strings it shouldn't have. Fixed by adding word boundaries like this:
Code: Select all
if body :raw :regex ["\bfilename=.*\.docm\b","\bfilename=.*\.dotm\b","\bfilename=.*\.pptm\b","\bfilename=.*\.potm\b","\bfilename=.*\.ppsm\b","\bfilename=.*\.sldm\b","\bfilename=.*\.xlsm\b","\bfilename=.*\.xltm\b","\bfilename=.\*.xla\b","\bfilename=.\*.xlm\b"]
{
reject "Attachment contains a banned file extension.";
}
Re: Sieve and bad file extensions?
We did recently add a feature for this in the account control center with a predefined list:
https://acc.rollernet.us/mail/options.php
https://acc.rollernet.us/mail/options.php
Seth Mattinen, Roller Network LLC