rule to move email to folder according to alias ?

Copper Contributor

Hi all,

I have as email address fabio.f@mycompany.com with an alias email5@mycompany.com

How can I make that incoming emails sent to email5@ are automaticcaly moved to a folder named /to_email5 ?

Usually this rule is very simply to set, but in the case of office365, the email appears to be sent to fabio.f@ even if sent to email5@

 

---------------------------------------------

Added on 2019-12-03

I got suggestion to set a rule using the header fields.

Unfortunately, this does not work in all cases.

Indeed, Office365 seems to remove(hide?) the header field:

X-Original-To

which is needed in case I am receiving the email as BCC.

Other email providers keep (add?) the field "X-Original-To" in the header,

so it is possible to understand to which email/alias the email was sent

 

---------------------------------------------

 

thank you

5 Replies

Simply create a rule with the “with specific words in the message header” condition. 

Thank you Vasil.

I created a rule

----------------------------------------------------------------------

with the specific word "email5@mycompany.com"

EXCEPT with the specific word "fabio.f@mycompany.com"

move to /to_email5

----------------------------------------------------------------------

 

I put the second line because I do not know all strange cases for the header. For example, it could be the case where somebody writes to:fabio.f@ and cc:email5@ in the same email

 

Anyhow, if somebody sends me an email with BCC: email5@mycompany.com I see no way to make the rule to work properly. Indeed email5@mycompany.com does not appean in any place in the header (actually, also fabio.f@ is not present)

 

thank you - Fabio

Yup, that's the expected behavior for BCC.

not quite really.

With other email providers, in the header remains something like this:
X-Original-To: skynet@someserver.biz
Delivered-To: skynet@someserver.biz

I just made a test, sending from a provider-A, an email with 2 BCC: one on provider-B, one on Office365

The email received on provider-B and on Office-365 was the same, but the header was different.
Opening that one arrived at Office365, those fields were missing:
X-Original-To: skynet@someserver.biz
Delivered-To: skynet@someserver.biz

They were instead present opening the email received ad provider-B

Off course, as you said, in the email header received at provider-B, it was still missing the email address used for BCC to office365.

It looks like that office365 removes/hide the header fields (X-Original-To and Delivered-To)

My question remains partially open:
if somebody send me an email in BCC to an alias of mine, (for esemple alias1@myserver.com) how can I automatically move it to a given folder? for example ealias1

thank you

While old, i'm giving a try since I successfully redirected mails sent to an alias address to an arbitrary folder without issues :

Send one e-mail to your alias address,
Open it in raw mode to see all the headers,
Search "To: " (with the space),
Copy the whole line for later,
Create a new rules with a condition of «headers contains» and paste the whole line.
Then execute the action you wish with that.

 

For Bcc, you would need to find an appropriate header to filter on using the same technique.