我安装了Redmine 2.6.1-stable,它使用apache2和passenger工作。 我试图通过这两个rakes使用imap接收电子邮件:
这一个:
rake -f /opt/redmine-2.6.1/Rakefile --silent redmine:email:receive_imap RAILS_ENV="production" host=smtp.yandex.ru port=465 username=mail@yandex.ru password=pwd ssl=true project=desk folder=INBOX move_on_success=processed move_on_failure=failed no_permission_check=1 unknown_user=accept
这一个:
bundle exec rake redmine:email:receive_imap host='smtp.yandex.ru' username='mail@yandex.ru' password='pwd' port=465 ssl=true starttls=true allow_override=type,project project=desk
这是日志:
** Invoke redmine:email:receive_imap (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:email:receive_imap
rake aborted!
EOFError: end of file reached
/home/admin/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/imap.rb:1150:in `get_tagged_response'
/home/admin/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/imap.rb:1210:in `block in send_command'
/home/admin/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/home/admin/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/imap.rb:1192:in `send_command'
/home/admin/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/net/imap.rb:435:in `login'
/opt/redmine-2.6.1/lib/redmine/imap.rb:30:in `check'
/opt/redmine-2.6.1/lib/tasks/email.rake:128:in `block (4 levels) in <top (required)>'
/opt/redmine-2.6.1/app/models/mailer.rb:367:in `with_synched_deliveries'
/opt/redmine-2.6.1/lib/tasks/email.rake:127:in `block (3 levels) in <top (required)>'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/gems/rake-10.5.0/lib/rake/task.rb:240:in `call'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/gems/rake-10.5.0/lib/rake/task.rb:240:in `block in execute'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/gems/rake-10.5.0/lib/rake/task.rb:235:in `each'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/gems/rake-10.5.0/lib/rake/task.rb:235:in `execute'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/gems/rake-10.5.0/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
/home/admin/.rvm/rubies/ruby-2.1.5/lib/ruby/2.1.0/monitor.rb:211:in `mon_synchronize'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/gems/rake-10.5.0/lib/rake/task.rb:172:in `invoke_with_call_chain'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/gems/rake-10.5.0/lib/rake/task.rb:165:in `invoke'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/gems/rake-10.5.0/lib/rake/application.rb:150:in `invoke_task'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/gems/rake-10.5.0/lib/rake/application.rb:106:in `block (2 levels) in top_level'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/gems/rake-10.5.0/lib/rake/application.rb:106:in `each'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/gems/rake-10.5.0/lib/rake/application.rb:106:in `block in top_level'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/gems/rake-10.5.0/lib/rake/application.rb:115:in `run_with_threads'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/gems/rake-10.5.0/lib/rake/application.rb:100:in `top_level'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/gems/rake-10.5.0/lib/rake/application.rb:78:in `block in run'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/gems/rake-10.5.0/lib/rake/application.rb:176:in `standard_exception_handling'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/gems/rake-10.5.0/lib/rake/application.rb:75:in `run'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/gems/rake-10.5.0/bin/rake:33:in `<top (required)>'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/bin/rake:23:in `load'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/bin/rake:23:in `<main>'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/bin/ruby_executable_hooks:15:in `eval'
/home/admin/.rvm/gems/ruby-2.1.5@rails3/bin/ruby_executable_hooks:15:in `<main>'
Tasks: TOP => redmine:email:receive_imap
我无法理解发生了什么..为什么它无法正常工作?
此操作的日志/opt/redmine-2.6.1/logs/production.log
为空。
答案 0 :(得分:2)
我最近解决了我在IMAP上启用调试的类似问题,所以我可以看到发生了什么。要做到这一点;
vim /var/www/redmine/lib/redmine/imap.rb
并在要求&net; / netp&#39;之后添加以下行:
Net::IMAP.debug = true
它通常与登录凭证/方法有关。
答案 1 :(得分:1)
您正尝试从SMTP服务器接收IMAP电子邮件。这些是完全不同的协议。
可能你想要服务器imap.yandex.ru,端口993,SSL(不是starttls)。
处可用