开发者

Email block list question

I am validating email block list for 3 things:

1) Block email like: abc@test.com

2) Domain like: test.com

3) SubDomain like: .com

So when a user submits an email, it can be rejected from a block list for any of the 3 reasons. The question is do i need 3 separate tables for this and how will it work? System takes the email runs it in block list 1, then list 2 then list 3 or 开发者_StackOverflow社区is there some way t write a function or something that can do all 3 runs at once?

And is this best stored in a RDMS or NoSQL implementation? The domain and email block lists around approx 500,000 entries. Email lists will grow longer as i add spam emails to the list. Sumdomain list will be around 10-15 depending on some custom logic.

Note: This list will even be used for email filters on site to reject mail as spam.


Use regex, or the basic LIKE syntax:

SELECT * FROM tbl_banned WHERE ban_pattern LIKE 'someone@domain.ext'

And while banning use either:

abc@test.com
*@test.com
*.com

In MySQL the * is %.

EDIT

I missed the second part of the question out sorry. Imho, storing this in the RDBMS impl. is far enough, I don't see no problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜