luismaia / redmine_email_fetcher

Redmine plugin that extends the Redmine Receiving emails functionality by allowing the configuration of email accounts from where emails should be periodically fetched
23 stars 25 forks source link

Redmine Email Fetcher

This redmine plugin extends the Redmine Receiving emails functionality by allowing the configuration of email accounts from where emails should be periodically fetched.

Features:

Restrictions:

Remarks:

Installation & Upgrade

  1. install. - Copy your plugin directory into #{RAILS_ROOT}/plugins. If you are downloading the plugin directly from GitHub, you can do so by changing into the #{RAILS_ROOT}/plugins directory and issuing the command:

    git clone git://github.com/luismaia/redmine_email_fetcher.git

    upgrade - Backup and replace the old plugin directory with the new plugin files. If you are downloading the plugin directly from GitHub, you can do so by changing into the plugin directory and issuing the command git pull.

  2. Update the ruby gems by changing into the redmine's directory and run the following command.

    bundle install
  3. Install the plugin by running the following command (in the redmine directory) to upgrade the database (make a db backup before) and copy current assets to public/plugin_assets/redmine_email_fetcher.

    rake redmine:plugins:migrate RAILS_ENV=production
  4. In the redmine directory #{RAILS_ROOT} run the following command.

    rake -T redmine:plugins:email_fetcher RAILS_ENV=production

    If the installation/upgrade was successful you should now see the list of Rake Tasks.

  5. Restart Redmine.

You should now be able to see Redmine Email Fetcher listed among the plugins in Administration -> Plugins. You should now be able to see Redmine Email Fetcher in the administration main area Administration -> Fetch emails.

Uninstall

  1. Change to the redmine directory #{RAILS_ROOT} and run the following command to downgrade the database (make a db backup before):

    rake redmine:plugins:migrate NAME=email_fetcher VERSION=0 RAILS_ENV=production
  2. Remove the plugin from the plugins folder: #{RAILS_ROOT}/plugins

  3. Restart Redmine.

Usage

Configuration

Open Administration > Fetch emails to access the plugin configuration:

Email Configuration Attributes:

Email Attributes:

Unknown Sender Actions (in Redmine):

Default Issue creation (in Redmine) Attributes:

For more information on these option visit Redmine official wiki RedmineReceivingEmails page.

Rake tasks

The following tasks are available:

# rake -T redmine:plugins:email_fetcher
rake redmine:plugins:email_fetcher:fetch_all_emails   # Fetch all active email accounts emails to Redmine

This task can be used for periodic synchronization. For example:

# etch all active email accounts emails to Redmine @ every 5 minutes
*/5 * * * *   www-data /usr/bin/rake -f /opt/redmine/Rakefile --silent redmine:plugins:email_fetcher:fetch_all_emails RAILS_ENV=production 2>&- 1>&-

The tasks recognize three environment variables:

Contributing

Feel free to contribute by adding more features or solving issues.

All PR are very welcome.

After make your changes and before send the PR to the project, please validate that:

License

This plugin is released under the GPL v3 license.

See LICENSE for more information.