EmailDiscussions.com  

Go Back   EmailDiscussions.com > Email Service Provider-specific Forums > FastMail Forum
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
Stay in touch wirelessly

FastMail Forum All posts relating to FastMail.FM should go here: suggestions, comments, requests for help, complaints, technical issues etc.

Reply
 
Thread Tools
Old 4 Aug 2017, 01:59 AM   #1
hoanghieu
Junior Member
 
Join Date: Aug 2017
Posts: 1
Help with Sieve rules

I'd like to setup the following rules in Fastmail for a specific domain I own:

For emails received at *@mydomain.com, if one of the other recipients (to, cc, bcc) of the email is *@otherdomain.com:
- bounce/discard email

----
For emails received at *@mydomain.com, if the sender of the email is *@otherdomain.com:
- bounce/discard email

----
If the whole email is in Chinese or Cyrillic (including postmaster emails from providers such as Gmail that contain an explanation in English, but the bounced email is in Chinese):
- bounce/discard email or place in Spam folder if discarding not possible.
----

Can someone possibly help with creating these rules?

Thanks
hoanghieu is offline   Reply With Quote

Old 9 Aug 2017, 01:20 PM   #2
n5bb
Intergalactic Postmaster
 
Join Date: May 2004
Location: Irving, Texas
Posts: 8,203
Welcome to the EMD forums! I thought I had replied to you several days ago, but I was out of town on business trips and I must have fallen asleep before sending my reply.

Your third request (concerning filtering by language) is not possible in many cases. The only easy thing to filter by is the content of these headers related to the source and character set used:
  • X-Spam-source
  • X-Spam-charsets
  • Content-Type
Most Chinese messages would be expected to come from CN or TW (X-Spam-source Country codes for China & Taiwan). So please look at the message you want to block and see if they all have common contents in on or more of the three headers listed above.

I will post instructions about your other questions within a day or two. Sorry for the delay.

Bill
n5bb is offline   Reply With Quote
Old 10 Aug 2017, 12:04 PM   #3
n5bb
Intergalactic Postmaster
 
Join Date: May 2004
Location: Irving, Texas
Posts: 8,203
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
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +9. The time now is 12:24 AM.

 

Copyright EmailDiscussions.com 1998-2013. All Rights Reserved. Privacy Policy