Project

General

Profile

Receiving Emails - IMAP HMailServer

Added by James H over 10 years ago

RAILS_ENV=Production
Ruby version              1.9.3
RubyGems version          1.8.28
Database adapter          mysql

I am trying to get Redmine to retrieve emails from my HMailServer (locally installed) email account through IMAP protocol.
HMailServer is set up and I can connect to it remotely and send it emails through telnet (using SMTP). I used an email client and successfully viewed these emails that I had sent remotely (using IMAP).

Running:

rake redmine:email:receive_imap host=[IP Address] username=System@[domain].com password=[password]
or
rake redmine:email:receive_imap host=[IP Address] username=System@[domain].com password=[password] unknown_user=accept no_permission_check=1

from cmd prompt in the redmine directory does not return any errors or success messages and checking redmine shows that nothing has been updated.


Checking HMailServer logs shows:

"RECEIVED: RUBY0002 SELECT INBOX" 
"SENT: * 9 EXISTS[nl]* 0 RECENT[nl]* FLAGS (\Deleted \Seen \Draft \Answered \Flagged)[nl]* OK [UIDVALIDITY 1396368821] current uidvalidity[nl]* OK [UIDNEXT 10] next uid[nl]* OK [PERMANENTFLAGS (\Deleted \Seen \Draft \Answered \Flagged)] limited[nl]RUBY0002 OK [READ-WRITE] SELECT completed" 
"RECEIVED: RUBY0003 UID SEARCH NOT SEEN" 
"SENT: * SEARCH" 
"SENT: RUBY0003 OK UID completed" 
"RECEIVED: RUBY0004 EXPUNGE" 
"SENT: " 
"SENT: RUBY0004 OK EXPUNGE Completed" 
"RECEIVED: RUBY0005 LOGOUT" 
"SENT: * BYE Have a nice day[nl]RUBY0005 OK Logout completed" 

I am particularly concerned with the part that shows:

"RECEIVED: RUBY0003 UID SEARCH NOT SEEN" 

Which leads me to believe that the rake task is trying to search the emails for some values, but cannot find them so ends up doing nothing.


Emails (for adding notes to issues) look similar to:

FROM: myemail@somedomain.com
TO: System@[domain].com
SUBJECT: Re: [Feature #832]

notes here

Emails (for creating new issues) include:

SUBJECT: What Do I put here
Project: Development


  • I have set default values for all required custom fields.
  • ALL projects are currently "Public"

Question
  • Is my email set up correctly?
  • How can I get it to continue to create/update issues even if the user is not detected?