Item11918: The {MailerContrib}{EmailFilterin} example yields regexp warning. Provide better example.
Priority: Urgent
Current State: Closed
Released In: 1.1.6
Target Release: patch
Applies To: Extension
Component: MailerContrib
Branches: Release01x01 trunk
The info text in
bin/configure
for {MailerContrib}{EmailFilterIn} states: "You can use this expression to - for example - filter email addresses on your company domain, or even block use of raw emails in
WebNotify altogether (just make it something that will never match, e.g. ^notAnEmail$)."
However, with the
LocalSite.cfg line:
$Foswiki::cfg{MailerContrib}{EmailFilterIn} = '^notAnEmail$';
I get stderr output on the cron job that runs
tools/mailnotify
:
$+ matches null string many times in regex; marked by <-- HERE in m/
^\s+\*\s(?-xism:(?:Main\.)?)
((?x-ism:
[A-Z]+
[a-z\d]+
[A-Z]+
[A-Za-z\d]*
))
\s+\-\s+
(^notAnEmail$+ <-- HERE )
\s*$/ at /var/www/wiki/lib/Foswiki/Contrib/MailerContrib/WebNotify.pm line 347.
mailnotify once again performs as expected when I substitute the pattern
^@@notAnEmail
This is either a documentation fix, or a regexp fix. I'll leave that determination to folks who are familiar with the code.
--
ArthurProkosch - 01 Jun 2012
Updated the documentation to use your suggested match, and added a unit test that demonstrated the original problem and confirms that your suggestion works. Thanks!
--
GeorgeClark - 07 Nov 2012