I'd like to set up a filter that files mail into a folder based on the address that was used to deliver the mail.
First thought was to set conditions based on To: and Cc: but this isn't perfect, for at least two reasons:
- If the message was delivered by BCc: then the address will not appear in To: or Cc:
- If the message was sent to more than one address that maps to the account, then the To/Cc condition will match every instance of the message, instead of just the one intended.
Example of the second case: Someone sends mail to firstname.lastname@example.org and email@example.com. In the SMTP transaction there are two recipient addresses and the message is delivered twice. However there's no way to tell a Filter to put one of the incoming copies into the Web folder and the other one into the IT folder. (Is there?). One use case might be if the two folders are shared to different groups. Another would be a single person transitioning between affiliated organizations, who wants to maintain a single account with aliases that are then sorted.
It seems by the time the message is delivered to the account, the only differentiating feature is buried in the Received headers. However I tried filtering on "Received" to no effect whatsoever. (Should I filter on "Received:"?)
Looks like Bug 15395 - Optionally add X-Original-To header would solve my problem (and I'm voting for it) but what are the prospects for it?