7

I'm trying to fetch e-mails into Redmine via IMAP.

The e-mails I'm generating look like this:

FooBar Ltd 
123456
http://example.com/Foobar-Ltd-123456.html

Project: backend
Tracker: Dataerror

Beschreibung:
This is the description

===========================
CLIENT_IP: 192.168.1.215
HTTP_USER_AGENT: mozilla/asdfjköl

I try to fetch them into Redmine via this command:

rake -f /var/www/projects/redmine/Rakefile redmine:email:receive_imap \
RAILS_ENV="production" host=example.com port=993 ssl=true username=redmine \
password=1234 project=myproject tracker=other \
allow_override=project,tracker,category,priority \
move_on_success=read move_on_failure=failed

But the e-mails get moved into the failed folder.

I had this setup running some time ago with a different e-mail generator but pretty much the same template, and I can't figure out why it's not working. The permissions seem to be OK too.

In order to further debug this issue, I need some logfiles. Are there any logfiles written by this command? Or are there any other suggestions to solve this issue?

My environment:

danilo@jabba:/var/www/projects/redmine$
RAILS_ENV=production script/about
About your application's environment
Ruby version              1.8.7 (i486-linux)
RubyGems version          1.3.5
Rack version              1.0
Rails version             2.3.5
Active Record version     2.3.5
Active Resource version   2.3.5
Action Mailer version     2.3.5
Active Support version    2.3.5
Application root          /var/www/projects/redmine
Environment               production
Database adapter          mysql
Database schema version   20100819172912

3 Answers3

2

From rake redmine:email:receive_imap does not receive mails :

In the model issue.rb there is a code

validates_presence_of :subject, :description, :priority, :project, :tracker, :author, :status

which says that priority is mandatory field. So i cannot create issue without receiving the value for priority parameter.

I am not a user of rake and do not have your environment, but you could check if you have some validation rule somewhere that causes email to fail. From your example, you only have project and tracker in the email, so requiring more will cause it to fail.

harrymc
  • 498,455
2

You could also try unknown_user=accept no-permission-check=1 based on: http://www.redmine.org/projects/redmine/wiki/RedmineReceivingEmails#Enabling-unknown-users-to-create-issues-by-email

For more help, see your Redmine: lib/tasks/email.rake and lib/redmine/imap.rb

E. Sambo
  • 121
1

After quite a lot of finagling, I figured out that in my case, the problem was that my project name had a space in it. I was quoting the name (project="My Project"), but the code just silently failed. When I replaced the project name with the fixed single-token name (project="my_project"). It worked.

The most frustrating thing for me was not having sufficient diagnostic feedback.