3

Occasionally, I will come across a post (either a question or an answer) where, at the end of their code, something like this will be there:

If you have any more questions, you can contact me at [email protected].

I believe there should be a pop-up and a block preventing the user from posting that question when an email is detect somewhere in the post.

Having emails in posts is bad because it encourages other users to continue a discussion outside of SE, which can lead to unconnected information (for example, a tip in an answer that is a response to something said in an email), and it prevents future users from seeing all the information that the OP has to offer.

6
  • 4
    Is that really such a big problem that it warrants a feature? Commented Jul 31, 2015 at 0:07
  • 2
    @JeroenVannevel It's not that big of a problem, but it's not that complicated of a solution either. Commented Jul 31, 2015 at 0:08
  • 14
    Can you guarantee that there is no programming language in the world that would have valid syntax that would trip an email-matching regex? Granted, that is perhaps unlikely, but... can you further guarantee that any code with an example/placeholder email (e.g. [email protected]) isn't worth posting? This isn't as uncomplicated as you may think. Commented Jul 31, 2015 at 0:20
  • 1
    I think one of the bots in the Tavern complains if there's a post anywhere on the network with an email in it. Commented Jul 31, 2015 at 3:15
  • 1
    @Shokhet Not quite; it excludes several sites from this check, and also ignores emails appearing in code blocks (and emails with @example...). There are still some false positives: people discussing, e.g., customer databases, talk about storing and retrieving emails quite a bit. Commented Jul 31, 2015 at 5:12
  • @NormalHuman Thanks for clarifying that Commented Jul 31, 2015 at 12:08

1 Answer 1

23

I agree e-mail addresses should not be posted. However, such a filter would undoubtedly hit a lot of innocent posts as well.

I do not dare to guess how many posts there are on SO alone about matching e-mail addresses. Communicating about such questions and answers is going to get tough if you forbid placing e-mail addresses altogether, even the obviously fake ones.

Another problem is it won't be able to detect account[at]domain[dot]tld and all other imaginable variants. Checking whether an e-mail address is valid is hard. Checking whether any part of a post is a valid, non-bogus e-mail address even harder.

We could do a warning (but who reads those nowadays?), but a block would definitely create more problems than it would solve.

2
  • 5
    There are also legitimate reasons for writing emails in posts, e.g. security.stackexchange.com/a/45044 Commented Jul 31, 2015 at 3:21
  • There are also LBRY URLs, e.g. https://odysee.com/@eevblog:7 (though they seem to be covered (no false positives)). Commented Apr 21, 2022 at 9:10

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.