|
FastMail Forum All posts relating to FastMail.FM should go here: suggestions, comments, requests for help, complaints, technical issues etc. |
|
Thread Tools |
6 Mar 2015, 08:02 AM | #1 |
Member
Join Date: Sep 2006
Posts: 49
|
fastmail sieve script not working
Hello,
on my fastmail member account, the sieve script is not working, I have used the fastmail interface that automatically generated this script: require ["envelope", "imapflags", "fileinto", "reject", "notify", "vacation", "regex", "relational", "comparator-i;ascii-numeric", "body", "copy"]; if anyof( header :contains "from" "domain1.com", header :contains "from" "domain2.com", header :contains "from" "domain3.com", header :contains "from" "domain4.com", header :contains "from" "domain5.com", header :contains "from" "domain6.com" ) { discard; stop; } if true { redirect :copy "myemailg@gmail.com"; } but, I still get the emails from the above domains on my inbox I have used the sieve script test of fastmail, and it discard the messages fine so what can be wrong? Thank you |
6 Mar 2015, 11:15 AM | #2 |
Intergalactic Postmaster
Join Date: May 2004
Location: Irving, Texas
Posts: 8,929
|
Script works for me
I tried a version of your script and it worked perfectly for me. Be sure to check the full headers of a message which was not discarded and look at the actual From header contents.
Bill |
7 Mar 2015, 02:58 AM | #3 | |
Member
Join Date: Sep 2006
Posts: 49
|
Quote:
for me the script does not work at all on my member account, but it does work on the Enhance account. I have tried again with this: require ["envelope", "imapflags", "fileinto", "reject", "notify", "vacation", "regex", "relational", "comparator-i;ascii-numeric", "body", "copy"]; if anyof( header :contains "from" "myemailg@gmail.com", ) { discard; stop; } if true { redirect :copy "myemail@fastmail.com"; } them I have sent an email from my myemailg@gmail.com to the fastmail member account and it goes to the inbox instead of being discard do you have any suggestion? thank you |
|
7 Mar 2015, 10:30 AM | #4 |
Intergalactic Postmaster
Join Date: May 2004
Location: Irving, Texas
Posts: 8,929
|
Here is the simple script I'm using. It works on both a Member and a Lite account.
Code:
require ["envelope", "imapflags", "fileinto", "reject", "notify", "vacation", "regex", "relational", "comparator-i;ascii-numeric", "body", "copy"]; if anyof( header :contains "from" "mydomain.net", header :contains "from" "domain1.com" ) { discard; stop; } Be sure you Apply your Sieve changes or they will not be used. If you get any errors at the top of the screen your script will not be used - you should see "Advanced rules saved" near the top center after clicking "Apply all changes". Please be sure to check the From header in the Raw Message. If you have a Guest account you can't use a full custom Sieve script, but Member and higher level accounts support custom Sieve. Bill |
7 Mar 2015, 04:05 PM | #5 |
Member
Join Date: Sep 2006
Posts: 49
|
Bill,
it did work so the problem is only the redirect, the difference I can see in both codes is only the redirect, does this mean I can't redirect? or can you see any issue in the redirect code? thank you |
8 Mar 2015, 11:42 AM | #6 | |
Intergalactic Postmaster
Join Date: May 2004
Location: Irving, Texas
Posts: 8,929
|
Quote:
|
|
10 Mar 2015, 02:22 PM | #7 |
The "e" in e-mail
Join Date: Jul 2002
Location: VK4
Posts: 3,028
|
Surly you have to take out the stop; for the rest of the rules to work ?
|
11 Mar 2015, 07:33 AM | #8 | |
Intergalactic Postmaster
Join Date: May 2004
Location: Irving, Texas
Posts: 8,929
|
Quote:
Code:
if header :value "ge" :comparator "i;ascii-numeric" ["X-Spam-score"] ["5"] { fileinto "INBOX.Junk Mail"; stop; } |
|
11 Mar 2015, 02:30 PM | #9 |
The "e" in e-mail
Join Date: Jul 2002
Location: VK4
Posts: 3,028
|
Ok thanks.....yes I understand also did not realise it had file into junk mail....
|
12 Mar 2015, 09:04 AM | #10 |
Intergalactic Postmaster
Join Date: May 2004
Location: Irving, Texas
Posts: 8,929
|
It's an "if ... then ..." conditional execution programming structure.
Bill |