This question about Using an extension: Answered

mailnotify doesn't support the -user option

The documention says to use the -user flag to tools/mailnotify to get around a problem. The problem is, that option isn't implemented, even in the latest version attached to the extension's page.
foreach my $arg ( @ARGV ) {
    if( $arg eq "-q" ) {
        $verbose = 0;
    } elsif ( $arg eq "-nonews" ) {
        $nonews = 1;
    } elsif ( $arg eq "-nochanges" ) {
        $nochanges = 1;
    } elsif ( $arg =~ m/^-(.*)/ ) {
        push( @exwebs, $1 );
    } else {
        push( @webs, $arg );
    }
}

I don't know if it got lost or what, but there's no -user flag here!


The -user option is processed in the CLI Engine lib/Foswiki/Engine/CLI.pm There were some bugs associated with this in 1.0.9, in particular the default -user setting was incorrect. This is fixed on the 1.1 branch, 1.1.2, or better yet 1.1.3 which will be out very shortly. The incorrect default is fixed in svn for 1.0.10+, but missed the 1.0.10 release.

The -user option should be okay in 1.0.9, except for an invalid default.

-- GeorgeClark - 15 Apr 2011

Maybe I didn't step into the procedure far enough. I was still seeing AdminGroup at line 132 of LdapUserMapping.pm, where it calls getWikiNameOfLogin, even with specifying -user.

I'll admit, I was looking for a quick fix so that I didn't have to double upgrade to 1.1.2 and then 1.1.3. I patched CLI.pm as discussed in http://foswiki.org/Tasks/Item6011 in the meantime.

Thanks for looking into it!

-- DougClaar - 15 Apr 2011

QuestionForm edit

Subject Using an extension
Extension MailerContrib
Version Foswiki 1.0.9
Status Answered
Topic revision: r4 - 15 Apr 2011, DougClaar
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy