| 1 | [[PageOutline(2-5,Contents,pullout)]] |
| 2 | |
| 3 | = Email archive for storing emails in Trac |
| 4 | |
| 5 | == Description |
| 6 | |
| 7 | This plugin adds a new main menu item ''Mail Archive'' that can be used to browse and view archived emails and email attachments. |
| 8 | |
| 9 | Features: |
| 10 | * Import emails to Trac's database from an IMAP account |
| 11 | * A new `mailarchive` resource realm |
| 12 | * `mailarchive:` wiki links (plus `mail:`, `email:`, and `emailarchive:` synonyms) |
| 13 | * `[[MailQuery(searchterm)]]` macro |
| 14 | * New `trac-admin mailarchive fetch` command |
| 15 | * New Trac permission `MAIL_ARCHIVE_VIEW` |
| 16 | * Trac Search integration |
| 17 | |
| 18 | |
| 19 | == !Bugs/Feature Requests |
| 20 | |
| 21 | Existing bugs and feature requests for MailArchivePlugin are |
| 22 | [report:9?COMPONENT=MailArchivePlugin here]. |
| 23 | |
| 24 | If you have any issues, create a |
| 25 | [http://trac-hacks.org/newticket?component=MailArchivePlugin&owner=lucid new ticket]. |
| 26 | |
| 27 | == Download |
| 28 | |
| 29 | Download the zipped source from [export:mailarchiveplugin here]. |
| 30 | |
| 31 | == Source |
| 32 | |
| 33 | You can check out MailArchivePlugin from [http://trac-hacks.org/svn/mailarchiveplugin here] using Subversion, or [source:mailarchiveplugin browse the source] with Trac. |
| 34 | |
| 35 | == Installation |
| 36 | |
| 37 | Installation of the plugin requires the usual step, e.g. `easy_install https://trac-hacks.org/svn/mailarchive/trunk` and enable it in Trac's plugin admin page or by adding `mailarchive = enabled` to the `[components]` section in trac.ini. |
| 38 | |
| 39 | A database upgrade will be required as usual (`trac-admin path-to-your-trac-environment upgrade`). |
| 40 | |
| 41 | Assign the new `MAIL_ARCHIVE_VIEW` permission to the appropriate Trac groups / users (e.g. in Trac's permission admin page). |
| 42 | |
| 43 | 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. `trac-archive@example.com`) and copy all emails you want to appear in Trac's mail archive to that account. |
| 44 | |
| 45 | 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 (e.g. using a cron job in Unix, or using a scheduled task in Windows) it to be periodically called. Replace `<host>`, `<username>` and `<password>` with your email host, username and password. |
| 46 | |
| 47 | Example: Schedule a task to call the following command every 15 minutes: `trac-admin path-to-your-trac-environment mailarchive fetch imap.example.com trac-archive@example.com password123` |
| 48 | |
| 49 | Make sure that the emails to be archived are marked as unseen / unread (or very recent, i.e. from today) as only such mails will be considered for archiving. |
| 50 | |
| 51 | |
| 52 | == Recent Changes |
| 53 | |
| 54 | [[ChangeLog(mailarchiveplugin, 3)]] |
| 55 | |
| 56 | == !Author/Contributors |
| 57 | |
| 58 | '''Author:''' [wiki:lucid] [[BR]] |
| 59 | '''Maintainer:''' [[Maintainer]] [[BR]] |
| 60 | '''Contributors:''' |