Extension:EmailToWiki

NOTE: This extension is still under development and not ready for use yet.

NOTE: EmailToWiki depends on the Simple Forms extension to prepend/append/replace wiki article content via request variables, so you'll need to install that first.

Installation
Download the following source files, and save them into a directory called EmailToWiki in your wiki's extensions directory. Include the PHP script from your LocalSettings.php file like usual:
 * EmailToWiki.php
 * EmailToWiki.pl

The EmailToWiki extension is not a MediaWiki extension in the usual sense because it's written in Perl not PHP. When it is executed it checks the specified POP box, and scans the messages for any messages requiring article adjustments. It only checks once then exists, so it must be executed periodically from your system scheduler.

If using a Windows server you can get Perl from www.activeperl.org and add the execution to you system scheduler from control panel. On Linux you'll already have Perl and you can add the script to your crontab with a line similar to the following which calls the script once every 5 minutes. */5 * * * * /var/www/wiki/extensions/EmailToWiki/EmailToWiki.pl myConfigFile

Configuration
The configuration files must reside in the same directory as the other two scripts. There can be any number of them to cater for having many wikis on the same server needing to be emailed. Each has its own config file and cron entry. The convension I use for the naming is to use the wiki name followed by .conf for configuration file and .log for the log file.

The EmailToWiki.pl script takes a single parameter which is the name of a configuration file which must reside in the same directory as the script. The configuration file sets some global variables to specify configuration, the different variables are as follows: