File type rulesets

Martin Hepworth martinh at SOLID-STATE-LOGIC.COM
Wed Jun 29 12:30:17 IST 2005


Julian

just spend a few mins getting my head around this...

OK this is quite nicely put, can this go in the wiki maybe with a full 
example rather than the partial you provided.

I presume the followind would be correct...

%rules-dir%/filename.rules:
FromOrTo: *@domain1.ie /etc/MailScanner/filename.domain1.ie.conf 
/etc/MailScanner/filename.rules.conf
FromOrTo: default /etc/MailScanner/filename.rules.conf

--
Martin Hepworth
Snr Systems Administrator
Solid State Logic
Tel: +44 (0)1865 842300


Julian Field wrote:
> No replies to this yet, did I scare everyone off? :-)
> 
> On 29 Jun 2005, at 10:41, Julian Field wrote:
> 
>> Where you say
>> Filename Rules = %etc-dir%/filename.rules
>> I think you mean
>> Filename Rules = %rules-dir%/filename.rules
>> and immediately below it I would say "/etc/MailScanner/rules"
>>
>> START READING HERE
>>
>> There is actually a way you can make this whole setup neater and  
>> easier to maintain.
>>
>> Whenever (in the MailScanner.conf or a *.rules file) you specify  the 
>> name of a "filename.rules.conf" file, you can supply a space- 
>> separated list of filename.rules.conf files.
>>
>> The filename allow/deny rules that are applied are the  concatenation 
>> of all the filename.rules.conf files that you have  listed.
>>
>> The allow/deny rule that is used for a particular attachment is the  
>> first one that matches. It stops processing there and does the  allow 
>> or deny (or deny+delete) that is appropriate.
>>
>> So you DON'T need to have a filename.rules.conf file that is a copy  
>> of the supplied one with an extra rule at the top (deny \.zip$ -  -). 
>> If you have a lot of these files this can get very awkward and  hard 
>> to maintain.
>>
>> All you actually need is one copy of the supplied  filename.rules.conf 
>> file, and 1 file for each modification. In this  example we are going 
>> to block zip files for mail to/from 'domain1.ie'.
>>
>> MailScanner.conf:
>> Filename Rules = %rules-dir%/filename.rules
>>
>> %rules-dir%/filename.rules:
>> FromOrTo: *@domain1.ie /etc/MailScanner/filename.domain1.ie.conf / 
>> etc/MailScanner/filename.rules.conf
>>
>> *** Here is the difference ***
>> /etc/MailScanner/filename.domain1.ie.conf:
>> deny \.zip$ - -
>>
>> /etc/MailScanner/filename.rules.conf:
>> Exactly as I supply it
>>
>> The thing to notice is the the filename.domain1.ie.conf only needs  to 
>> contain 1 line, it does not need to repeat the whole of  
>> filename.rules.conf.
>>
>> Cool huh?
>>
>> On 29 Jun 2005, at 01:23, Michele Neylon:: Blacknight.ie wrote:
>>
>>
>>> Following on my own issues with rulesets I posted the following:
>>>
>>> http://www.mneylon.com/blog/archives/2005/06/29/content-filtering- 
>>> with-mails
>>> canner-part-1-file-types/
>>>
>>> Any input, corrections etc., are welcome
>>>
>>> Michele
> 
> 

**********************************************************************

This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote confirms that this email message has been swept
for the presence of computer viruses and is believed to be clean.	

**********************************************************************

------------------------ MailScanner list ------------------------
To unsubscribe, email jiscmail at jiscmail.ac.uk with the words:
'leave mailscanner' in the body of the email.
Before posting, read the Wiki (http://wiki.mailscanner.info/) and
the archives (http://www.jiscmail.ac.uk/lists/mailscanner.html).

Support MailScanner development - buy the book off the website!




More information about the MailScanner mailing list