Problem receiving emails in redmine -> 422 Unprocessable Entity [http://xxxxxx.xxx/mail_handler]

Added by Albrecht Backhaus over 3 years ago

Hello,

I am having problems receiving emails in redmine. I still ran into the following error:

Processing MailHandlerController#index (for xxx.xxx.xxx.xxx at 2009-11-12 08:03:18) [POST]
Parameters: {"unknown_user"=>"accept", "allow_override"=>"project,tracker,priority", "issue"=>{"project"=>"foo"}, "key"=>"xxxxxxxxxxxxxx", "email"=>"From: ....here email content"}
Completed in 5ms (View: 0, DB: 1) | 422 Unprocessable Entity [http://xxxx.xxxxxx.xxxxx/mail_handler]

I read up and down the forums, wiki and googled the web. Nothing really helpful to find.

Can anybody please help me to solve this issue ?

Regards

Replies (8)

RE: Problem receiving emails in redmine -> 422 Unprocessable Entity [http://xxxxxx.xxx/mail_handler] - Added by Albrecht Backhaus over 3 years ago

got help in IRC in the meantime - issue was the parameter project must be the identifier not the name.

RE: Problem receiving emails in redmine -> 422 Unprocessable Entity [http://xxxxxx.xxx/mail_handler] - Added by Jaroslav K. over 3 years ago

Hello,
I have the same problem and resolved it by using "project=[projectID]".

But despite that, I cannot create new issue from not authenticated user :/ I make project public but that not helped.
Can you help me? Must I show some more logs?

Thank you!

RE: Problem receiving emails in redmine -> 422 Unprocessable Entity [http://xxxxxx.xxx/mail_handler] - Added by Albrecht Backhaus over 3 years ago

Jaroslav:

Have a look here http://www.redmine.org/projects/redmine/repository/revisions/2793/entry/trunk/extra/mail_handler/rdm-mailhandler.rb . You will find another option explained in that file (read hints at the top re --unknown-user=ACTION) which allows you to let unknown users send mails into redmine.
I could not find that explanation in a FAQ or wiki and stumbled over it during my quest for help when I had this problem too.

Regards, Albrecht

RE: Problem receiving emails in redmine -> 422 Unprocessable Entity [http://xxxxxx.xxx/mail_handler] - Added by Jaroslav K. over 3 years ago

Albrecht Backhaus wrote:

Jaroslav:

Have a look here http://www.redmine.org/projects/redmine/repository/revisions/2793/entry/trunk/extra/mail_handler/rdm-mailhandler.rb . You will find another option explained in that file (read hints at the top re --unknown-user=ACTION) which allows you to let unknown users send mails into redmine.
I could not find that explanation in a FAQ or wiki and stumbled over it during my quest for help when I had this problem too.

Regards, Albrecht

Thank you very much for your response and help.
As I understand "rdm-mailhandler" is for reading of emails from standard input ("Reads an email from standard input and forward it to a Redmine server through a HTTP request."). We need fetching via IMAP (rake -f /apps/redmine-0.8.7/Rakefile redmine:email:receive_imap ...).

Redmine version 0.8.4 reports about not defined parameter "--unknown-user".
When updated to 0.8.7 version: if using parameter --unknown-user (say --unknown-user=accept) - there is no action at all (no connect to the IMAP server, no errors even with --trace option). When running command without "--unknown-user=accept" - mailbox is checked and mails from unknown users (not registered in Redmine) are marked as read, but no issue is added to Redmine.

Maybe I should start new thread? Thank you!

RE: Problem receiving emails in redmine -> 422 Unprocessable Entity [http://xxxxxx.xxx/mail_handler] - Added by Albrecht Backhaus over 3 years ago

Hello Jaroslav, these parameter should work with the IMAP server as well. But there are some more settings being involved in that issue. Have a look here #3554.
The project needs to be "public" or anonymous email creation will fail.

Regards, Albrecht

RE: Problem receiving emails in redmine -> 422 Unprocessable Entity [http://xxxxxx.xxx/mail_handler] - Added by Reza ISSANY over 3 years ago

Hello,

I have the same problem actually : 422 Unprocessable Entity

I receive by mail :
<>: permission denied. Command output: Request was
denied by your Redmine server. Possible reasons: email is sent from an
invalid email address or is missing some information

I'm running the version 0.9.2 of redmine and any of input mails function.
I have tried to put "--unknown-user=accept" option, but it doesn't works.

Any idea please ? Thanks in advance for your helps.

RE: Problem receiving emails in redmine -> 422 Unprocessable Entity [http://xxxxxx.xxx/mail_handler] - Added by Reza ISSANY over 3 years ago

Some logs :

Processing MailHandlerController#index (for xx.xx.xx.xx at 2010-02-17 15:10:57) [POST]
Parameters: {"no_permission_check"=>"", "unknown_user"=>"accept", "allow_override"=>"tracker,priority,category,project", "issue"=>{"project"=>"test", "tracker"=>"Evolution"}, "key"=>"aoLgy8wXllgMtjp1A3LM", "email"=>"From Wed Feb 17 15:10:57 2010\nReturn-Path: <>\nX-Original-To: \nDelivered-To: \nReceived: from smtp2f.orange.fr (smtp2f.orange.fr [80.12.242.150])\n\tby sd-1xxx.dedibox.fr (Postfix) with ESMTP id 6693E5FE073\n\tfor <>; Wed, 17 Feb 2010 15:10:57 +0100 (CET)\nReceived: from me-wanadoo.net (localhost [127.0.0.1])\n\tby mwinf2f29.orange.fr (SMTP Server) with ESMTP id E24A4800036D\n\tfor <>; Wed, 17 Feb 2010 15:10:56 +0100 (CET)\nReceived: from me-wanadoo.net (localhost [127.0.0.1])\n\tby mwinf2f29.orange.fr (SMTP Server) with ESMTP id D4A4D8000396\n\tfor <>; Wed, 17 Feb 2010 15:10:56 +0100 (CET)\nReceived: from xxxxx.fr (LPuteaux-156-16-64-224.w217-128.abo.wanadoo.fr [2xx.xx.xx4])\n\tby mwinf2f29.orange.fr (SMTP Server) with ESMTP id 8BDFA800036D\n\tfor <>; Wed, 17 Feb 2010 15:10:56 +0100 (CET)\nX-ME-UUID: \nX-MimeOLE: Produced By Microsoft Exchange V6.5\nContent-class: urn:content-classes:message\nMIME-Version: 1.0\nContent-Type: text/plain;\n\tcharset=\"us-ascii\"\nContent-Transfer-Encoding: quoted-printable\nSubject: tes issue\nDate: Wed, 17 Feb 2010 15:10:48 +0100\nMessage-ID: <>\nX-MS-Has-Attach: \nX-MS-TNEF-Correlator: \nThread-Topic: tes issue\nThread-Index: Acqv2wEFsE2cVuWFSlqmFXgF24zPjg==\nFrom: \"reza\" <>\nTo: <>\n\nproject=3Dinbox\ntracker=3DEvolution\nallow_override=3Dtracker,priority\n\n\n\n"}
Completed in 3ms (View: 0, DB: 0) | 422 Unprocessable Entity [http://xxxx.xxx.fr/mail_handler]

RE: Problem receiving emails in redmine -> 422 Unprocessable Entity [http://xxxxxx.xxx/mail_handler] - Added by Jaroslav K. over 3 years ago

Hello,
you must put not "--unknown-user=accept" but "unknown-user=accept" (without dashes in front).
For more options: http://redmine.rubyforge.org/svn/trunk/lib/tasks/email.rake
This works for my in 0.9.2 stable version of Redmine.

The problem for me is the fact, that I cannot found the solution of sending mail back to users from Redmine.. :/ I wish to send issue summary to external users. Redmine-ezsummary - is something, that is almost that, what I'm searching for, but it is not working with 0.9.2

We use Redmine with LDAP authentication, so "unknown-user=create" is not working too..

(1-8/8)