<?xml version="1.0" encoding="UTF-8"?>
<issue>
  <id>3554</id>
  <project name="Redmine" id="1"/>
  <tracker name="Defect" id="1"/>
  <status name="Closed" id="5"/>
  <priority name="Normal" id="4"/>
  <author name="Marcel Evenson" id="6156"/>
  <subject>The IMAP method for anonymous issue creation doesn't work from revision Revision 2789</subject>
  <description>The Anonymous user email mapping from Revision 2789 doesn't work. I'm trying to use the IMAP method to create an issue from email.

Here is the command I'm using:
rake redmine:email:receive_imap RAILS_ENV="production" host=mail.mydomain.com username=support@mydomain.com password=mypassword project=support unknown_user=accept

Note: After I run the command the test email in the INBOX is marked as "seen" (so I know its connecting and reading the mailbox properly) but no issue is created. I've double checked the permissions and the anonymous user has "add issues" permission. There are no errors in the error log.

Here is my environment:
About your application's environment
Ruby version              1.8.5 (i386-linux)
RubyGems version          1.3.1
Rails version             2.2.2
Active Record version     2.2.2
Action Pack version       2.2.2
Active Resource version   2.2.2
Action Mailer version     2.2.2
Active Support version    2.2.2
Application root          /var/www/vhosts/mydomain.com/httpdocs/redmine
Environment               production
Database adapter          mysql
Database schema version   20090614091200</description>
  <start_date>2009-06-28</start_date>
  <due_date></due_date>
  <done_ratio>0</done_ratio>
  <estimated_hours></estimated_hours>
  <custom_fields>
    <custom_field name="Affected version" id="1"></custom_field>
    <custom_field name="Resolution" id="2">Invalid</custom_field>
  </custom_fields>
  <created_on>Sun Jun 28 17:06:05 +0200 2009</created_on>
  <updated_on>Wed Nov 18 21:40:28 +0100 2009</updated_on>
  <journals>
    <journal id="9996">
      <user name="Marcel Evenson" id="6156"/>
      <notes>It looks like custom fields can not be required and the project needs to be "public" or anonymous email creation will fail.</notes>
      <details>
      </details>
    </journal>
    <journal id="10011">
      <user name="Jean-Philippe Lang" id="1"/>
      <notes>Indeed. These rules also apply to ticket creation via email.</notes>
      <details>
        <detail old="1" name="status_id" property="attr" new="5"/>
        <detail old="" name="2" property="cf" new="Invalid"/>
      </details>
    </journal>
    <journal id="12169">
      <user name="Jaroslav K." id="9502"/>
      <notes>Hello,
I updated Redmine to latest stable version (0.8.7) but Redmine still not accepts emails from unknown users.
Project for sure is "public" and there are no custom fields assigned to the "support_1" project (and at all custom fields are no required in Redmine).

The command is as follows:
rake -f /apps/redmine-0.8.7/Rakefile redmine:email:receive_imap unknown_user=accept RAILS_ENV="production" host=mail.myhost.com port=143 folder=Inbox project=support_1 username=mymailusername password=mymailpassword

In mailbox I see the mails are marked as read after script execution.

What I'm doing wrong? How can I debug that?

My environment (don't know how to get rails version):
Redmine 0.8.7 stable (mySQL)
ruby 1.8.6 (2007-09-24 patchlevel 111) [i486-linux]
gem 1.3.5

Thank you very much for help.</notes>
      <details>
        <detail old="5" name="status_id" property="attr" new="8"/>
      </details>
    </journal>
    <journal id="12170">
      <user name="Jaroslav K." id="9502"/>
      <notes>Just to be sure, updated rails to version 2.3.4

Thank you.</notes>
      <details>
      </details>
    </journal>
    <journal id="12183">
      <user name="Jean-Philippe Lang" id="1"/>
      <notes>Jaroslav, this feature is not available in the 0.8 stable branch.
It's currently in trunk and will be part of 0.9.</notes>
      <details>
        <detail old="8" name="status_id" property="attr" new="5"/>
      </details>
    </journal>
  </journals>
</issue>
