Project

General

Profile

Imap Setup

Added by Marcus Lopes over 14 years ago

I'm running redmine on a Linux Ubuntu box

When I run

rake redmine:email:receive_imap host=owa.xxx.local username= password=xxxx port=587 --trace

I get the message below after 5 minutes or so.

(in /var/www/myapp/current/redmine)
  • Invoke redmine:email:receive_imap (first_time)
  • Invoke environment (first_time)
  • Execute environment
  • Execute redmine:email:receive_imap
    Segmentation fault

I have tried port 443 as well.

here is my env.

Rails 2.3.4
ruby 1.8.7

gems
actionmailer (2.3.4)
actionpack (2.3.4)
activerecord (2.3.4)
activeresource (2.3.4)
activesupport (2.3.4)
daemons (1.0.10)
fastthread (1.0.7)
gem_plugin (0.2.3)
mysql (2.8.1)
passenger (2.2.5)
rack (1.0.0)
rails (2.3.4)
rake (0.8.7)

plugins

acts_as_activity_provider
acts_as_attachable
acts_as_customizable
acts_as_event
acts_as_list
acts_as_searchable
acts_as_tree
acts_as_versioned
acts_as_watchable
awesome_nested_set
classic_pagination
coderay-0.7.6.227
engines
gravatar
open_id_authentication
prepend_engine_views
08:29 rfpdf
ruby-net-ldap-0.0.4

Any help??


Replies (17)

RE: Imap Setup - Added by Marcus Lopes over 14 years ago

More info

redmine has an account on the exchange server

is this problem because I'm truing to pull it from owa???

Spam removed - Added by dans a fag faggot over 14 years ago

Spam removed by Mischa The Evil.

RE: Imap Setup - Added by Tony Ordner over 14 years ago

I think you are trying to connect directly to the owa web page which probably does not support imap. I think you may need to install davmail as an imap gateway to your owa web page. Hope this helps.

wowsher

RE: Imap Setup - Added by Marcus Lopes over 14 years ago

I did change the address and the port. The port I was using before was a outbound port.

Now I'm getting a

  • Invoke redmine:email:receive_imap (first_time)
  • Invoke environment (first_time)
  • Execute environment
  • Execute redmine:email:receive_imap
    rake aborted!
    Connection reset by peer

I did comment the

  1. validates_presence_of :subject, :priority, :project, :tracker, :author, :status

on issues.rb

because now I just want to establish the connection

Thanks again

RE: Imap Setup - Added by Tony Ordner over 14 years ago

Are you certain you have exchange set up to accept imap connections? I do not think the owa component will accept them and exchange must be set specifically to accept them.

RE: Imap Setup - Added by Marcus Lopes over 14 years ago

It does because we have iPhones, BB and older versions of Mac Os that connect to the mail server through Imap.

RE: Imap Setup - Added by Tony Ordner over 14 years ago

Do you need to set the SSL option to ssl=SSL on the rake command line as well as the correct port number? Are your other devices set up to use SSL if so then this may be something to try.

RE: Imap Setup - Added by Marcus Lopes over 14 years ago

I did change to this

rake redmine:email:receive_imap host=ipaddress username= password=xxxxxx port=443 ssl=1 --trace

and I still got the

_** Invoke redmine:email:receive_imap (first_time)
  • Invoke environment (first_time)
  • Execute environment
  • Execute redmine:email:receive_imap
    rake aborted!
    Connection reset by peer_

One thig I notice is that when I telnet the domain

$ telnet ipadress 993

it stays open for 20 seconds and then it says

Connection closed by foreign host.

RE: Imap Setup - Added by Tony Ordner over 14 years ago

I think 993 is the standard imap port for ssl communication. I know google uses it for gmail access via ssl. so maybe change the port from 443 to 993?

RE: Imap Setup - Added by Marcus Lopes over 14 years ago

Ok Cool it did work with port 993....

So I sent 2 messages

Message Body

Project: The Ticket Management
Issue: Test Incoming email
Tracker: Track Issues
Priority: I'll take alook in 6 mo.
Status: Open
Assigned to: Bug Killer

when I run the rake it does not fail but shouldn't I see the ticket under the project which is the same one on the body of the message??

thanks again

RE: Imap Setup - Added by Tony Ordner over 14 years ago

now it gets tricky.... the email must be a registered user and the user must have rights to create issues within the project. You can override this and allow non-registered users with command line switches... go here http://www.redmine.org/wiki/redmine/RedmineReceivingEmails and scroll about half-way down to the imap section and you will see the syntax for the message body and command line for non-registered users. Here is my command line call:

CALL rake redmine:email:receive_imap RAILS_ENV="production" host=localhost username=xxx password=xxx project=unsorted tracker=email-request allow_override=project,tracker,priority unknown_user=accept unknown_user=create --trace

I hope this is helpful. Oh and another thing it will only grab email marked us unread and/or new in my experience so once it is marked as read you need to reset it to unread/new for the rake process to grab it.

RE: Imap Setup - Added by Marcus Lopes over 14 years ago

I guess I'm pretty close

here is the rake

$:rake redmine:email:receive_imap host=ipaddress username=redmine password=xxxxxx port=993 ssl=1 allow_override=project,tracker,priority unknown_user=accept unknown_user=create

now I'm sending myself as an existing user.
The sytem is set to authenticate via LDAP and my account exists and I'm an Admin

when I send the message I check redmine imbox and see that the message is there and unread after I run the rake it changes into read

but the issue is not showing under the project.

So I guess it's capturing but not putting in the right place thus ignoring

here is the message


Subject: The Ticket Management

Body
Project: The Ticket Management
Issue: Test Incoming email
Tracker: Bug
Priority: I'll take alook in 6 mo.
Status: Open
Assigned to: Marcus Lopes


RE: Imap Setup - Added by James Tedrick about 14 years ago

I'm getting the same error- rake connects to gmail, sees the messages, and for some reason goes through the failure branch when processing them all. Are there any new insights on this behavior?

RE: Imap Setup - Added by Tony Ordner about 14 years ago

In looking at the last rake command by Marcus I see there is no default project listed. Maybe that is needed? Or at least would allow the issues to come into the system. I do not actually override much I just let everything go to the 'Unsorted' project I created. So maybe add the project=unsorted (or whatever default project you want them to land).

RE: Imap Setup - Added by Marcus Lopes about 14 years ago

here is the rake command that works for me

rake redmine:email:receive_imap host=192.168.xxx.xx username=redmine password=xxxxxx port=993 ssl=1 allow_override=project,tracker,priority,status project=emailed tracker=Bug priority=Low

On the project I was using the name of the project instead of the id.

RE: Imap Setup - Added by Marcus Lopes about 14 years ago

Tony Ordner wrote:

In looking at the last rake command by Marcus I see there is no default project listed. Maybe that is needed? Or at least would allow the issues to come into the system. I do not actually override much I just let everything go to the 'Unsorted' project I created. So maybe add the project=unsorted (or whatever default project you want them to land).

Yeah... I created the emailed project as an inbox bin.

BTW.... thanks a bunch Tony

RE: Imap Setup - Added by Wyatt Barnett over 13 years ago

For the life of me I can't seem to get this going and I can't ferret out why. Perhaps you all can help.

I'm using the pre-packaged redmine appliance from Turnkey linux, running as a VM on HYPER-V on win 2k8 r2. Email server in question is Exchange 2003, account is one which is a known good quantity--it is feeding MANTIS quite effectively. Command line I'm using is:

rake -f /var/www/railsapp/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=m
ail.[CENSORED].com username=helpdesk@[CENSORED].com password=xxxxx project=helpdesk tracker=Support category=Email priority=Normal unknown_user=allow no_permission_check=1 --trace

I get the following output:

** Invoke redmine:email:receive_imap (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:email:receive_imap

It is definitely hitting the mailbox -- the messages become read and if I use invalid credentials I get a login failed message. But for the life of me I can't get an issue created. Is there anything I should look at or anyplace there is a log with more detailed information?

    (1-17/17)