|
FastMail Forum All posts relating to FastMail.FM should go here: suggestions, comments, requests for help, complaints, technical issues etc. |
|
Thread Tools |
29 Aug 2015, 10:57 PM | #1 |
Member
Join Date: Aug 2008
Posts: 61
|
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 |
30 Aug 2015, 08:06 AM | #3 |
Intergalactic Postmaster
Join Date: May 2004
Location: Irving, Texas
Posts: 8,930
|
You won't be able to tell which BCC addresses the sender used, since these are hidden from all recipients. But you can discard all messages containing the domain "otherdomain.com" in From, To, Cc, etc. as follows:
I suggest that you look carefully at several of the messages which are in Chinese or Cyrillic. While reading a message, use More>Show Raw Message and look at the contents of these headers (which are near the top).:
|
30 Aug 2015, 12:16 PM | #4 | |
The "e" in e-mail
Join Date: May 2003
Location: mostly in Thailand
Posts: 3,095
|
Quote:
|
|
30 Aug 2015, 02:16 PM | #5 | |
Intergalactic Postmaster
Join Date: May 2004
Location: Irving, Texas
Posts: 8,930
|
Quote:
I believe that the Report Spam and Not Spam buttons appropriately learn immediately. Based on the current help, I also believe that messages permanently deleted from the Spam (Junk Mail) folder are learned as spam, and messages which are manually archived are learned as non-spam. I'm not sure if messages which are automatically purged due to folder settings are automatically learned. Bill |
|
30 Aug 2015, 03:01 PM | #6 | |
The "e" in e-mail
Join Date: May 2003
Location: mostly in Thailand
Posts: 3,095
|
Quote:
... I also believe that messages permanently deleted from the Spam (Junk Mail) folder are learned as spam ... This worries me. If a message has already been correctly identified as spam, I would not want the Bayesian probabilities to change by counting the message again. This could prejudice the percentages for both spammy and non spammy words. I would only want the probabilities to change if the message had originally been misclassified. Is my thinking on this flawed? |
|
30 Aug 2015, 05:45 PM | #7 |
The "e" in e-mail
Join Date: Feb 2006
Location: EU
Posts: 4,945
|
I suggest you create a dedicated folder, say "sieve test", for that purpose. Otherwise it's (next to) impossible to be sure whether any message was junked by your filter(s) under test, or by any other rule (e.g FM's default ones).
|
30 Aug 2015, 08:20 PM | #8 |
Member
Join Date: Aug 2008
Posts: 61
|
Thanks for the replies, especially Bill's.
I'll try to direct suspected spam to a folder rather than discard. Can anyone indicate what rules to setup for Chinese/Cyrillic charsets? Is it AnyHeader -> Contains "(specific charset)"? What are the Chinese/Cyrillic charsets I need to target? Also, I'd like to direct emails from other domains, but ONLY if they are sent to one of my domains (I don't want the rule to be applied to all my domains), can I do conditional rules that allow this, such as: If email is from @somedomain, and this SPECIFIC domain of mine is in the To/CC/BCC -> File in folder Thanks, |
30 Aug 2015, 10:03 PM | #9 | |
The "e" in e-mail
Join Date: Feb 2006
Location: EU
Posts: 4,945
|
Quote:
It's quite possible that the character set will be utf-8, which is NBG for filtering on. |
|
31 Aug 2015, 03:52 AM | #10 | |
Intergalactic Postmaster
Join Date: May 2004
Location: Irving, Texas
Posts: 8,930
|
Quote:
Bill |
|
31 Aug 2015, 04:30 AM | #11 | |||
Intergalactic Postmaster
Join Date: May 2004
Location: Irving, Texas
Posts: 8,930
|
Rule using both From and Delivered domains
Quote:
Quote:
Quote:
Code:
allof (header :contains "from" "@somedomain",header :contains ["to","cc","resent-to","x-delivered-to"] "@mydomain.com") |
|||
1 Sep 2015, 02:32 AM | #12 |
Member
Join Date: Aug 2008
Posts: 61
|
Thanks.
I'll see how this goes and post again if I require help tweaking some rules. |
16 Oct 2015, 07:55 PM | #13 |
Member
Join Date: Aug 2008
Posts: 61
|
OK, I've managed to cut down on a lot of the spam, but the one that eludes me is mail bounced from Gmail's mailer daemon that's in Chinese. Basically, my domain is being forged to send out Chinese spam that Google is bouncing. Unfortunately, as the email is coming from Google, the header is not from the original Chinese sender so there's not much I can do to target the email in a rule. The spammer is sending in UTF-8 anyway...
Is there no rule that would say something like: if email is from Google mailer daemon, and if text above "----- Message truncated -----" is in Chinese, mark as spam. ("----- Message truncated -----" is something Google includes in the body of their bounced emails.) Any other ideas? Thanks, |
17 Oct 2015, 01:53 AM | #14 |
Intergalactic Postmaster
Join Date: May 2004
Location: Irving, Texas
Posts: 8,930
|
Can you post the full headers from one of those Gmail mailer daemon messages in this thread?
|
18 Oct 2015, 07:17 PM | #15 |
Member
Join Date: Aug 2008
Posts: 61
|
Thanks,
I'm trying a rule where emails from google are put in a folder, at least it keeps them out of my inbox and I can quickly see if they are spam or not. I'll get back to you if I need further help. Thanks again. |