Project

General

Profile

Recieving Email not working

Added by Jasen Burkett about 9 years ago

I need someone who knows redmine well to help a new to redmine person out.

I have followed the documentation on redmines site, and am continiously getting errors when I run my rake command directly in my terminal.
- using the following rake command
rake -f /usr/share/redmine/Rakefile redmine:email:receive_pop3 RAILS_ENV="production" host=pop3.ardemgaz.com port= username= password=MYPASSWORD --trace

The IS a user in redmine (redmine.ardemgaz.com) with that email address
The user DOES have permissions to create (administrator) issues, projects, etc.

When I run it, this is what I get....
  • Invoke environment (first_time)
  • Execute environment
  • Execute redmine:email:receive_pop3
    rake aborted!
    SocketError: getaddrinfo: Name or service not known
    /usr/lib/ruby/1.9.1/net/pop.rb:545:in `initialize'
    /usr/lib/ruby/1.9.1/net/pop.rb:545:in `open'
    /usr/lib/ruby/1.9.1/net/pop.rb:545:in `block in do_start'
    /usr/lib/ruby/1.9.1/timeout.rb:69:in `timeout'
    /usr/lib/ruby/1.9.1/timeout.rb:100:in `timeout'
    /usr/lib/ruby/1.9.1/net/pop.rb:545:in `do_start'
    /usr/lib/ruby/1.9.1/net/pop.rb:532:in `start'
    /usr/share/redmine/lib/redmine/pop3.rb:43:in `check'
    /usr/share/redmine/lib/tasks/email.rake:159:in `block (4 levels) in <top (required)>'
    /usr/share/redmine/app/models/mailer.rb:367:in `with_synched_deliveries'
    /usr/share/redmine/lib/tasks/email.rake:158:in `block (3 levels) in <top (required)>'
    /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:240:in `call'
    /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:240:in `block in execute'
    /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:235:in `each'
    /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:235:in `execute'
    /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:179:in `block in invoke_with_call_chain'
    /usr/lib/ruby/1.9.1/monitor.rb:211:in `mon_synchronize'
    /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:172:in `invoke_with_call_chain'
    /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/task.rb:165:in `invoke'
    /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:150:in `invoke_task'
    /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:106:in `block (2 levels) in top_level'
    /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:106:in `each'
    /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:106:in `block in top_level'
    /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:115:in `run_with_threads'
    /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:100:in `top_level'
    /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:78:in `block in run'
    /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:176:in `standard_exception_handling'
    /var/lib/gems/1.9.1/gems/rake-10.4.2/lib/rake/application.rb:75:in `run'
    /var/lib/gems/1.9.1/gems/rake-10.4.2/bin/rake:33:in `<top (required)>'
    /usr/local/bin/rake:23:in `load'
    /usr/local/bin/rake:23:in `<main>'
    Tasks: TOP => redmine:email:receive_pop3
  • Invoke redmine:email:receive_pop3 (first_time)

I have confirmed with my IT dept, that the ports are open, this is how we get and rec. emails currently sooo all should be well.

If someone can chat with me, text me, email me that would be great.

Thank you in advance.


Replies (7)

RE: Recieving Email not working - Added by Tony Ordner about 9 years ago

I see no port number specified in your call... I think it is not finding the port to connect on. It just says port= above. The socket error kind of indicates this as well.

RE: Recieving Email not working - Added by Jasen Burkett about 9 years ago

Thank you for your response.

I should have updated the post.

I am able to get email in and out now...

However I can not get a cron job to work lol. I do not know if this is the proper place to be asking about that, but
the server is an AWS server, I installed redmine all from terminal, and all setup has been done from terminal.

There is a main crontab file in the /etc/ folder however if I run sudo crontab -e I can edit the root crontab.

however. when I do so, nothing happens. it does not give me errors, and it is not pulling emails from the server like it
does when I just run my rake command directly in the terminal.

RE: Recieving Email not working - Added by Tony Ordner about 9 years ago

Ok great. Sorry I run mine on windows so no cron experience here. You should start a new thread for that one.

RE: Recieving Email not working - Added by Jasen Burkett about 9 years ago

Ok. I can do that. how do I delete things from here once they are answered?

RE: Recieving Email not working - Added by Jasen Burkett about 9 years ago

Is there a way to take all the users and their permissions, all the groups, etc. from an old redmine install and bring that data into a new redmine install?

RE: Recieving Email not working - Added by Tony Ordner about 9 years ago

Just post a final message saying it was resolved and the steps you took that worked if it applies.

As for the users and permissions you should post that as a new question so others will see it. I am not certain how easy or hard that might be. My guess would be it is tricky to do.

RE: Recieving Email not working - Added by Jasen Burkett about 9 years ago

The final steps, or what ended up working for me, was using IMAP in the rake command instead of using pop3.

I also had an email account created especially for redmine only, so that when emails are sent in, they are sent only to this email address.
I then ran the rake command after an email was sent, and all is fine.

I am now working on getting a cron job to run the rake command (rake task) every five min. that is the current challenge, the inital issue
is solved.

thank you to all who helped.

    (1-7/7)