Project

General

Profile

Actions

Defect #14491

closed

MailHandler: Unable to determine target project (when allow_override=project and project=unassigned is used)

Added by Deoren Moor over 11 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Email receiving
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

We've had a problem with emails being rejected inexplicably for a long while now, but only recently did I realize that I could specify RAILS_ENV="development" to enable more detailed logging. That done, this is what the development.log file had to say:

Receiving message 14135
  ^[[1m^[[35mUser Load (0.7ms)^[[0m  SELECT `users`.* FROM `users` WHERE `users`.`type` IN ('User', 'AnonymousUser') AND (LOWER(mail) = 'jdoe@example.com') LIMIT 1
  ^[[1m^[[36mProject Load (0.2ms)^[[0m  ^[[1mSELECT `projects`.* FROM `projects` WHERE `projects`.`identifier` IS NULL LIMIT 1^[[0m
MailHandler: missing information from John Doe: Unable to determine target project

Here is the scraping script that we use:

#!/bin/bash

# Purpose:   Fetch emails and import into Redmine
# Reference: http://www.redmine.org/projects/redmine/wiki/RedmineReceivingEmails

cd /opt/redmine

sudo -u www-data bundle exec rake -f /opt/redmine/Rakefile redmine:email:receive_imap \
    RAILS_ENV="development" \
    host=mail.example.com username=support@example.com password=PASSWORD \
    move_on_success=accepted_emails move_on_failure=rejected_emails \
    project=unassigned category=unassigned tracker=support \
    no_permission_check=1 unknown_user=accept port=993 ssl=1 \
    allow_override=project,tracker,status,priority,category,assigned_to,\
    fixed_version,start_date,due_date,estimated_hours,\
    done_ratio > /dev/null 2>&1

What is odd is that I can mark the email as unread, place it back in the Inbox and let the script try again and 9/10 times it will successfully pick it on the 2nd try. I haven't been running the scraping process in development mode long enough to see what the other failures log.


Files

debug_options.patch (702 Bytes) debug_options.patch Jean-Philippe Lang, 2013-08-07 21:56

Related issues

Related to Redmine - Patch #12937: mail_handler patchClosed

Actions
Actions

Also available in: Atom PDF