Defect #6433
open
IMAP receiving does not create a new user
Added by Miloš Kozák about 14 years ago.
Updated almost 14 years ago.
Description
Hi,
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 username=helpdesk@domain.tld 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.
Thank you
I have the exact same problem in 1.0.2
Nothing is written to procuction.log either.
I have ldap enabled, and it seems this might be a problem.
If a user registered in ldap sends an email, the user is created as an internal user - not connected to ldap. Any users outside of ldap doesn't get added.
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.
The problem is that unknown_user=create doesn't create a user at all.
I've also tried no_permission_check, but still no user is created.
Do you have any user custom fields that are required? I.e. can a user be created by only entering a first, lastname and mail address?
The required fields are the default ones: login, firstname, lastname, email and password.
Then I have no idea… Is the system maybe set to require the admin to confirm new registration?
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.
Thank you for your reactions.. But I deal with MySQL, not LDAP. It tried everything described there, but nothing worked.
I am afraid It is an internal problem. I even tried to set all permissions to all users..
Ok, I've only tried with MySQL + ldap. As it work's when the email exists in ldap, I thought it was only related to ldap.
Is there any way I can enable more logging to try to pinpoint the problem a bit better?
Ok, it is not related to LDAP only :) I try to run it with mysql.. If there was a clean way how to achieve a more verbose logging, would be great, but I do not know it.
Not quite sure I understand what you mean..
Change
config.action_controller.consider_all_requests_local = false
config.action_controller.perform_caching = true
To
config.action_controller.consider_all_requests_local = true
config.action_controller.perform_caching = false
Ok, I tried
config.action_controller.consider_all_requests_local = true
config.action_controller.perform_caching = false
and restarted the mongrel instance, but it didn't have any impact.
Well, then you're probably in development mode already, and I don't think there's more logging you can get.
This is a very attractive feature for us as we could use Redmine also for customer support.
Do you have any idea what else I might try to make this work or get some error messages?
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?
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!
Is there any new solution for this problem? Is something changed in Redmine 1.1.0 ?
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.
Just tried this last fix, but it is not working for me :( maybe that is because I have LDAP authentification enabled
Also available in: Atom
PDF