tkomc wrote: It works great. Just wonder if it can be enhanced so that it can phpBB can handle subdomain.
E.g. *@*.abc.com will ban all email account including *@us.abc.com, *@uk.abc.com, etc.
Code: Select all
if (preg_match('#^(([a-z0-9&.-_+])|(\*))+@((\.([a-z0-9\-]+\.)*?[a-z]+)|(\*))?[a-z0-9\-\.]+((\.([a-z0-9\-]+\.)*?[a-z]+)|(\*))$#is', trim($email_list_temp[$i])))
Code: Select all
if (preg_match('#^(([a-z0-9&.\-_+])|(\*))+@+(([a-z0-9\-\.])|(\*))+((\.([a-z0-9\-]+\.)*?[a-z]+)|(\*))$#is', trim($email_list_temp[$i])))
jsmotta wrote:tkomc wrote:It works great. Just wonder if it can be enhanced so that it can phpBB can handle subdomain.
E.g. *@*.abc.com will ban all email account including *@us.abc.com, *@uk.abc.com, etc.
Good idea. Didn't even think of that. My initial tests show this works...
My only concern, is that this effectively allows you to ban *@*.* , which is, well, the entire universe. But, I suppose there's no reason to prevent someone from banning the entire universe, as long as they understood what they were doing. Might be a good way to temporarily prevent any new subscriptions, if you had a need to.Code: Select all
if (preg_match('#^(([a-z0-9&.-_+])|(\*))+@((\.([a-z0-9\-]+\.)*?[a-z]+)|(\*))?[a-z0-9\-\.]+((\.([a-z0-9\-]+\.)*?[a-z]+)|(\*))$#is', trim($email_list_temp[$i])))
Anyhow, let me know if that works for you, and I'll post an updated .mod file with the enhancement.