Email archive for storing emails in Trac
This plugin allows you to browse and view archived emails and email attachments. It adds a new item Mail Archive to the main menu:
- Import emails to Trac's database from an IMAP account.
- Search emails with Trac Search.
- Link to emails or attachments with mailarchive: wiki links, or mail:, email:, and emailarchive: synonyms.
- List relevant emails in wiki pages with the [[MailQuery(searchterm)]] macro.
- New Trac permission MAIL_ARCHIVE_VIEW.
- New Trac admin command trac-admin mailarchive fetch.
For example, you can schedule a task to call the following command every 15 minutes:
$ trac-admin path/to/trac/environment mailarchive fetch imap.example.com email@example.com password123
Make sure that the emails to be archived are marked as unread or from today, as only such emails will be archived.
- A reset of uids on the IMAP server could lead to problems, eg duplicate / unarchived emails (#11535).
If you have any issues, create a new ticket.
0 / 1
Download the zipped source from here.
Installation of the plugin requires the usual step:
- Trac 1.2: easy_install https://trac-hacks.org/svn/mailarchiveplugin/trunk
- Trac 1.0: easy_install https://trac-hacks.org/svn/mailarchiveplugin/tags/mailarchive-1.0.
Then enable the plugin in Trac's plugin admin page or in your trac.ini file:
[components] mailarchive.* = enabled
A database upgrade will be required as usual:
$ trac-admin path/to/trac/environment upgrade
Assign the new MAIL_ARCHIVE_VIEW permission to the appropriate Trac groups / users, eg in Trac's permission admin page.
Additionally you need an email IMAP account that only contains all the emails you want to archive. If you don't already have this, you could create a new separate email account (e.g. firstname.lastname@example.org) and copy all emails you want to appear in Trac's mail archive to that account.
Actually archiving the emails from that IMAP account into Trac's database must be done separately using a new trac-admin mailarchive fetch <host> <username> <password> command. You should configure it to be periodically called, for example by using a cron job in Unix or using a scheduled task in Windows. Replace <host>, <username> and <password> with your email host, username and password.
- 16138 by lucid on 2016-12-21 22:19:56
MailArchivePlugin: Bump version to 1.1
- 16134 by rjollos on 2016-12-21 20:58:34
MailArchivePlugin: tag version 1.0
Version 1.0 is compatible with Trac 1.0.
- 16103 by lucid on 2016-12-18 16:31:41
MailArchivePlugin: Trac 1.3 compatible IEnvironmentSetupParticipant.
Since trac:ticket:11605 the db parameters are not needed anymore.
Since trac:ticket:11901 they are not allowed anymore.
Since trac:ticket:8172 we can use helpers to simplify this a lot.