1 This module is an add-on to the TWiki kernel that supports e-mail notification of changes.
5 <li><a href="#Summary of Contents"> Summary of Contents</a><ul>
6 <li><a href="#tools/mailnotify"> <code>tools/mailnotify</code></a></li>
7 <li><a href="#TWiki/Contrib/_MailerContrib cod"> <code>TWiki/Contrib/MailerContrib</code> code library</a></li>
10 <li><a href="#Installation Instructions"> Installation Instructions</a></li>
11 <li><a href="#Setting up your cron job"> Setting up your cron job</a></li>
12 <li><a href="#Settings"> Settings</a></li>
13 <li><a href="#Contrib Info"> Contrib Info</a></li>
17 # <a name="Summary of Contents"></a> Summary of Contents
19 ## <a name="tools/mailnotify"></a> `tools/mailnotify`
21 The main part of the mailer module is a script, `tools/mailnotify`. This script is designed to be run from 'cron' (or an equivalent offline job scheduler), and processes the contents of the standard WebNotify topic. As well as providing the usual notification service, it also provides per-topic notification services. The script may be run from the command line or a cron job.
23 Subscribers are listed in WebNotify following one of these bullet list formats:
25 _three spaces_ \* [ _webname_ . ] _wikiName_ - _SMTP mail address_<br />_three spaces_ \* [ _webName_ . ] _wikiName_<br />_three spaces_ \* _SMTP mail address_<br />_three spaces_ \* _SMTP mail address_ : _topics_<br />_three spaces_ \* [ _webname_ . ] _wikiName_ : _topics_
27 where _topics_ is a space-separated list of topic names.
29 - Specify topics without a _Web._ prefix
30 - Topics must exist in this web.
31 - Topics may be specified using \* wildcards
32 - Each topic may optionally be followed by an integer in parentheses, indicating the depth of the tree of children below that topic. Changes in all these children will be detected and reported along with changes to the topic itself. _Note_ This uses the TWiki "Topic parent" feature.
33 - Each topic may optionally be preceded by a '+' or '-' sign. The '+' sign means "subscribe to this topic" (the same as not putting anything). The '-' sign means "don't send notifications regarding this topic". This allows users to elect to filter out changes to certain topics (and their children, to an arbitrary depth). Topic filters ('-') take precedence over topic includes ('+').
38 * daisy@flowers.com: Web*
39 * DaisyCutter: Petal* (1) WeedKillers (3) Red*Phlox
40 * StarTrekFan: * - *Wars - *sInTheirEyes - *shipTroopers
42 A user may be listed many times in the WebNotify topic. Where a user has several lines in WebNotify that all match the same topic, they will only be notified of changes to that topic _once_.
44 If a _TWiki group_ is listed for notification, the group will be recursively expanded to the e-mail addresses of all members.
46 **_%T% Tip:_** List names in alphabetical order to make it easier to find the names.
48 In the future it is intended that individual users will be able to control the frequency with which they are notified of topic changes, by changing a schedule specification in their home topic. However at present, the notification schedule is controlled by the frequency of activation of the `cron` job that runs the `mailnotify` script.
50 %RED% **_Note_** `mailnotify` ignores permissions in webs. It is entirely possible for a user to get added to a WebNotify topic in a web, when they are not authorised to view the topics in that web. This could result in them having limited access to sensitive information (the topic summaries). %ENDCOLOR%
52 ## <a name="TWiki/Contrib/_MailerContrib cod"></a> `TWiki/Contrib/MailerContrib` code library
54 The second part of the module is a code library that provides the services for other applications to modify WebNotify through a clean, well documented interface. This allows (for example) plugin developers to add a "Register me for notification" button to their pages. The main interface is the `WebNotify` package described below.
56 # <a name="Installation Instructions"></a> Installation Instructions
58 This Contrib is pre-installed as part of the TWiki release package, and should only have to be re-installed if an upgrade is required.
60 - Download the ZIP file from the Plugin web (see below)
61 - Unzip <code>**%TOPIC%.zip**</code> in your twiki installation directory.
62 - Run the installer script `MailContrib_intaller.pl` or alternatively resolve all dependencies manually.
63 - To make sure the installation was successful, run the `mailnotify` script from the command line, with no parameters. In this case it will print out what it would have done to STDOUT.
65 # <a name="Setting up your cron job"></a> Setting up your cron job
67 You need to set up a `cron` (or equivalent) job to run `mailnotify`.
69 <code>Usage: perl -I tools/mailnotify [-q] [ _web1 web2 ... webN_ ]</code> is the path to the TWiki bin directory, so that the script can find the rest of TWiki.
71 <table border="1" cellpadding="0" cellspacing="0">
73 <td><code>-q</code></td>
74 <td> Don't print progress information </td>
77 <td><code><i>web1 web2 ... webN</i></code></td>
78 <td> List of webs to process, separated by spaces or commas. Default is to process all legal TWiki webs. Wildcards (*) are supported. </td>
82 For example, `perl -I /usr/local/twiki/bin mailnotify -q Public Private` will generate notifications for the Public and Private webs.
84 # <a name="Settings"></a> Settings
86 - Name of the perl package
87 - Set STUB = TWiki::Contrib::Mailer
89 # <a name="Contrib Info"></a> Contrib Info
91 <table border="1" cellpadding="0" cellspacing="0">
93 <td align="right"> Author: </td>
94 <td> TWiki:Main/CrawfordCurrie (<a href="http://c-dot.co.uk" target="_top">http://c-dot.co.uk</a>) </td>
97 <td align="right"> Copyright ©: </td>
98 <td> 2004, Wind River Systems </td>
101 <td align="right"> License: </td>
105 <td align="right"> Change History: </td>
109 <td align="right"> 4 March 2005 </td>
110 <td> 1.010 Dakar release ready. </td>
113 <td align="right"> 12 Oct 2004 </td>
114 <td> 1.004 Added support for anti-subscriptions. Doc fixes from TWiki:Main.PeterThoeny. Bug fixes to permissions code. Back-off and retry if the mailer can't be reached (should really be in Net::sendEmail) </td>
117 <td align="right"> 6 Oct 2004 </td>
118 <td> 1.003 Excluded _ webs from processing, added <code>bin/remove_obsolete_locks</code> for full reverse-compatibility </td>
121 <td align="right"> 1 Oct 2004 </td>
122 <td> 1.002 PeterThoeny provided additional documentation </td>
125 <td align="right"> 27 Sep 2004 </td>
126 <td> 1.001 runnable as CGI script, minor bugfixes, removed dependency on DBCacheContrib </td>
129 <td align="right"> 8 Sep 2004 </td>
130 <td> 1.000 Initial version </td>
133 <td align="right"> Home: </td>
134 <td> TWiki:Plugins/%TOPIC% </td>
137 <td align="right"> Feedback: </td>
138 <td> TWiki:Plugins/%TOPIC%Dev </td>
142 **_Related Topics:_** [[TWikiPreferences]]
144 -- TWiki:Main/CrawfordCurrie