External Email (Gmail, Hotmail, Yahoo Mail) to My Domain Group Filter (Help Required)
-
- Posts: 77
- Joined: Mon Jan 18, 2016 8:10 am
External Email (Gmail, Hotmail, Yahoo Mail) to My Domain Group Filter (Help Required)
Please help me in below script with multiple external domains like gmail, hotmail, yahoo mail etc.... Filter delete emails when person hit to my specific group.
Working proper with Gmail to my Domain Group email address (MailEnable Version 6.84)
FilterResult=0
If CriteriaMet([ME_FROM],"*@gmail.com") And _
CriteriaMet([ME_TOorCC],"GroupName@mydomain.com") Then
FilterResult=1
End If
Action : Delete Emails
I tried to add more external email addresses as below but not succeed
FilterResult=0
If CriteriaMet([ME_FROM],"*@gmail.com") And CriteriaMet([ME_FROM],"*@hotmail.com") And CriteriaMet([ME_FROM],"*@yahoo.com") And CriteriaMet([ME_FROM],"*@live.com") And CriteriaMet([ME_FROM],"*@outlook.com") And _
CriteriaMet([ME_TOorCC],"GroupName@mydomain.com) Then
FilterResult=1
End If
I will be very thankful to you if you help me in it.
Working proper with Gmail to my Domain Group email address (MailEnable Version 6.84)
FilterResult=0
If CriteriaMet([ME_FROM],"*@gmail.com") And _
CriteriaMet([ME_TOorCC],"GroupName@mydomain.com") Then
FilterResult=1
End If
Action : Delete Emails
I tried to add more external email addresses as below but not succeed
FilterResult=0
If CriteriaMet([ME_FROM],"*@gmail.com") And CriteriaMet([ME_FROM],"*@hotmail.com") And CriteriaMet([ME_FROM],"*@yahoo.com") And CriteriaMet([ME_FROM],"*@live.com") And CriteriaMet([ME_FROM],"*@outlook.com") And _
CriteriaMet([ME_TOorCC],"GroupName@mydomain.com) Then
FilterResult=1
End If
I will be very thankful to you if you help me in it.
Last edited by tanveer.hussain on Mon Apr 25, 2016 11:37 am, edited 2 times in total.
-
- Posts: 77
- Joined: Mon Jan 18, 2016 8:10 am
Re: External Email (Gmail, Hotmail, Yahoo Mail) to My Domain Group Filter (Help Required)
Expert Opinion required
-
- Site Admin
- Posts: 9738
- Joined: Mon Mar 22, 2004 4:44 am
- Location: Melbourne, Victoria, Australia
Re: External Email (Gmail, Hotmail, Yahoo Mail) to My Domain Group Filter (Help Required)
Hi,
Try this script:
You will need to create the text file "domains.txt" within the path specified on the criteria and add each domain embraced by wildcards.
Example:
Try this script:
Code: Select all
FilterResult=0
If CriteriaMet([ME_FROM],"<REFERENCE><FILE>domains.txt</FILE><PATH>C:\Program Files (x86)\Mail nable\Config\Filters\Patterns</PATH><REFERENCE>") AND _
CriteriaMet([ME_TOorCC],"GroupName@mydomain.com") Then
FilterResult=1
End If
Example:
Code: Select all
*@gmail.com*
*@yahoo.com*
Regards,
Ian Margarone
MailEnable Support
Ian Margarone
MailEnable Support
-
- Posts: 77
- Joined: Mon Jan 18, 2016 8:10 am
Re: External Email (Gmail, Hotmail, Yahoo Mail) to My Domain Group Filter (Help Required)
Thanks IAN for your response. I will check and let you know if it works.
-
- Posts: 77
- Joined: Mon Jan 18, 2016 8:10 am
Re: External Email (Gmail, Hotmail, Yahoo Mail) to My Domain Group Filter (Help Required)
IAN thanks for your script but is not working.
-
- Site Admin
- Posts: 9738
- Joined: Mon Mar 22, 2004 4:44 am
- Location: Melbourne, Victoria, Australia
Re: External Email (Gmail, Hotmail, Yahoo Mail) to My Domain Group Filter (Help Required)
Hi,
Can you provide more detail in regards to it not working?
Can you provide more detail in regards to it not working?
Regards,
Ian Margarone
MailEnable Support
Ian Margarone
MailEnable Support
-
- Posts: 77
- Joined: Mon Jan 18, 2016 8:10 am
Re: External Email (Gmail, Hotmail, Yahoo Mail) to My Domain Group Filter (Help Required)
IAN,
I checked it with my test domain. i created multiple domains with given your script.
e.g. (Local Domains Test)
i restrict to group test_group@abc.com and i blocked abc1.com and abc2.com with file you mentioned in script with location but emails are receiving on said group . i strictly followed your instruction.
I yet not checked in my production server because of reliability or any malfunctioning in real environment.
I checked it with my test domain. i created multiple domains with given your script.
e.g. (Local Domains Test)
i restrict to group test_group@abc.com and i blocked abc1.com and abc2.com with file you mentioned in script with location but emails are receiving on said group . i strictly followed your instruction.
I yet not checked in my production server because of reliability or any malfunctioning in real environment.
-
- Posts: 560
- Joined: Mon Nov 03, 2003 7:48 am
- Location: Cape Town
Re: External Email (Gmail, Hotmail, Yahoo Mail) to My Domain Group Filter (Help Required)
Try this (based on your original script):
Cheers,
Brett
Code: Select all
FilterResult=0
If (CriteriaMet([ME_FROM],"*@gmail.com") OR CriteriaMet([ME_FROM],"*@hotmail.com") OR CriteriaMet([ME_FROM],"*@yahoo.com") OR CriteriaMet([ME_FROM],"*@live.com") OR CriteriaMet([ME_FROM],"*@outlook.com")) AND _
CriteriaMet([ME_TOorCC],"GroupName@mydomain.com) Then
FilterResult=1
End If
Brett
-
- Posts: 77
- Joined: Mon Jan 18, 2016 8:10 am
Re: External Email (Gmail, Hotmail, Yahoo Mail) to My Domain Group Filter (Help Required)
Thanks Brett,
I will check it and update you.
I will check it and update you.
-
- Posts: 77
- Joined: Mon Jan 18, 2016 8:10 am
Re: External Email (Gmail, Hotmail, Yahoo Mail) to My Domain Group Filter (Help Required)
Bret above given script working but it blocks genuine traffic too . My requirement is to block traffic to specific group defined in script but if i approach to specific person on that domain it also blocking the traffic.
Need to block traffic on group@emaildomain.com but person can send email to any person on the same domain. if hit the group traffic should be blocked.
please help.
Need to block traffic on group@emaildomain.com but person can send email to any person on the same domain. if hit the group traffic should be blocked.
please help.
-
- Posts: 560
- Joined: Mon Nov 03, 2003 7:48 am
- Location: Cape Town
Re: External Email (Gmail, Hotmail, Yahoo Mail) to My Domain Group Filter (Help Required)
Post the actual text of your current script filter so we can check for any possible errors.
-
- Posts: 77
- Joined: Mon Jan 18, 2016 8:10 am
Re: External Email (Gmail, Hotmail, Yahoo Mail) to My Domain Group Filter (Help Required)
here i pasted the script which i am running
FilterResult=0
If CriteriaMet([ME_FROM],"*@a.com") OR CriteriaMet([ME_FROM],"*@b.com") OR CriteriaMet([ME_FROM],"*@xyz.com") AND _
CriteriaMet([ME_TOorCC],"group@abc.com") Then
FilterResult=1
End If
FilterResult=0
If CriteriaMet([ME_FROM],"*@a.com") OR CriteriaMet([ME_FROM],"*@b.com") OR CriteriaMet([ME_FROM],"*@xyz.com") AND _
CriteriaMet([ME_TOorCC],"group@abc.com") Then
FilterResult=1
End If
-
- Posts: 560
- Joined: Mon Nov 03, 2003 7:48 am
- Location: Cape Town
Re: External Email (Gmail, Hotmail, Yahoo Mail) to My Domain Group Filter (Help Required)
The OR section should be bracketed:
If (CriteriaMet([ME_FROM],"*@a.com") OR CriteriaMet([ME_FROM],"*@b.com") OR CriteriaMet([ME_FROM],"*@xyz.com")) AND _
You want the filter to trigger if any of the domains match (first condition) and the to/cc address is your group (second condition). The brackets are required to fully create the first condition.
Cheers,
Brett
If (CriteriaMet([ME_FROM],"*@a.com") OR CriteriaMet([ME_FROM],"*@b.com") OR CriteriaMet([ME_FROM],"*@xyz.com")) AND _
You want the filter to trigger if any of the domains match (first condition) and the to/cc address is your group (second condition). The brackets are required to fully create the first condition.
Cheers,
Brett
-
- Posts: 77
- Joined: Mon Jan 18, 2016 8:10 am
Re: External Email (Gmail, Hotmail, Yahoo Mail) to My Domain Group Filter (Help Required)
Thanks Brett,
The Script is now working and deleting email who targets "group@abc.com" i have checked. but need to clarify one thing which is important. I observe that if anyone from else domain "@a.com" emailing to "domain abc.com" group and also a individual person of the same domain
It is working fine but i got the situation that if anyone send email to group and any person on the same domain in one email but it is also blocked by filter. is it possible to release block group but not block individual person in single email.
thanks
The Script is now working and deleting email who targets "group@abc.com" i have checked. but need to clarify one thing which is important. I observe that if anyone from else domain "@a.com" emailing to "domain abc.com" group and also a individual person of the same domain
It is working fine but i got the situation that if anyone send email to group and any person on the same domain in one email but it is also blocked by filter. is it possible to release block group but not block individual person in single email.
thanks
-
- Posts: 77
- Joined: Mon Jan 18, 2016 8:10 am