Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps | Demo | Docs | Install
  1. Cloudron Forum
  2. OpenProject
  3. Incoming Email functionality

Incoming Email functionality

Scheduled Pinned Locked Moved OpenProject
6 Posts 3 Posters 896 Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • hpz24H Offline
    hpz24H Offline
    hpz24
    wrote on last edited by
    #1

    Hi, I played a little bit around with email notification and also the possibility to e.g. create new work packages via email.

    Is this functionality still implemented (like outgoing mails) or has it to be configured via the ENV parameters?

    https://www.openproject.org/docs/installation-and-operations/configuration/incoming-emails/

    Thx!

    girishG 1 Reply Last reply
    1
    • hpz24H hpz24

      Hi, I played a little bit around with email notification and also the possibility to e.g. create new work packages via email.

      Is this functionality still implemented (like outgoing mails) or has it to be configured via the ENV parameters?

      https://www.openproject.org/docs/installation-and-operations/configuration/incoming-emails/

      Thx!

      girishG Offline
      girishG Offline
      girish
      Staff
      wrote on last edited by
      #2

      @hpz24 incoming email is not automated. This is because inboxes cannot be created for domains which Cloudron does not handle. Or if you decide to move Cloudron Email, the setup in the apps is left dangling.

      You have to create a mailbox where your domain hosts email. Then, put openproject run bundle exec rake redmine:email:receive_imap host='imap.gmail.com' username='test_user' password='password' port=993 ssl=true ssl_verification=true allow_override=type,project project=test_project in the cronjob as suggested by your doc link. You can put the cron job in the app's cron section - https://docs.cloudron.io/apps/#cron

      One thing is that I suggest you run the above command in the Web Terminal manually and check that it works before you put it in the cron. Will make debugging simpler. I haven't tested but looking at our code, it seems we run the rake tasks like this:

      cd /app/code
      
      export HOME=/run
      export TMPDIR=/run/openproject/tmp
      
      echo "=> Run cron job"
      RAILS_ENV="production" /usr/local/bin/gosu www-data:www-data  ./bin/rake jobs:workoff
      

      You can put above in say /app/data/incoming_email.sh, make it executable and make cron run that script.

      1 Reply Last reply
      1
      • girishG Offline
        girishG Offline
        girish
        Staff
        wrote on last edited by
        #3

        We used to have this feature enabled in our gitlab instance in the past but it proved to be dangerous since it consumes every email including spam. Just a heads up 🙂

        1 Reply Last reply
        1
        • hpz24H Offline
          hpz24H Offline
          hpz24
          wrote on last edited by
          #4

          Thank you very much, i will give it a try! 🙂

          1 Reply Last reply
          1
          • U umnz referenced this topic on
          • C Offline
            C Offline
            charlesnw
            wrote on last edited by
            #5

            Has anyone gotten this to work?

            I am using Redmine, not OpenProject.

            If someone could provide an example shell script I can call from cron, it would be appreciated.

            How do I start the line? I tried various combinations of bundle rake/rake_exec with no success.

            1 Reply Last reply
            0
            • C Offline
              C Offline
              charlesnw
              wrote on last edited by
              #6

              I tried to drop down to the www-data user but no success.

              root@b1e03a66-bb9e-4808-aecf-68c518fed0d5:/app/code# ../data/tasks-via-email.sh 
              rake aborted!
              ArgumentError: Missing `secret_key_base` for 'production' environment, set this string with `bin/rails credentials:edit` (ArgumentError)
              
                        raise ArgumentError, "Missing `secret_key_base` for '#{Rails.env}' environment, set this string with `bin/rails credentials:edit`"
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              /run/redmine/vendor/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application/configuration.rb:519:in `secret_key_base='
              /run/redmine/vendor/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application/configuration.rb:503:in `secret_key_base'
              /run/redmine/vendor/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application.rb:470:in `secret_key_base'
              /run/redmine/vendor/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application.rb:205:in `block in message_verifiers'
              /run/redmine/vendor/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/message_verifiers.rb:132:in `build'
              /run/redmine/vendor/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/messages/rotation_coordinator.rb:85:in `block in build_with_rotations'
              /run/redmine/vendor/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/messages/rotation_coordinator.rb:85:in `map'
              /run/redmine/vendor/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/messages/rotation_coordinator.rb:85:in `build_with_rotations'
              /run/redmine/vendor/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/messages/rotation_coordinator.rb:19:in `[]'
              /run/redmine/vendor/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application.rb:232:in `message_verifier'
              /run/redmine/vendor/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/railtie.rb:355:in `block (3 levels) in <class:Railtie>'
              /run/redmine/vendor/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/lazy_load_hooks.rb:97:in `class_eval'
              /run/redmine/vendor/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/lazy_load_hooks.rb:97:in `block in execute_hook'
              /run/redmine/vendor/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/lazy_load_hooks.rb:87:in `with_execution_control'
              /run/redmine/vendor/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/lazy_load_hooks.rb:92:in `execute_hook'
              /run/redmine/vendor/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/lazy_load_hooks.rb:62:in `block in on_load'
              /run/redmine/vendor/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/lazy_load_hooks.rb:61:in `each'
              /run/redmine/vendor/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/lazy_load_hooks.rb:61:in `on_load'
              /run/redmine/vendor/ruby/3.3.0/gems/activerecord-7.2.2.1/lib/active_record/railtie.rb:354:in `block (2 levels) in <class:Railtie>'
              /run/redmine/vendor/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/lazy_load_hooks.rb:94:in `block in execute_hook'
              /run/redmine/vendor/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/lazy_load_hooks.rb:87:in `with_execution_control'
              /run/redmine/vendor/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/lazy_load_hooks.rb:92:in `execute_hook'
              /run/redmine/vendor/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/lazy_load_hooks.rb:78:in `block in run_load_hooks'
              /run/redmine/vendor/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/lazy_load_hooks.rb:77:in `each'
              /run/redmine/vendor/ruby/3.3.0/gems/activesupport-7.2.2.1/lib/active_support/lazy_load_hooks.rb:77:in `run_load_hooks'
              /run/redmine/vendor/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application/finisher.rb:94:in `block in <module:Finisher>'
              /run/redmine/vendor/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/initializable.rb:32:in `instance_exec'
              /run/redmine/vendor/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/initializable.rb:32:in `run'
              /run/redmine/vendor/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/initializable.rb:61:in `block in run_initializers'
              /run/redmine/vendor/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/initializable.rb:60:in `run_initializers'
              /run/redmine/vendor/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application.rb:435:in `initialize!'
              /app/code/config/environment.rb:16:in `<top (required)>'
              /run/redmine/vendor/ruby/3.3.0/gems/zeitwerk-2.7.2/lib/zeitwerk/core_ext/kernel.rb:34:in `require'
              /run/redmine/vendor/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application.rb:411:in `require_environment!'
              /run/redmine/vendor/ruby/3.3.0/gems/railties-7.2.2.1/lib/rails/application.rb:559:in `block in run_tasks_blocks'
              /run/redmine/vendor/ruby/3.3.0/gems/rake-13.2.1/exe/rake:27:in `<top (required)>'
              /home/cloudron/rbenv/versions/3.3.4/bin/bundle:25:in `load'
              /home/cloudron/rbenv/versions/3.3.4/bin/bundle:25:in `<main>'
              Tasks: TOP => redmine:email:receive_imap => environment
              (See full trace by running task with --trace)
              root@b1e03a66-bb9e-4808-aecf-68c518fed0d5:/app/code# 
              
              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Bookmarks
              • Search