Block emails with a subject of "Re:" - ORF Forums

Block emails with a subject of "Re:" RSS Back to forum

1

We are receiving many emails with the subject of just “Re:”. These messages are clearly spam. How can I block all emails with the subject of just “Re:” and not block any legit emails with “Re: (Message Subject)”?
Thanks

by Toby Miletta more than 10 years ago
2

@Toby Miletta: You can use a regular expression Keyword Blacklist filter with Subject scope against these as:

^Re:$

I hope this helps. The ^ and $ symbols act as "anchors", basically forcing the regular expression to match only if the subject line is exactly "Re:", with no preceeding or following characters.

by Peter Karsai (ORF Team) more than 10 years ago
(in reply to this post)

3

@Peter Karsai (ORF Team): Thanks for your help Peter. Works perfectly.

by Toby Miletta more than 10 years ago
(in reply to this post)

4

@Toby Miletta: I am glad to hear that. If we can be of any further assistance, do not hesitate to contact us.

by Peter Karsai (ORF Team) more than 10 years ago
(in reply to this post)

5

not to threadjack or anything, but along this exact same line, i would like to be able to regex for this:

match this: "re:anything"
not match this: "re: anything"

notice the space - anything without a space after the colon (:) is always spam... and on the off chance that one might be legit, who cares we dont want email from people who have a thing against the space bar

by Bryon Humphrey more than 10 years ago
6

@Bryon Humphrey: This can be achived using:

^Re:\S.*

This will match any strings beginning with "Re:" ("^Re:"), followed by a non-whitespace character ("\S") and followed by zero or more arbitrary characters (".*"). The tricky part is "\S": this requires a character to be present after "Re:", but the regex will match only if it not a whitespace-class character. Whitespace characters include Space, Tab and Line-Ends, so if you are specifically looking for the Space character only, you can substitute "[^ ]" (note the whitespace after ^) for "\S", or a bit more elegantly "[^\x20]", where \x20 is the "ASCII" code of the space character in hexadecimal notation.

An excellent guide to Regular Expressions is available at http://www.regular-expressions.info/tutorial.html

by Peter Karsai (ORF Team) more than 10 years ago
(in reply to this post)

New comment

Fill in the form below to add a new comment. All fields are required. If you are a registered user on our site, please sign in first.

It will not be published.
hnp1 | hnp2