Difference between revisions of "Talk:EmailToWiki.pl"

From Organic Design wiki
(This could be configured in a more event-driven way)
Line 20: Line 20:
 
$wgSimpleFormsSummaryQuery = 'summary';
 
$wgSimpleFormsSummaryQuery = 'summary';
 
</perl>
 
</perl>
 +
 +
== Event driven installation ==
 +
The biggest problem with this extension is the inefficient polling of the POP box which makes it unresponsive and consumes unnecessary resources on a regular basis.
 +
 +
This could be configured in a more event-driven way by integrating with the exim4 router. The ''spamassassin'' configuration in the [[Configure mail server]] procedure is an example of integrating with exim4 in this way.
 +
 +
This would allow the mails to be checked as they come in and if destined for a wiki would be routed there straight away instead of going to the usual mail directory for storage.

Revision as of 00:16, 4 January 2009

EmailToWiki.pl is called from crontab and has one parameter specifying the name of a configuration file which should reside in the same directory as the script. The config file is eval'd and should set the following variables: <perl>

  1. $IP/extensions/EmailToWiki/foo.conf

$popServer = 'mail.foo.bar'; $popUser = 'foo'; $popPassword = '***'; $maxLines = 100; $wikiTemplate = 'Email'; $senders = 'foo@bar.com'; $filter = false; $deleteSent = true; $deleteFiltered = false; $logFile = 'foo.log';

  1. Set these to the same values as the same variable in the wiki

$wgServer = 'http://www.organicdesign.co.nz'; $wgScript = '/wiki/index.php'; $wgSimpleFormsContentQuery = 'content'; $wgSimpleFormsCActionQuery = 'caction'; $wgSimpleFormsSummaryQuery = 'summary'; </perl>

Event driven installation

The biggest problem with this extension is the inefficient polling of the POP box which makes it unresponsive and consumes unnecessary resources on a regular basis.

This could be configured in a more event-driven way by integrating with the exim4 router. The spamassassin configuration in the Configure mail server procedure is an example of integrating with exim4 in this way.

This would allow the mails to be checked as they come in and if destined for a wiki would be routed there straight away instead of going to the usual mail directory for storage.