Question
This is probably a user error on my part, but I can't seem to get the
MailerContrib module to work. I assumed that it came with my installation, so I just tried to run it via command as specified in the instructions:
perl -I /<path_to_wiki>/bin mailnotify -q <web_names>
This returned an error:
Can't open perl script "mailnotify": No such file or directory.
Use -S to search $PATH for it.
So I thought I needed to reinstall it. I downloaded and untarred the latest archive, then tried to run the install script, which toold me that it was already installed and asked me whether I wanted to use the existing .TGZ file that it found (which I had already unpacked; otherwise, I wouldn't have been running the installer that it contains). When I said "yes," it threw an error:
Got a local archive from /var/www/twiki/MailerContrib.tgz
Compression not available - Install IO::Zlib! at MailerContrib_installer line 625
No data could be read from file at MailerContrib_installer line 625
Could not open tar file /var/www/twiki/MailerContrib.tgz
Failed to unpack archive /var/www/twiki/MailerContrib.tgz
Archive unpacked
So I then ran the installer again, and instead I told it to use the ZIP version of the archive. This seemed to work a bit better, and the installer decompressed the archive.
But when I run the perl script again as instructed, I get the same exact error as before. Someone mentioned on Dev some months ago that the archive installs something in tools/ instead of bin/, and it looks like that is still the case.
If that's the only issue left (please verify?), I'm fine now, as I've copied the script from tools/ to bin/, but knowing this would have saved me quite a bit of time and aggravation.
Environment
--
JohnDeStefano - 20 Oct 2006
Answer
If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.
You should not need to re-install the contrib this is pre-installed.
As documented in
MailerContrib, you should run the
mailnotify in the
twiki/tools directory, as in:
% cd /var/www/twiki/tools
% perl -I /var/www/twiki/bin mailnotify -q
(Fix the path for your environmant). The MailerContrib topic has an example how to put this into a cron job.
--
PeterThoeny - 21 Oct 2006
Thanks. Maybe I'm just not understanding why one would have to CD into tools to run a script from bin, or why the syntax is called out as
perl -I <bin> mailnotify
... when the mail script is in tools, but it's not important in the grand scheme. Thank you.
--
JohnDeStefano - 23 Oct 2006
Code was stripped from my comment above... syntax example is given as:
perl -I <bin> mailnotify
--
JohnDeStefano - 23 Oct 2006
LOL stripped out again... forget it! Thanks anyway.
--
JohnDeStefano - 23 Oct 2006
FYI,
< needs to be escaped with
<, unless in a verbatim block.
--
PeterThoeny - 23 Oct 2006
But the
MailerContrib Topic, especially the section with Cron shows a different approach which doesnt work for me.
This works:
perl -I /var/www/web7/web/bin mailnotify -q (run directly from tools)
where this dont:
cd /usr/local/twiki && perl -I bin tools/mailnotify -q
On the second it cant find
MailerContrib.pm even though it should find it.
--
MarcLogemann - 21 Dec 2007
I ran into this problem as well. I think the
MailerContrib documentation example may cause issues on some systems This cryptic entry with relative path switching also caused the "Can't locate setlib.cfg in @INC..." error for me as well
So instead of:
0 0 * * * cd /usr/local/twiki && perl -I bin tools/mailnotify -q
I used full path names and it worked:
0 0 * * * cd /usr/local/twiki/tools/ && perl -I /tusr/local/twiki/bin mailnotify -q
--
GregNeugebauer - 2009-09-30