Filter to stop filter processing for multiple postoffices

keith@vfsremote.com
Posts: 25
Joined: Fri Mar 20, 2015 7:53 pm

Filter to stop filter processing for multiple postoffices

Postby keith@vfsremote.com » Mon Sep 21, 2015 8:01 pm

Hello,

I need to stop filter processing for messages associated with multiple postoffices. Rather than have a filter rule for every postoffice I would like to condense this into one rule using a criteria script as I don't see any other way of doing it. I have taken a look at http://www.mailenable.com/Help/Files/advancedscripting.htm but to be honest it would take some experimentation on a live server to figure it out, which I would like to avoid. Does anyone have a script like this already or perhaps someone could help me out?

Thank You,
Keith Damron
Manager of Customer Support

VisionFriendly.com
1245 E. Diehl Road, Suite 307
Naperville, IL 60563
630 553-0000 x112
Keith@visionfriendly.com

MailEnable-Ian
Site Admin
Posts: 8524
Joined: Mon Mar 22, 2004 4:44 am
Location: Melbourne, Victoria, Australia

Re: Filter to stop filter processing for multiple postoffices

Postby MailEnable-Ian » Thu Sep 24, 2015 4:17 am

Hi,

Here is an example:

Code: Select all

FilterResult=0
If CriteriaMet([ME_SUBJECT],"*Value*") OR _
CriteriaMet([ME_BODY],"*Value*") AND _
CriteriaMet([ME_TO],"<REFERENCE><FILE>domains.TXT</FILE><PATH>C:\Program Files\Mail Enable\Config\Filters\Patterns</PATH><REFERENCE>") THEN
FilterResult=1
End If


You need to add the domain name in each postoffice to a .txt file located in the path above. (I.e: *@exampledomain.com*) (I.e:C:\Program Files\Mail Enable\Config\Filters\Patterns). Not sure if the above script is what you need but it will start you off.
Regards,

Ian Margarone
MailEnable Support

keith@vfsremote.com
Posts: 25
Joined: Fri Mar 20, 2015 7:53 pm

Re: Filter to stop filter processing for multiple postoffices

Postby keith@vfsremote.com » Thu Sep 24, 2015 10:17 pm

Hello Ian,

You have helped me out before and I appreciate it. We ended up experimenting in Azure and came up with the below script and I just keep adding to it. Which would be the ideal solution and why?

Code: Select all

FilterResult = 0

' Sysadmin note: all domains specified below must be lowercase
If InStr(1, LCase("%POSTOFFICE%"), "example1.com")>0 _
    Or InStr(1, LCase("%POSTOFFICE%"), "example2.com")>0 _
    Or InStr(1, LCase("%POSTOFFICE%"), "example3.com")>0 _
    Or InStr(1, LCase("%POSTOFFICE%"), "example4.com")>0 _
    Or InStr(1, LCase("%POSTOFFICE%"), "example5.com")>0 Then
      FilterResult = 1
End If


Thank You,
Keith Damron
Manager of Customer Support

VisionFriendly.com
1245 E. Diehl Road, Suite 307
Naperville, IL 60563
630 553-0000 x112
Keith@visionfriendly.com

MailEnable-Ian
Site Admin
Posts: 8524
Joined: Mon Mar 22, 2004 4:44 am
Location: Melbourne, Victoria, Australia

Re: Filter to stop filter processing for multiple postoffices

Postby MailEnable-Ian » Fri Sep 25, 2015 1:16 am

Hi,

The script you have created should work too. The only difference would be that you would need to add the script. Where as the script example I provided you can just add an entry to the file. The example I provided also checks for message body and subject as that's what I had thought you were trying to filter.
Regards,

Ian Margarone
MailEnable Support

Who is online

Users browsing this forum: No registered users and 1 guest