I'm trying to run the
redmine:email:receive_imap rake task, to receive emails over IMAP based on instructions: RedmineReceivingEmails
Does the rake command exit after checking the inbox? Or am I wrong to be expecting that? What's normal behaviour for this rake task? I'm trying to run the rake command separately to test it out prior to putting it in my crontab. Should work no? It seems to freeze up and do nothing though. The full command I'm trying is:
rake --rakefile /var/lib/redmine/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=sage.dataflame.com port=993 email@example.com password=MyPassword unknown_user=accept no-permission-check=1
That sits and does nothing.
Where should I expect this to be putting useful log output? I'm seeing nothing written to
/var/log/apache2/error.log I tried putting
config.log_level = :debug in
config/additional_environment.rb but ...nothing.
I'd settle for some hints on those basic questions, if anyone can help me out quickly.
...but then I've got to figure out what's actually going wrong with IMAP. I've tried testing out connecting with a different command
openssl s_client -connect sage.dataflame.com:993 following this guide: http://www.anta.net/misc/telnet-troubleshooting/imap.shtml ...and it seems to connect ok with that (vagrant port-fowarding turned out not to be required)
It's an Ubuntu 14 vagrant box.
Redmine version 3.1.2.stable.14882
Ruby version 2.2.3-p173 (2015-08-18) [i686-linux]
Rails version 4.2.4
Database adapter PostgreSQL
RE: rake redmine:email:receive_imap - Added by Harry Wood over 6 years ago
My colleague spotted another option 'ssl=true' which fixed the "freezing up" issue. Although actually I should correct myself. I wasn't being patient enough. It doesn't freeze up completely. After quite a long timeout (2 mins?) it dies with this error:
Net::IMAP::Error: connection closed
ssl=true it now completes execution.
I still don't know where it logs to. For a while I was bashing my head on that wall of silence, but then fixed various permissions settings to get it working. Full command I'm using:
rake redmine:email:receive_imap RAILS_ENV="production" host=sage.dataflame.com port=993 firstname.lastname@example.org password=MyPassword unknown_user=accept project=helpdesk unknown_user=accept no_permission_check=1 ssl=true
But I also needed to go to settings -> Roles & Permissions -> 'anonymous' tick to allow 'Add issues'. And also under settings -> projects select the project I had created for this (I called it 'helpdesk') then 'members' tab and made 'anonymous users' part of that project.
After that I managed to see an email coming in. Hurrah! All solved, although it would be nice to know where one should look in the logs to diagnose issues with reading emails over IMAP