content filter pattern + limiting to incoming messages only

content filter pattern + limiting to incoming messages only

Postby david » Wed Sep 15, 2010 11:31 pm

Hi there,

I have several domains set up on AMS and I want any incoming mail that's sent to any sales@... to be redirected to a specific mailbox. I tried the following filter: Any SMTP recipient contains "sales". I understand this will catch also emails sent to salesperson@... or bigsales@..., but I couldn't figure how I could set a filter that does something like the following regular expression: ^sales@, which means that this expression will match only if sales stands at the beginning of the address and it has a @ after the word sales.

Happy if you could clarify whether that's possible.

Another problem I found is that this rule I added catches also all outgoing messages too.. How can I limit it to catch only incoming ones?

Thanks a lot!
David.
david
 
Posts: 17
Joined: Fri Jun 06, 2008 3:21 pm

Re: content filter pattern + limiting to incoming messages only

Postby Code Crafters » Thu Sep 16, 2010 6:40 am

You should set up the following conditions:

1 - Any SMTP recipient starts with "sales@" (not case sensitve)
2 - AND Any recipients exist locally

You can use the preset rule "Send Copy of All Incoming Mail To" to cheat on how to create the incoming or outgoing mail conditions (No. 2 in this example). I've put recipients existing (incoming mail) second just because its a more expensive call so slightly more efficient this way. Note also the "starts with" in the first condition with the match string "sales@" so that it has to be "sales@anythingelse".
Code Crafters
 
Posts: 943
Joined: Mon Sep 10, 2007 2:35 pm

Re: content filter pattern + limiting to incoming messages only

Postby david » Sat Sep 18, 2010 11:40 am

Thanks! Will test it and get back if something doesn't work.
david
 
Posts: 17
Joined: Fri Jun 06, 2008 3:21 pm


Return to General

Who is online

Users browsing this forum: No registered users and 25 guests

cron