virtualMachineredmine

Convert incoming email to issues

NOTE: We are in the process of modifying the file structure and configuration for many Bitnami stacks. On account of these changes, the file paths stated in this guide may change depending on whether your Bitnami stack uses native Linux system packages (Approach A), or if it is a self-contained installation (Approach B). To identify your Bitnami installation type and what approach to follow, run the command below:

 $ test ! -f "/opt/bitnami/common/bin/openssl" && echo "Approach A: Using system packages." || echo "Approach B: Self-contained installation."

The output of the command indicates which approach (A or B) is used by the installation, and will allow you to identify the paths, configuration and commands to use in this guide. Refer to the FAQ for more information on these changes.

Approach A: Bitnami installations using system packages

Redmine can be configured to automatically process incoming email messages and convert them to issues. To do this, it is necessary to configure Redmine to connect to an IMAP or POP3 account periodically, check incoming messages and convert those containing Redmine keywords into issues.

To do this, create a scheduled task and use the following command in the crontab file for a POP3 account, remembering to replace HOST, PORT, USERNAME and PASSWORD with the correct information for your mail provider:

*/30 * * * * sudo bundle exec rake -f /opt/bitnami/redmine/Rakefile redmine:email:receive_pop3 RAILS_ENV="production" host=HOST port=PORT ssl=1 username=USERNAME password=PASSWORD allow_override=project,tracker,priority

Use the following command in the crontab file for an IMAP account, remembering to replace HOST, PORT, USERNAME and PASSWORD with the correct informaton for your mail provider:

*/30 * * * * sudo bundle exec rake -f /opt/bitnami/redmine/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=HOST port=PORT ssl=1 username=USERNAME password=PASSWORD allow_override=project,tracker,priority

NOTE: Remove the ssl option from the previous commands if your mail provider does not support SSL.

The above commands will process incoming email every 30 minutes.

To allow users not registered in Redmine to create issues via email, update the command above to add the unknown_user and no_permission_check options. For example:

*/30 * * * * sudo bundle exec rake -f /opt/bitnami/redmine/Rakefile redmine:email:receive_pop3 RAILS_ENV="production" host=HOST port=PORT ssl=1 username=USERNAME password=PASSWORD allow_override=project,tracker,priority unknown_user=accept no_permission_check=1

To automatically have new issues registered with a specific project and priority, remove the allow_override option and instead specify project and priority options. For example:

*/30 * * * * sudo bundle exec rake -f /opt/bitnami/redmine/Rakefile redmine:email:receive_pop3 RAILS_ENV="production" host=HOST port=PORT ssl=1 username=USERNAME password=PASSWORD project=myproject priority=immediate

For more information on available options, refer to the Redmine documentation.

Approach B: Self-contained Bitnami installations

Redmine can be configured to automatically process incoming email messages and convert them to issues. To do this, it is necessary to configure Redmine to connect to an IMAP or POP3 account periodically, check incoming messages and convert those containing Redmine keywords into issues.

To do this, create a scheduled task and use the following command in the crontab file for a POP3 account, remembering to replace HOST, PORT, USERNAME and PASSWORD with the correct information for your mail provider:

*/30 * * * * sudo bundle exec rake -f /opt/bitnami/apps/redmine/htdocs/Rakefile redmine:email:receive_pop3 RAILS_ENV="production" host=HOST port=PORT ssl=1 username=USERNAME password=PASSWORD allow_override=project,tracker,priority

Use the following command in the crontab file for an IMAP account, remembering to replace HOST, PORT, USERNAME and PASSWORD with the correct informaton for your mail provider:

*/30 * * * * sudo bundle exec rake -f /opt/bitnami/apps/redmine/htdocs/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=HOST port=PORT ssl=1 username=USERNAME password=PASSWORD allow_override=project,tracker,priority

NOTE: Remove the ssl option from the previous commands if your mail provider does not support SSL.

The above commands will process incoming email every 30 minutes.

To allow users not registered in Redmine to create issues via email, update the command above to add the unknown_user and no_permission_check options. For example:

*/30 * * * * sudo bundle exec rake -f /opt/bitnami/apps/redmine/htdocs/Rakefile redmine:email:receive_pop3 RAILS_ENV="production" host=HOST port=PORT ssl=1 username=USERNAME password=PASSWORD allow_override=project,tracker,priority unknown_user=accept no_permission_check=1

To automatically have new issues registered with a specific project and priority, remove the allow_override option and instead specify project and priority options. For example:

*/30 * * * * sudo bundle exec rake -f /opt/bitnami/apps/redmine/htdocs/Rakefile redmine:email:receive_pop3 RAILS_ENV="production" host=HOST port=PORT ssl=1 username=USERNAME password=PASSWORD project=myproject priority=immediate

For more information on available options, refer to the Redmine documentation.

Last modification July 15, 2021