Open link in a new tab

Content

Expand project menu

Can I configure multiple receiving email addresses?

Is it possible to configure multiple receiving email accounts? For example, project1@example.com, project2@example.com…

Message actions

Yo or Nes ;-)
Officially no you can’t.
But I solved this for our setup with a kind of ugly hack:

Since we have openproject running as a container on Openshift, I’m not familiar with a ‘normal’ setup… but you could try this:

In the repo you find a folder called ‘docker’ and inside there is a bash script called ‘cron’ , I suppose this is for fetching mails from the one (and only) mail config you can enter in your openproject settings.

This script uses variables like ${IMAP_USERNAME} and ${IMAP_PASSWORD} etc.

Now you could create more of those variables like IMAP_USERNAME_2 and IMAP_PASSWORD_2 etc
and finally clone the line including the rake task:

bundle exec rake redmine:email:receive_imap \ host="${IMAP_HOST}" \ username="${IMAP_USERNAME}" \ password="${IMAP_PASSWORD}" \ ssl=${IMAP_SSL} \ port=${IMAP_PORT} \ allow_override="${IMAP_ALLOW_OVERRIDE}"
and then replace each occurance of IMAP_USERNAME by IMAP_USERNAME_2 and so on and so on.:
bundle exec rake redmine:email:receive_imap \ host="${IMAP_HOST}" \ username="${IMAP_USERNAME_2}" \ password="${IMAP_PASSWORD_2}" \ ssl=${IMAP_SSL} \ port=${IMAP_PORT} \ allow_override="${IMAP_ALLOW_OVERRIDE}"

In each loop, your rake task should then fetch mails from all of your mail accounts that you added this way :-)