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:
openssl
s_client -connect HOST:PORT
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
.
Update the ruby gems by changing into the redmine's directory and run the following command.
bundle install
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
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.
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
.
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
Remove the plugin from the plugins folder: #{RAILS_ROOT}/plugins
Restart Redmine.
Open Administration > Fetch emails
to access the plugin configuration:
Email Configuration Attributes:
fetch_all_emails
should synchronize this email account fetch_all_emails
should ignore this email accountEmail Attributes:
127.0.0.1
).993
.True
) [Options: True
, False
]it@domain.com
).REDMINE
).INBOX
folder is allowed
(in fact you can't change this option)ARCHIVE
).IGNORED
).false
).false
- default behaviour is to leave them on the server).Unknown Sender Actions (in Redmine):
owner-email
, where
the sender email address will be stored. Without this field activated, the email fetch will fail,
since this information is required to send information back to the sender
(the Redmine Helpdesk plugin may be a nice addition).False
).True
).group1,group2
).Default Issue creation (in Redmine) Attributes:
project,tracker,category,priority
).For more information on these option visit Redmine official wiki RedmineReceivingEmails page.
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:
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:
Rubocop doesn't detect offenses:
cd plugins/redmine_email_fetcher
rubocop --auto-correct
Tests are passing (tests need Redmine):
RAILS_ENV=test rake db:drop db:create db:migrate
RAILS_ENV=test rake redmine:plugins:migrate
RAILS_ENV=test rake redmine:load_default_data
RAILS_ENV=test rake test TEST=plugins/redmine_email_fetcher/test/<path_to_test>
e.g.:
RAILS_ENV=test rake test TEST=plugins/redmine_email_fetcher/test/models/email_configuration_test.rb
RAILS_ENV=test bundle exec ruby -I test plugins/redmine_email_fetcher/test/models/email_configuration_test.rb
This plugin is released under the GPL v3 license.
See LICENSE for more information.