IMAP receiving does not create a new user
I tried to use http://redmine.rubyforge.org/svn/tags/1.0.1/lib/tasks/email.rake for email downloading and acceptiong as a new issue through command:
rake -f /opt/redmine/1.0.1/Rakefile redmine:email:receive_imap host=mail.server email@example.com password=XXXXX move_on_success=read move_on_failure=failed unknown_user=create project=test allow_overwrite=project --trace RAILS_ENV=production
But I encountered an issue that the issue ticket is not created when is submitted from foreign email. (But create option stands for creation of the new user?) When I use option unknown_user=accept everything is working properly but there is no information about sender, which I highly need.
Or Is there any plugin which deals with it? I tried plugin from trolltech, redmine_helpdesk and few other but any of them didn't work at all.
#3 Updated by Felix Schäfer about 11 years ago
unknown_user=create will create a user based on the incoming email, but the user will only have the non member role, which might not be permission enough to create an issue in whatever project you're trying to throw it in. Add something like
no_permission_check=true if you want redmine to not check the permissions of the sender.
#8 Updated by Simen Endsjø about 11 years ago
Nope. I'm pretty sure this has something to do with LDAP authentication.
If an unknown email is picked up AND the email exists in ldap, the user is created.
The user is then created as an internal user and not linked to ldap at all.
If an unknown email that doesn't exist in ldap is encountered, no user is created. Anonymous ticket creation still works.
#12 Updated by Felix Schäfer about 11 years ago
Try toggling the boolean values of lines 20 and 21 in source:/trunk/config/environments/production.rb#L20, though I'm not sure how much logging is done in the mail-receiving thing.
#13 Updated by Simen Endsjø about 11 years ago
Not quite sure I understand what you mean..
config.action_controller.consider_all_requests_local = false config.action_controller.perform_caching = true
config.action_controller.consider_all_requests_local = true config.action_controller.perform_caching = false
#17 Updated by Axel B. about 11 years ago
Same here ... we are also using Redmine 1.0.2. Within our Redmine instance user accounts have to be checked manually. But to test the issue mail importer I enabled the option automatic account activation. Unfortunately without positiv results...
I also changed the cron script between imap and pop3 interface, but only with the result, that the pop3 task is not that silent, but still not very informative.
Connecting to pop3.server.com... 1 email(s) to process... --> Message <AANLkTimk6sXuH69OjJ+6KokUAhf1-nJ1xYLrCBaYfGFo@mail.gmail.com> NOT processed and left on the server
Switching the "unknown_user" option back to "accept", everything works fine - as already mentioned. Additionally I don't understand why a user has to be created at all, to have a sender/ issue creator. Isn't it possible to use the accept mode with the anonymous user and just use the email sender as issue creator name/ label ... whatever?
#18 Updated by Terence Mill about 11 years ago
Axel B. wrote:
Additionally I don't understand why a user has to be created at all, to have a sender/ issue creator. Isn't >it possible to use the accept mode with the anonymous user and just use the email sender as issue creator >name/ label ... whatever?
That is exactly what we would need also!
#20 Updated by Øyvind Sean Kinsey almost 11 years ago
The reason why 'create' does not work is that the user model has a limitation on 30 characters for the firstname property.
When extracting the name from the email address, redmine might use the 'raw' string, and when this is an ISO-8859 encoded string this might look like '=?ISO-8859-1?Q?=D8yvind_Sean_Kinsey?=', and as you can see the encoding takes most of the available characters.
I just replaced the default with 'user.firstname = '-' in app/models/mail_handler.rb:331 and now it works.
But as many others here - no logging whatsoever.