Project

General

Profile

Accept issues from mail Redmine 2.3.0.stable

Added by Constantin Manea almost 11 years ago

Hello all. I have a major problem. I want to configure Redmine to accept issues from mail.
OS: CentOS 6.3
Versions:
ruby-1.9.3-p392
rake, version 10.0.4
Redmine 2.3.0.stable
Rails 3.2.13

What i did is:
1) made an bash script:

#!/bin/bash
export NOEXEC_DISABLE=1
export PATH=/usr/local/rvm/gems/ruby-1.9.3-p392/bin:/usr/local/rvm/gems/ruby-1.9.3-p392@global/bin:/usr/local/rvm/rubies/ruby-1.9.3-p392/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

cd /opt/Redmine/
/usr/local/rvm/gems/ruby-1.9.3-p392/bin/rake \
-I /usr/local/rvm/gems/ruby-1.9.3-p392 \
-f ./Rakefile redmine:email:receive_imap RAILS_ENV="production" \
host=mail.mydomain.com port=993 username="" password="***" \
ssl=1 folder=INBOX move_on_success=INBOX.read move_on_failure=INBOX.failed \
allow_override=project,tracker,status,subject,priority,description,position \
unknown_user=accept project=proiect-colector

and then in cron:
  • * * * * /bin/bash /home/Redmine/redmine_issue_mail.sh

I have tried this in many ways (the rake command directly in cron, with/without PATH in the script, with/without -I option in rake command, etc.) but nothing seems to work.
The thing is that the e-mail is read by the script but it is not processed. It does not appear as an Issue in Redmine and it is not moved to INBOX.read nor INBOX.failed.
What can i do?


Replies (2)

RE: Accept issues from mail Redmine 2.3.0.stable - Added by Constantin Manea almost 11 years ago

No, not really. In the log files it says that everything went ok. I forgot to say maybe the most important thing: when i run the script manually from ssh everything works just fine (the mail is read, moved to "read" folder and a new issue is created). So the problem is with cron. With some environment variables i think. But i don't know which one.

    (1-2/2)