Multi Depth Rules

Rick Cooper rcooper at dwford.com
Wed May 8 16:01:48 IST 2013


 

  _____  

From: mailscanner-bounces at lists.mailscanner.info
[mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Jerry
Benton
Sent: Tuesday, May 07, 2013 5:59 PM
To: MailScanner discussion
Subject: Multi Depth Rules


I am creating the structure for "Scan Messages" and am wondering if anyone
has tested this. I am using the MailScanner file name rules structure as a
basis, which looks like this: 

---
Filename Rules = %etc-dir%/frules/filename.rules:

FromOrTo: domain.com /etc/MailScanner/frules/domain.com.fn.conf 


When you look at the contents domain.com.fn.conf, it contains the rules for
that domain. This setup does work.
---


So, what I am looking to do now is the same thing for "Scan Messages". 

---
Scan Messages = %rules-dir%/scan.messages.rules
FromOrTo:  domain.com  /etc/MailScanner/scan/domain.com.scan.conf 


domain.com.scan.conf

From: pain.customer.com   no
FromOrTo: default yes
---
 
 
It's been a while since I poked about inside mailscanner but IIRC there are
two things about rules that must be followed:
    1. Must end in .rules
    2. Must be in the defined %rules-dir%
 
Now this might not seem incorrect because the filename/type rules point to
.conf files in the etc directory but it is as they are the action same as
yes/no. If I am recalling this correctly the above should be
 
Scan Messages = %rules-dir%/scan.messages.rules
FromOrTo: domain.com %rules-dir%/domain.com.scan.rules
 
domain.com.scan.rules
From: pain.customer.com no
FromOrTo: default yes
 
I have not the time to test it or take a refresher look at the code but I am
pretty sure it would have to be this way to follow the parsing rules for
MailScanner to understand it was looking at a rule file 
 
Rick
 
 


Has anyone tested this? It is basically a structure 2 levels deep instead of
1. 


-- 


--

Jerry Benton

Mailborder Systems
www.mailborder.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20130508/4954cf2b/attachment.html 


More information about the MailScanner mailing list