Microsoft Outlook has a filter condition labelled "sent to people or public group", which seems to do what you ask for. Using the Rules Wizard I created a rule with details summarized as:
Apply this rule after the message arrives
sent to gmail.com
move it to the Gmail folder
Sending mail to that address, if I cc a gmail.com address, the rule catches it and the e-mail gets moved to the designated folder. If I omit the cc it does not.
Might be worth noting that when you specify the recipient address, Outlook will offer you a browse selection from your address book. Just type the desired domain in the "To:" field at the bottom. Outlook will say it doesn't know the user, but go ahead anyway and it should work.
This is with Outlook 2010, in case there are variations to syntax or elsewhere. Outlook because of the question tag, of course. It might be noted that it is even more straightforward in Mozilla Thunderbird, but this post is probably too long already.
EDIT #1: Detailed instructions
- Under the "Home" menu, click "Rules"
- Select "Manage Rules & Alerts"
- Click "New Rule"
- Under "Start from a blank rule", select "Apply rule on messages I receive", click "Next"
- Under "Step 1: Select condition(s)", check the box for "sent to people or specific group"
- Under "Step 2: Edit the rule description", click on the highlighted "people or public group" text
- In the "To ->" field near the bottom of the window, enter the domain you wish to filter for, click "OK"
- In the "Check Names" window, where it complains of not recognizing the address, click "Cancel"
- Back in the "Rules Wizard", noting that the rule description now includes your selected domain, click "Next"
- Under "Step 1: Select action(s)", check the box for "move it to the specified folder"
- Under "Step 2: Edit the rule description", click on the highlighted "specified" text
- Select an Outlook folder, click "OK"
- Again returned to the "Rules Wizard", note that the rule description now also includes the action to take
- Click "Finish" or "Next" (to add exceptions), name the rule as requested
- Ensure that "Turn on this rule" is checked, optionally check "Run this rule now", and click "Finish"
You could do this with a VBa script. The problem you'll have is though what happens if 2 rules apply. Does the email get copied, does only 1 rule get executed. – Dave – 2016-02-25T11:47:38.590