EmailDiscussions.com

EmailDiscussions.com (http://www.emaildiscussions.com/index.php)
-   FastMail Forum (http://www.emaildiscussions.com/forumdisplay.php?f=27)
-   -   Sieve script to block emails sent to text.number@my-address? (http://www.emaildiscussions.com/showthread.php?t=72070)

Prognathous 25 Aug 2016 04:00 PM

Sieve script to block emails sent to text.number@my-address? [SOLVED]
 
I'm getting a lot of backscatter email with this pattern. Is there a way to filter it out? I never use text.number@, but do use text@ so it should be safe enough to filter out the former. The only question is - how?

Thanks!

BritTim 25 Aug 2016 09:25 PM

You can filter such addresses using a regular expression. Before doing so, ensure you are using the controls Fastmail already provides to discard backscatter. Adding custom rules is something to avoid until standard controls fail to achieve the desired effect. If you have already enabled discarding of backscatter, such messages are still leaking through, and you need help setting up a rule with a regular expression, please post again.

pjwalsh 26 Aug 2016 12:33 AM

A regex suggestion to catch the dominant address type, based on Melomac's in the main Backscatter thread:

\w+\.\d+@sub\.domain\.tld

Quote:

Originally Posted by BritTim (Post 596569)
If you have already enabled discarding of backscatter, such messages are still leaking through, and you need help setting up a rule with a regular expression, please post again.

My backscatter rules based on individual samples number about a dozen now, I'd like to use something more effective, which would be a sieve regex.

FirstLast.nn@sub.domain.tld is the consistent format. After name and . there are 2-5 digits, the subdomain always the same, based on my main account address.

This has been beyond annoying. Yes I have Backscatter enabled in Spam protection, there's no 'mark as read' option.

Prognathous 28 Aug 2016 11:42 AM

I just sent a question to Fastmail Support about this. Hopefully they can come up with a solution.

Prognathous 30 Aug 2016 06:19 PM

Kurian from Fastmail Support was very helpful. He suggested a script which I then tweaked a bit, and now this issue is solved. Here's the final script:

Code:

if header :regex "X-Delivered-to" "[a-z]+\\.[0-9]+@(myusername.domain.tld|myusername2.domain2.tld)" {
setflag "\\Seen";fileinto "INBOX.Trash";stop;
}

To quote Kurian:

Quote:

It looks for a one or more alphabetic characters followed by a period followed by one or more digits, followed by @, followed by a list of your domains separated by the | character. You can add any of your missing domains by separating them with |

Terry 30 Aug 2016 06:37 PM

Interesting thank you....

Prognathous 30 Aug 2016 07:32 PM

Is there a way to update the title of a thread to mark is as solved?

Prognathous 4 Sep 2016 03:12 AM

I just want to update that this script works perfectly. About 10 spam emails a day now arrive in the trash instead of my mailbox. Hopefully the spammers continue to use the text.number format, because it's easy to filter and is a format I'm not personally using.

Terry 4 Sep 2016 09:13 AM

You can use discard; stop; } then you wont see them at all...:D:D:D

Prognathous 5 Sep 2016 06:43 AM

That's what Kurian suggested, but I prefer the script to mark as read and move to trash to be able to better troubleshoot false positives etc.


All times are GMT +9. The time now is 03:06 PM.


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