Mailenable Filter not functioning properly....

Jeelani
Posts: 11
Joined: Wed Dec 03, 2014 5:08 am

Mailenable Filter not functioning properly....

Postby Jeelani » Sun Oct 22, 2017 9:47 pm

Hi there,
I am running ME Ent Ver. where I am trying to add a filter inside the filter container as "TestFilter" in that I have written the script as below.
The conditions are as below:
1. Should check first whether email is coming not from my domain.com if yes then
2. Should check the ME_HEADERS_CONTAIN either of the email ids "alpha.gm@domain.com e.mea@domain.com abc.123@domain.com" or if CriteriaMet([ME_SUBJECT],"*card*") or _ CriteriaMet([ME_BODY],"*card*") contains "card" then should not run any action on the filter which I applied(in this case copy to another email).
3. If the first creteria is false means if email is from my domain.com then should not do any thing.

If Not CriteriaMet([ME_FROM],"*@domain.com*") Then
If CriteriaMet([ME_HEADERS_CONTAIN],"*alpha.gm@domain.com*") or _
CriteriaMet([ME_HEADERS_CONTAIN],"*e.mea@domain.com*") or _
CriteriaMet([ME_HEADERS_CONTAIN],"*abc.123@domain.com*") or _
CriteriaMet([ME_SUBJECT],"*card*") or _
CriteriaMet([ME_BODY],"*card*") Then
FilterResult=0
Else
FilterResult=1
End If
End If



But when I am sending an email to say for example e.mea@domain.com or to any other email which is not in the list but contains "card" in either subject or body then its running the filter.
Am I doing anything wrong, can someone correct me here please.

Jeelani
Posts: 11
Joined: Wed Dec 03, 2014 5:08 am

Re: Mailenable Filter not functioning properly....

Postby Jeelani » Mon Oct 23, 2017 7:55 am

Can anyone provide the solution please.

Jeelani
Posts: 11
Joined: Wed Dec 03, 2014 5:08 am

Re: Mailenable Filter not functioning properly....

Postby Jeelani » Mon Oct 30, 2017 4:47 am

Am I making any mistake in my code, can someone update me on the above?

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

Re: Mailenable Filter not functioning properly....

Postby MailEnable-Ian » Tue Oct 31, 2017 12:47 am

Hi,

The first test would be to create an individual filter for your first criteria in the script checking the ME_FROM to see if it executes when the message sender address is not coming from *@domain.com*. Disable your current filter and create new one like this:

Code: Select all

If Not CriteriaMet([ME_FROM],"*@domain.com*") Then
FilterResult=0
End If
Regards,

Ian Margarone
MailEnable Support

Jeelani
Posts: 11
Joined: Wed Dec 03, 2014 5:08 am

Re: Mailenable Filter not functioning properly....

Postby Jeelani » Tue Oct 31, 2017 6:37 am

Hi Ian,

If Not CriteriaMet([ME_FROM],"*@domain.com*") Then
FilterResult=0
End If

I did the first filter and its working fine, but nested if is not functioning properly as described in the first i.e.

If CriteriaMet([ME_HEADERS_CONTAIN],"*alpha.gm@domain.com*") or _
CriteriaMet([ME_HEADERS_CONTAIN],"*e.mea@domain.com*") or _
CriteriaMet([ME_HEADERS_CONTAIN],"*abc.123@domain.com*") or _
CriteriaMet([ME_SUBJECT],"*card*") or _
CriteriaMet([ME_BODY],"*card*") Then
FilterResult=0

Jeelani
Posts: 11
Joined: Wed Dec 03, 2014 5:08 am

Re: Mailenable Filter not functioning properly....

Postby Jeelani » Fri Nov 03, 2017 7:34 am

gedas.j

please take out your post n dont hijack someone's post. can't you see the the existing post is not yet resolved n urs is completely a different post.

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

Re: Mailenable Filter not functioning properly....

Postby MailEnable-Ian » Wed Nov 08, 2017 12:01 am

Hi,

I would need to see the raw message that executes the filter when your testing. You can obtain the raw message file by logging into the web mail client and locating the message. Then right click on the message and select "Download Source". Once you have downloaded the message Open it up in Windows Notepad and paste it in a private message to me.
Regards,

Ian Margarone
MailEnable Support

Who is online

Users browsing this forum: No registered users and 8 guests