> > I would like comments on: > > /[EMAIL PROTECTED](?:\w){2,})/ REJECT Invalid address format. > > > ( to stop BS like this: [EMAIL PROTECTED] ) > > I am working on a "living" postfix server which reconfigures itself to > account for spamming/virus patterns. The above is supposed to block any > address which doesnt have at least 2 letters in the TLD portion... >
How about dispensing with all regexes to check e-mail addresses at least until after you have applied something such as Email::Valid to the address in question. E-mail addresses are just too big to wrangle with a simple regex. Your test case fails Email::Valid and it will let through many more addresses.... If you are looking for a validating regex use the one in the source there (ouch), and then start reducing after it has checked true validity. http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>