not forward if condition match

Discussion forum for Enterprise Edition.
Post Reply
pedromaster88
Posts: 1
Joined: Fri Nov 21, 2014 2:05 pm

not forward if condition match

Post by pedromaster88 » Fri Nov 21, 2014 2:18 pm

Hi all,

i need to have this kind of configuration on my mailenable enterprise professional version:

defatul action forward all email to an external backup email, but if in subject or sender contains some specified value, the email don't have to be forwarded.

for example:
all the email for user "user1@mydomain.com" have to be forwared to "user1_backupmail@gmail.com" by default but this action have not to be done if the subject cointain "tag-spam".
or
all the email for user "all@mydomain.com" have to be forwared to "user1_backupmail@gmail.com" only if the sender is matching with "*@someotherdomain.com"

in forward tab of an email is not possible to specify some rules?

Thanks all :)

bfonseca
Posts: 22
Joined: Wed Oct 27, 2010 5:25 pm

Re: not forward if condition match

Post by bfonseca » Fri Nov 21, 2014 6:33 pm

Sounds like your trying to setup some sort of archiving. Is that correct ?

If I am understanding you correctly here are the steps:

create your backup email account .. ex. mx_archive@domain.com

right-click on MTA under services and connectors and enable archiving. Select your post office and select mx_archive@domain.com as your mailbox you want all the email to go to. There is an option below that (check box) that lets you archive before all your filters or after. This will archive all email from all users in your post office to one folder that allows you to navigate through and it sorts it by dates ...

Brian

frontdist
Posts: 17
Joined: Tue Mar 05, 2013 7:12 pm

Re: not forward if condition match

Post by frontdist » Wed Dec 03, 2014 4:11 am

If you are able to do this on a per-postoffice basis, then it is possible.

If you right click on the properties of a postoffice and go to the filters tab, you can create two filters to do what you want. The filters are processed in priority order, so a "stop forwarding" filter would take precedence over a "forwarding" filter if placed above it in the list.

You may have to create a custom script (which is an option) in order to achieve what you want.

For example, I have a script set up that forwards a copy of all email sent to user1 to user2. Unless the email was sent to user1 by user2 (in which case they would receive their own email back as a forward), or unless user2 and user1 were BOTH in the TO or CC fields of a given email. So if user3 sends an email to user1 and CC's user2, user2 would only get 1 copy, and not 2.

Here is the script:

Code: Select all

FilterResult=0

If (CriteriaMet([ME_TOorCC],"user1@domain.com") And _
CriteriaMet([ME_TOorCC],"user2@domain.com")) Then

FilterResult=1

End If

I still get occasional times where user2 gets 2-3 copies of an email for no apparent reason, not sure WTF is up with that.

Post Reply