You are here: Foswiki>Tasks Web>Item11918 (02 Dec 2012, GeorgeClark)Edit Attach

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
Reported By: ArthurProkosch
Waiting For:
Last Change By: GeorgeClark
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/                 
                    (^notAnEmail$+ <-- HERE )                        
                    \s*$/ at /var/www/wiki/lib/Foswiki/Contrib/MailerContrib/ 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

ItemTemplate edit

Summary The {MailerContrib}{EmailFilterin} example yields regexp warning. Provide better example.
ReportedBy ArthurProkosch
Codebase 1.1.5
SVN Range
AppliesTo Extension
Component MailerContrib
Priority Urgent
CurrentState Closed
Checkins distro:addbbe178e8a distro:59bd41c694a7
TargetRelease patch
ReleasedIn 1.1.6
CheckinsOnBranches Release01x01 trunk
trunkCheckins distro:59bd41c694a7
Release01x01Checkins distro:addbbe178e8a
Topic revision: r7 - 02 Dec 2012, GeorgeClark - This page was cached on 24 Oct 2016 - 05:25.

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License