Sieve and bad file extensions?

Need help? Ask here.

Moderator: Moderators

Sieve and bad file extensions?

Postby bobpullen » Thu Jul 23, 2015 3:02 am

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?
bobpullen
 
Posts: 19
Joined: Fri Jul 18, 2014 2:10 am

Re: Sieve and bad file extensions?

Postby bobpullen » Sun Mar 13, 2016 7:02 am

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:

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.";
}

You'll need to require "reject","body" and "regex" when declaring the extensions for your script.
bobpullen
 
Posts: 19
Joined: Fri Jul 18, 2014 2:10 am

Re: Sieve and bad file extensions?

Postby bobpullen » Wed Mar 16, 2016 10:40 am

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.";
}
bobpullen
 
Posts: 19
Joined: Fri Jul 18, 2014 2:10 am

Re: Sieve and bad file extensions?

Postby Seth » Tue May 30, 2017 4:00 pm

We did recently add a feature for this in the account control center with a predefined list:
https://acc.rollernet.us/mail/options.php
Seth Mattinen, Roller Network LLC
Seth
Site Admin
 
Posts: 280
Joined: Sun Aug 30, 2009 10:44 pm
Location: Nevada


Return to Support

Who is online

Users browsing this forum: No registered users and 1 guest

cron