[Moin-user] Quick email -> wiki gateway script
ry4an at ry4an.org
Thu May 8 12:00:52 EDT 2003
I wrote a quick little gateway script that takes emails and
automatically creates/appends to the specified wiki page. When the
script receives an email (on standard input) with a To: or Cc: line
containing an email address of the format:
wiki-PageName at anyhost.com
The Subject:, Date:, From:, and body info are appended to PageName. It
optionally supports using cookies to login to the wiki.
Many MTAs support the ability to allow arbitrary information after the
user portion of an email address. In qmail any user with a
.qmail-default file in their home directory will receive any email of
the format theirusername-xxxxx at host.com. In postfix one need simply set
the recipient_delimiter to '-' in the config file to enable this
feature. In both cases one must create a system user named 'wiki'.
I invoke it using a procmail recipe (in ~wiki/.procmailrc) like this:
I'm sure what the script does could've been done more elegantly using
the XML-RPC interface or the ?action=raw retrieval method, but this
seems to work pretty well and only took an hour to write.
Ry4an Brase - http://ry4an.org /~\
'If you're not a rebel when you're 20 you've got no heart; if \ /
you're not establishment when you're 30 you've got no brain.' X
Join the ASCII ribbon campaign against HTML email / \
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2593 bytes
Desc: not available
More information about the Moin-user