recive email to create issues
Added by Marco Tralles over 15 years ago
About your application's environment Ruby version 1.8.6 (x86_64-linux) RubyGems version 1.3.1 Rails version 2.1.2 Active Record version 2.1.2 Action Pack version 2.1.2 Active Resource version 2.1.2 Action Mailer version 2.1.2 Active Support version 2.1.2 Edge Rails revision unknown Application root /home/htdocs/redmine Environment production Database adapter mysql
I've configured redmine to recive mails from external IMAP-Server by using a cron-job. The cron-job is done with a shel-script:
#!/bin/bash export PATH=$PATH:/usr/local/rubygems/bin:/usr/local/rubygems/gems/bin export RUBYLIB=/usr/local/rubygems/lib export GEM_HOME=/usr/local/rubygems/gems cd /home/htdocs/redmine /usr/local/bin/rake --trace redmine:email:receive_imap RAILS_ENV="production" host=mail.server.tld username={username} password={password} folder=INBOX tracker=Sonstiges status=Neu priority=Normal move_on_success=INBOX.read move_on_failure=INBOX.failed allow_override=project,tracker,priority,status
- if i get a Ticket-E-Mail from Redmine and answer to it, the answer will be addet to the ticket.
- if i send a E-Mail to the same redmine-email-adress, it will be moved to INBOX.failed. i've no idea how to format the subject or the mail to create a issue.
- i enabled IMAP-Trace (add: Net::IMAP.debug = true in /var/www/redmine/lib/redmine/imap.rb after require …)
- i send the following mail:
Subject: [Test-Projekt demo] (Neu) Neue Tickets per E-Mail erstellen. Message: Test-Projekt demo letzter Versuch für heute. Wenn das nicht klappt, muss ich halt noch mal recherchieren.
and got this Trace:
S: * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE] Courier-IMAP ready. Copyright 1998-2005 Double Precision, Inc. See COPYING for distribution information. C: RUBY0001 LOGIN "username" password S: RUBY0001 OK LOGIN Ok. C: RUBY0002 SELECT INBOX S: * FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent) S: * OK [PERMANENTFLAGS (\* \Draft \Answered \Flagged \Deleted \Seen)] Limited S: * 1 EXISTS S: * 1 RECENT S: * OK [UIDVALIDITY 1242635317] Ok S: * OK [MYRIGHTS "acdilrsw"] ACL S: RUBY0002 OK [READ-WRITE] Ok C: RUBY0003 SEARCH NOT SEEN S: * SEARCH 1 S: RUBY0003 OK SEARCH done. C: RUBY0004 FETCH 1 RFC822 S: * 1 FETCH (RFC822 {1545} S: Return-Path: <my_email@server.tld> S: Delivered-To: tickets@server.tld S: Received: (qmail 20805 invoked by uid 89); 22 May 2009 12:08:48 -0000 S: Received: by simscan 1.3.1 ppid: 20788, pid: 20792, t: 0.6359s S: scanners: attach: 1.3.1 clamav: 0.92.1 S: /m: spam: 3.1.8 S: X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on S: mail.server.tld S: X-Spam-Level: S: X-Spam-Status: No, score=-0.5 required=3.5 tests=AWL,BAYES_00, S: DK_POLICY_SIGNSOME autolearn=ham version=3.1.8 S: Received: from unknown (HELO server.tld) (000.000.000.000) S: by mail.oberdieck-online.de with SMTP; 22 May 2009 12:08:48 -0000 S: Received-SPF: pass (mail.server.tld: SPF record at server.tld designates 000.000.000.000 as permitted sender) S: Received: from [000.000.000.000] (isp-name [000.000.000.000]) S: by server.tld (Postfix) with ESMTP id BE3C74771 S: for <redmine@server.tld >; Fri, 22 May 2009 14:08:47 +0200 (CEST) S: Message-Id: <37EAE43A-60B6-4617-AA18-45B166BF85C6@server.tld > S: From: hiro <my-email@server.tld > S: To: tickets@server.tld S: Content-Type: text/plain; charset=ISO-8859-1; format=flowed; delsp=yes S: Content-Transfer-Encoding: quoted-printable S: Mime-Version: 1.0 (Apple Message framework v935.3) S: Subject: [Test-Projekt demo] (Neu) Neue Tickets per E-Mail erstellen. S: Date: Fri, 22 May 2009 14:09:47 +0200 S: X-Mailer: Apple Mail (2.935.3) S: S: Project: Test-Projekt demo S: S: letzter Versuch f=FCr heute. Wenn das nicht klappt, muss ich halt noch =20= S: S: mal recherchieren.= S: ) S: * 1 FETCH (FLAGS (\Seen \Recent)) S: RUBY0004 OK FETCH completed. C: RUBY0005 STORE 1 +FLAGS (\Seen) S: * 1 FETCH (FLAGS (\Seen \Recent)) S: RUBY0005 OK STORE completed. C: RUBY0006 COPY 1 INBOX.failed S: RUBY0006 OK [COPYUID 1242635444 24 23] COPY completed. C: RUBY0007 STORE 1 +FLAGS (\Deleted) S: * 1 FETCH (FLAGS (\Seen \Deleted \Recent)) S: RUBY0007 OK STORE completed. C: RUBY0008 EXPUNGE S: * 1 EXPUNGE S: * 0 EXISTS S: * 0 RECENT S: RUBY0008 OK EXPUNGE completed (in /home/htdocs/redmine) ** Invoke redmine:email:receive_imap (first_time) ** Invoke environment (first_time) ** Execute environment ** Execute redmine:email:receive_imap
but - the mail was not processed.
can someone send me a hint, how a email has to be formatet?
i tryed also to send a full set of paramenter like:
Project: Test-Projekt demo Tracker: Unterstützung Priority: Hoch Status: Feedback here is the issue-text
but redmine reads the mail, and moved it to failed but i've no idea why …
Replies (5)
RE: recive email to create issues - Added by Jamie Talbot over 15 years ago
You could try using the internal name for your Project and see if that fixes it? Also, does it make a difference to put the description before the information tags?
here is the issue-text
Project: test-projekt-demo
Tracker: Unterstützung
Priority: Hoch
Status: Feedback
Also, because my email submissions will be coming from non-technical people, I don't expect them to get the formatting correct. So, I also created a private Uncategorised Issues project, which I set as the default to receive issues, if the project is incorrectly specified. I then manually move them once a day.
/usr/local/bin/rake --trace redmine:email:receive_imap RAILS_ENV="production" host=mail.server.tld username={username} password={password} folder=INBOX tracker=Sonstiges status=Neu priority=Normal project=uncategorised-issues move_on_success=INBOX.read move_on_failure=INBOX.failed allow_override=project,tracker,priority,status
The rest of your settings and formatting seem fine. I presume you've already read this, but just in case: RedmineReceivingEmails.
Cheers,
Jamie.
RE: recive email to create issues - Added by S Banerian over 15 years ago
I have been able to receive emails; it is critical to the the "FROM" (sender) right, but debug logs are not sufficiently verbose to allow one to find errors.
The problem I have is perhaps related:
The issue is created, but the lines:
Project: myproject
Tracker: Bug
Priority: Urgent
Status: New
are not totally considered. Project works, but Tracker and Priority never get set.
(Redmine Revision 2824 0.8-stable)
RE: recive email to create issues - Try sending new mail instead of replying to a mail - Added by Prasad Babu A Bhat over 12 years ago
I had similar issues, but is resolved now.
When I reply to a mail, notes are added to the issues.
When I reply to a mail, by deleting all including subject and then Adding Necessary Attributes in E-Mail body the mail is still updated as a note.
When I write a new mail (not a reply), with necessary Attributes in E-Mail body, new issue is created.
On viewing previous mails, I noticed the presence of header fields "message-id" and "in-reply-to", which still carried enough information for Redmine to process the mail to be updated as a note, considering that Redmine is well programmed to process all available headers of an E-Mail.
So the simple solution is to Send A New Mail with necessary Attributes, and Not A Reply To A Mail¶
Note: Make sure to give only Default Value to some Attributes, if any is declared to have a default value during new Issue creation.