View Single Post
Old 10 Aug 2017, 12:04 PM   #3
n5bb
Intergalactic Postmaster
 
Join Date: May 2004
Location: Irving, Texas
Posts: 8,926
Arrow Rules for a message sent from or to a domain

Sorry this post is so long! You can create rules which affect messages as I believe you desire with regards to the domains. But you can't determine if a message was sent to a certain Bcc recipient (other than you), since no Bcc header is ever transmitted. Bcc means "Blind Carbon Copy", and so everyone other than the recipient is blind to the Bcc message copy. My rule will filter messages which meet both of these conditions:
  • Delivered To/Cc/Bcc *@mydomain.com
  • From/To/Cc *@otherdomain.com
Since any mistake could discard important messages, I recommend that you create a Test (or other name) folder and have the messages moved to that folder rather than discarded. You can set the properties of that folder to discard messages after a few weeks if you are worried about messages building up. Be sure to check the Test folder from time to time and let me know in this EMD thread if the rule doesn't work correctly.

After you create the Test folder, the rule can be created in the Settings>Rules screen as follows:
  • If all of the following conditions apply:
  • Any header matches glob pattern *@otherdomain.com
  • Any recipient's email ends with @mydomain.com
  • Action: Move the message to Test
  • You can optionally mark the message as read or pin it.
  • Save (at the upper left)
I have tested a version of this rule with six different combinations of From/To/Cc/Bcc with various domains, but it's hard to test all possible combinations. For simplicity, the rule actually searches for the otherdomain.com address in any message header AND that the message was delivered to *@mydomain.com (and not any other address set up as the main or alias address at your Fastmail account). If you have messages forwarded from some other account to your @mydomain.com account at Fastmail, this rule will act on those messages. If the message was in any way delivered to an alias (or main account address) at some domain other than mydomain.com, this rule with not act on that message.

For the Chinese language issue, as I suggested yesterday look at the full headers (More>Show Raw Message) of those messages you receive. Examine the X-Spam-source header Country or FromHeader tags, or the X-Spam-charsets or Content-Type headers (if you can find them). You might find some header in the content of the original bounce message which indicates the language or country of origin. You also might find some subject or message body content you can use for blocking those messages. But it's usually easier to block messages based on some header, since the subject and body are usually different for each of these unwanted messages. You could filter based on the bounce message subject (such as Undeliverable or Delivery Status Notification) which is unrelated to the language. Again, I recommend filing to a Test folder for a while before automatically discarding such messages.

Bill
n5bb is offline   Reply With Quote