Re: [SOGo] Error 404 before using the SOGo Web interface
Hello there, it's been a long time since the last time I bothered you. Today, I have a great news for you (or maybe just for me, but, anyway...) : I solved my problem. My solution is maybe a bit dirty, but it works ! Here it is : sogo-integrator/chrome/content/messenger/folders-update.js line 40 adding : available = (xmlRequest.status != 404); //if not available, it's maybe just not initialized. if(!available){ var prompts = Components.classes[@mozilla.org/embedcomp/prompt-service;1] .getService(Components.interfaces.nsIPromptService); var username = {value: sogoConfig['username']}; var password = {value: }; var check = {value: false}; //Prompt the sogo username and password. var result = prompts.promptUsernameAndPassword(window, Initialisation, Vos identifiant et mot de passe, username, password, null, check); if(result){ var params = userName= + username.value + password= + password.value; //Send a connect request xmlRequest.open(POST, https://domain.com/SOGo/connect;, true); xmlRequest.setRequestHeader(Content-type, application/x-www-form-urlencoded); xmlRequest.setRequestHeader(Content-length, params.length); xmlRequest.setRequestHeader(Connection, close); xmlRequest.send(params); //Set the right username setSOGoUserName(input.value); this.baseURL = sogoBaseURL(); //Retry connection xmlRequest.open(OPTIONS, this.baseURL + this.type, false); xmlRequest.send(); available = (xmlRequest.status != 404); } } Also, I needed the setSOGoUserName function so in sogo-integrator/chrome/content/sogo-config.js line 26 function setSOGoUserName(newName){ sogoConfig['username'] = newName; //Also need to reinitialise the baseURL sogoConfig['baseURL'] = null; } And finally suppress the overlay of the dialog in sogo-integrator/chrome.manifest line 13 : overlay chrome://global/content/commonDialog.xul chrome://sogo-integrator/content/global/common-dialog-overlay.xul That way, the first time, if the person who is connecting will be prompted his login and password, and he isn't stuck anymore. By the way, the other users are also unlocked. Thanks for your help, and I hope this may be people in such a situations. Greetings Yvan Le 04/04/2011 08:30 AM, Stephen Ingram a écrit : On Fri, Apr 1, 2011 at 12:19 AM, Yvan LE BOUFFANT yvan.lebouff...@virtualys.com wrote: On 03/31/2011 09:29 PM, Stephen Ingram wrote: Can you please tell me what IMAP server you are using? Are you authenticating the IMAP server from LDAP also? Steve I'm not in charge of the Mail server, but I know that LDAP is not connected to it (because of some security and availability reasons). In SOGo server configuration, there is the (very useful) option SOGoForceIMAPLoginWithEmail which works well, and I looked for such an option in the Integrator, but I didn't find it. Maybe there is a method to prompt the SOGo username only the first time ? Or, to set it in the preferences ? Our setup we've been testing here uses common directory for IMAP and SOGo authentication. As such, we can use SASL to obtain the information we need using binds and directory searches. It sounds like your mailstore (IMAP) is completely separated so you can't do that. Also, I was in a similar situation to you, but in reverse. I wanted to use uid for mail store and email address for SOGo. For that, I used the file defaults/preferences/site.js in the sogo-integrator directory and included the line: pref(sogo-integrator.identification.use_email_address, true); You might look into the file this is referring to (chrome/content/sogo-config.js) and try to adjust it to fit your requrements. Your problem is going to be more difficult to solve though as it's not as easy for SOGo to deduce the uid. Steve -- users@sogo.nu https://inverse.ca/sogo/lists
Re: [SOGo] Error 404 before using the SOGo Web interface
On Fri, Apr 1, 2011 at 12:19 AM, Yvan LE BOUFFANT yvan.lebouff...@virtualys.com wrote: On 03/31/2011 09:29 PM, Stephen Ingram wrote: Can you please tell me what IMAP server you are using? Are you authenticating the IMAP server from LDAP also? Steve I'm not in charge of the Mail server, but I know that LDAP is not connected to it (because of some security and availability reasons). In SOGo server configuration, there is the (very useful) option SOGoForceIMAPLoginWithEmail which works well, and I looked for such an option in the Integrator, but I didn't find it. Maybe there is a method to prompt the SOGo username only the first time ? Or, to set it in the preferences ? Our setup we've been testing here uses common directory for IMAP and SOGo authentication. As such, we can use SASL to obtain the information we need using binds and directory searches. It sounds like your mailstore (IMAP) is completely separated so you can't do that. Also, I was in a similar situation to you, but in reverse. I wanted to use uid for mail store and email address for SOGo. For that, I used the file defaults/preferences/site.js in the sogo-integrator directory and included the line: pref(sogo-integrator.identification.use_email_address, true); You might look into the file this is referring to (chrome/content/sogo-config.js) and try to adjust it to fit your requrements. Your problem is going to be more difficult to solve though as it's not as easy for SOGo to deduce the uid. Steve -- users@sogo.nu https://inverse.ca/sogo/lists
Re: [SOGo] Error 404 before using the SOGo Web interface
On Fri, Apr 1, 2011 at 2:17 AM, Yvan LE BOUFFANT yvan.lebouff...@virtualys.com wrote: I've got some new information. In fact, the problem is not about the login or email address, but, it's that the object user does not exist, and Thunderbird is not able to make SOGo creating this object. I hope this may help a bit more That's a totally separate problem. Either you have an issue with your directory or the user is not begin created properly in your DB. You can look at the sogo_folder_info to see exactly what SOGo thinks the username is. You can look at your directory server logs to see if it's an LDAP issue. Steve -- users@sogo.nu https://inverse.ca/sogo/lists
Re: [SOGo] Error 404 before using the SOGo Web interface
The directory exists in the DB, and the sogo_folder_info indicates /Users/user/Calendar/personal as path. So I tried modify the URL in sogo-config.js to make it look through : /Users/user/Calendar/personal /dav/user/Calendar/personal /Users/user.n...@domain.com/Calendar/personal /dav/user.n...@domain.com/Calendar/personal and each time, I've got a 404 error. The only way to make it work is to connect first to SOGo with the browser. I even tried to force the connection by sending a POST request to /SOGo/connect with the username and password as the interface do it, but I've got this response : SOGoRootPage Login for user '(nil)' might not have worked Is it possible that the cache can't be initialized by Thunderbird ? I think of that because when I type in my Browser /SOGo/user, it say : object not found: SOGo = user. After logged in and out, the same URL redirect me on the SOGo front page (maybe a security hole, by the way ?). Also, another think which make me think about a cache trouble, is that the problem comes back after few hours of non-use (for example, during the night) : maybe a cache drop. Thanks for paying such attention to my troubles. Yvan Le 04/04/2011 08:33 AM, Stephen Ingram a écrit : On Fri, Apr 1, 2011 at 2:17 AM, Yvan LE BOUFFANT yvan.lebouff...@virtualys.com wrote: I've got some new information. In fact, the problem is not about the login or email address, but, it's that the object user does not exist, and Thunderbird is not able to make SOGo creating this object. I hope this may help a bit more That's a totally separate problem. Either you have an issue with your directory or the user is not begin created properly in your DB. You can look at the sogo_folder_info to see exactly what SOGo thinks the username is. You can look at your directory server logs to see if it's an LDAP issue. Steve -- users@sogo.nu https://inverse.ca/sogo/lists
Re: [SOGo] Error 404 before using the SOGo Web interface
On 03/31/2011 09:29 PM, Stephen Ingram wrote: Can you please tell me what IMAP server you are using? Are you authenticating the IMAP server from LDAP also? Steve I'm not in charge of the Mail server, but I know that LDAP is not connected to it (because of some security and availability reasons). In SOGo server configuration, there is the (very useful) option SOGoForceIMAPLoginWithEmail which works well, and I looked for such an option in the Integrator, but I didn't find it. Maybe there is a method to prompt the SOGo username only the first time ? Or, to set it in the preferences ? Yvan -- users@sogo.nu https://inverse.ca/sogo/lists
Re: [SOGo] Error 404 before using the SOGo Web interface
I've got some new information. In fact, the problem is not about the login or email address, but, it's that the object user does not exist, and Thunderbird is not able to make SOGo creating this object. I hope this may help a bit more Yvan On 04/01/2011 09:19 AM, Yvan LE BOUFFANT wrote: On 03/31/2011 09:29 PM, Stephen Ingram wrote: Can you please tell me what IMAP server you are using? Are you authenticating the IMAP server from LDAP also? Steve I'm not in charge of the Mail server, but I know that LDAP is not connected to it (because of some security and availability reasons). In SOGo server configuration, there is the (very useful) option SOGoForceIMAPLoginWithEmail which works well, and I looked for such an option in the Integrator, but I didn't find it. Maybe there is a method to prompt the SOGo username only the first time ? Or, to set it in the preferences ? Yvan -- users@sogo.nu https://inverse.ca/sogo/lists
Re: [SOGo] Error 404 before using the SOGo Web interface
Because of my configuration, the SOGo integrator can't make difference between my email address and my username (because my IMAP configuration requires the email address as login). I would appreciate that it propose me to enter another username BEFORE trying to reach SOGo, but it doesn't : the sogo username is fixed by : if(useEmail) sogoConfig['username'] = mgr.defaultAccount.defaultIdentity.email; else sogoConfig['username'] = mgr.defaultAccount.incomingServer.realUsername; but, in my case, both are equals I don't understand how changing something in the sogo-config.js will make a difference except if there is a way to make an LDAP request to recover the login from the email address. Did I miss something in the configurations ? Thanks for your help Yvan Le 03/30/2011 04:55 PM, Stephen Ingram a écrit : Yvan LE BOUFFANT wrote: I only suppress the line 132 in chrome/content/global/common-dialog-overlay.js : loginContainer.hidden = true; That way, the login is still accessible, and I can change it (because default is email address). So (without the help of your Web login) your Thunderbird login is not working properly at all You can change chrome/content/sogo-config.js such that SOGo will use whatever you want to login. However, why wouldn't you change this setup as I suggested (with an ldap search) such that you could simply login with the ldap uid (userid) and allow ldap to handle the magic of converting over to the email address in the background? This would avoid the extra entry of the login that you are trying to suppress. Steve -- users@sogo.nu https://inverse.ca/sogo/lists
Re: [SOGo] Error 404 before using the SOGo Web interface
Yvan LE BOUFFANT wrote: Because of my configuration, the SOGo integrator can't make difference between my email address and my username (because my IMAP configuration requires the email address as login). I would appreciate that it propose me to enter another username BEFORE trying to reach SOGo, but it doesn't : the sogo username is fixed by : if(useEmail) sogoConfig['username'] = mgr.defaultAccount.defaultIdentity.email; else sogoConfig['username'] = mgr.defaultAccount.incomingServer.realUsername; but, in my case, both are equals I don't understand how changing something in the sogo-config.js will make a difference except if there is a way to make an LDAP request to recover the login from the email address. Did I miss something in the configurations ? Can you please tell me what IMAP server you are using? Are you authenticating the IMAP server from LDAP also? Steve -- users@sogo.nu https://inverse.ca/sogo/lists
Re: [SOGo] Error 404 before using the SOGo Web interface
Yvan- Yvan LE BOUFFANT wrote: First of all, I'm new using SOGo, and find that's a very good product (a bit difficult to setup, but I managed to do it), so I would like to thank you for all of that. I had a trouble, and I didn't find any solution on the net. The problem is that I can't connect to SOGo through the SOGo Integrator since I logged once through the web interface. The requests returns are : REPORT /SOGo/dav/user.n...@domain.com/Contacts HTTP/1.1 404 62/0 0.590 - - 0 REPORT /SOGo/dav/user.n...@domain.com/Calendar HTTP/1.1 404 62/0 0.588 - - 0 The '404' indicates that SOGo can't find this user entry. You might check the database (sogo_folder_info) to see that the correct user was created since you are using uid to login instead of the email address it is apparently looking for. After logged in, I've got that : REPORT /SOGo/dav/user.n...@domain.com/Contacts/people/ HTTP/1.1 207 127/341 2.004 - - 0 REPORT /SOGo/dav/user.n...@domain.com/Calendar/personal/ HTTP/1.1 207 125/245 0.044 - - 0 and between both, few lines like : WARNING(-[NSNull(misc) count]): called NSNull -count (returns 0) !!! GET /SOGo/ HTTP/1.1 200 3713/0 0.147 10215 63% 2M SOGoRootPage successful login for user 'user' - expire = -1 grace = -1 Correct login--that's good. [WARN] 0x0x84b9520[SOGoWebDAVAclManager] entry '{DAV:}write' already exists in DAV permissions table [WARN] 0x0x84b9520[SOGoWebDAVAclManager] entry '{DAV:}write-properties' already exists in DAV permissions table [WARN] 0x0x84b9520[SOGoWebDAVAclManager] entry '{DAV:}write-content' already exists in DAV permissions table Note: Using UTF-8 as URL encoding in NGExtensions. POST /SOGo/connect HTTP/1.1 200 27/40 1.207 - - 588K GET /SOGo/user HTTP/1.1 302 0/0 0.002 - - 8K GET /SOGo/user/view HTTP/1.1 302 0/0 0.008 - - 4K GET /SOGo/so/user/Mail HTTP/1.1 302 0/0 0.002 - - 0 Note(NGImap4Connection): using '/' as the IMAP4 folder separator. GET /SOGo/so/user/Mail/view HTTP/1.1 200 8932/0 0.444 30076 70% 1M POST /SOGo/so/user/Calendar/alarmslist?browserTime=1301381892 HTTP/1.1 200 2/0 0.007 - - 96K POST /SOGo/so/user/Mail/0/mailboxes HTTP/1.1 200 1052/0 0.091 - - 4K POST /SOGo/so/user/Mail//0/folderINBOX/unseenCount HTTP/1.1 200 13/0 0.008 - - 4K POST /SOGo/so/user/Mail/foldersState HTTP/1.1 200 23/0 0.002 - - 0 See. Notice the difference here with the successful requests (200). They are pointing toward the uid instead of the email address (/SOGo/so/user/Mail instead of /SOGo/so/user.n...@domain.com) The thing to know, is that I have a particular configuration, using the mail address (ie user.n...@domain.com) as login for IMAP, and id field in LDAP (ie user) to log on SOGo. To make it work with the SOGo integrator, I deleted the override of the common-dialog in the Thunderbird's plugin (to be able to enter another username than the email address). You *can* do this, but you have to be very careful that the correct information is passed to SOGo such that it can access both its information (addressbook and calendar in database and email in mailstore) using ldap binds and searches (see pages 16-18 of manual). Steve -- users@sogo.nu https://inverse.ca/sogo/lists
Re: [SOGo] Error 404 before using the SOGo Web interface
Hello again, I think you didn't understand what my problem is. I did configure the SOGo sources so that I can access to everything I needed (such as mail, calendar and addresses), and it works while I do at least one connection through the web interface. I will take and example of what bother me : If the first person to connect to SOGo use the web interface, it's ok, everything works well. If the first person use Thunderbird to connect to SOGo, he won't have an access to it's calendars, nor address books before one connect to the web interface. He will get the 404 every time. Another problem is that I have to do that trick every morning. I don't know if it's clearer. Thanks for your help Yvan Le 03/30/2011 03:59 PM, Stephen Ingram a écrit : Yvan- Yvan LE BOUFFANT wrote: First of all, I'm new using SOGo, and find that's a very good product (a bit difficult to setup, but I managed to do it), so I would like to thank you for all of that. I had a trouble, and I didn't find any solution on the net. The problem is that I can't connect to SOGo through the SOGo Integrator since I logged once through the web interface. The requests returns are : REPORT /SOGo/dav/user.n...@domain.com/Contacts HTTP/1.1 404 62/0 0.590 - - 0 REPORT /SOGo/dav/user.n...@domain.com/Calendar HTTP/1.1 404 62/0 0.588 - - 0 The '404' indicates that SOGo can't find this user entry. You might check the database (sogo_folder_info) to see that the correct user was created since you are using uid to login instead of the email address it is apparently looking for. After logged in, I've got that : REPORT /SOGo/dav/user.n...@domain.com/Contacts/people/ HTTP/1.1 207 127/341 2.004 - - 0 REPORT /SOGo/dav/user.n...@domain.com/Calendar/personal/ HTTP/1.1 207 125/245 0.044 - - 0 and between both, few lines like : WARNING(-[NSNull(misc) count]): called NSNull -count (returns 0) !!! GET /SOGo/ HTTP/1.1 200 3713/0 0.147 10215 63% 2M SOGoRootPage successful login for user 'user' - expire = -1 grace = -1 Correct login--that's good. [WARN] 0x0x84b9520[SOGoWebDAVAclManager] entry '{DAV:}write' already exists in DAV permissions table [WARN] 0x0x84b9520[SOGoWebDAVAclManager] entry '{DAV:}write-properties' already exists in DAV permissions table [WARN] 0x0x84b9520[SOGoWebDAVAclManager] entry '{DAV:}write-content' already exists in DAV permissions table Note: Using UTF-8 as URL encoding in NGExtensions. POST /SOGo/connect HTTP/1.1 200 27/40 1.207 - - 588K GET /SOGo/user HTTP/1.1 302 0/0 0.002 - - 8K GET /SOGo/user/view HTTP/1.1 302 0/0 0.008 - - 4K GET /SOGo/so/user/Mail HTTP/1.1 302 0/0 0.002 - - 0 Note(NGImap4Connection): using '/' as the IMAP4 folder separator. GET /SOGo/so/user/Mail/view HTTP/1.1 200 8932/0 0.444 30076 70% 1M POST /SOGo/so/user/Calendar/alarmslist?browserTime=1301381892 HTTP/1.1 200 2/0 0.007 - - 96K POST /SOGo/so/user/Mail/0/mailboxes HTTP/1.1 200 1052/0 0.091 - - 4K POST /SOGo/so/user/Mail//0/folderINBOX/unseenCount HTTP/1.1 200 13/0 0.008 - - 4K POST /SOGo/so/user/Mail/foldersState HTTP/1.1 200 23/0 0.002 - - 0 See. Notice the difference here with the successful requests (200). They are pointing toward the uid instead of the email address (/SOGo/so/user/Mail instead of /SOGo/so/user.n...@domain.com) The thing to know, is that I have a particular configuration, using the mail address (ie user.n...@domain.com) as login for IMAP, and id field in LDAP (ie user) to log on SOGo. To make it work with the SOGo integrator, I deleted the override of the common-dialog in the Thunderbird's plugin (to be able to enter another username than the email address). You *can* do this, but you have to be very careful that the correct information is passed to SOGo such that it can access both its information (addressbook and calendar in database and email in mailstore) using ldap binds and searches (see pages 16-18 of manual). Steve -- users@sogo.nu https://inverse.ca/sogo/lists
Re: [SOGo] Error 404 before using the SOGo Web interface
Yvan LE BOUFFANT wrote: Hello again, I think you didn't understand what my problem is. I did configure the SOGo sources so that I can access to everything I needed (such as mail, calendar and addresses), and it works while I do at least one connection through the web interface. I will take and example of what bother me : If the first person to connect to SOGo use the web interface, it's ok, everything works well. If the first person use Thunderbird to connect to SOGo, he won't have an access to it's calendars, nor address books before one connect to the web interface. He will get the 404 every time. Another problem is that I have to do that trick every morning. I don't know if it's clearer. I think I see now. So your Thunderbird setup is somehow taking advantage of the session after having been established by the correct login on the browser. How did you alter the Thunderbird plugin? Are you changing the sogo-config.js file in the content directory? What changes did you make? Steve -- users@sogo.nu https://inverse.ca/sogo/lists
Re: [SOGo] Error 404 before using the SOGo Web interface
I only suppress the line 132 in chrome/content/global/common-dialog-overlay.js : loginContainer.hidden = true; That way, the login is still accessible, and I can change it (because default is email address). Le 03/30/2011 04:28 PM, Stephen Ingram a écrit : Yvan LE BOUFFANT wrote: Hello again, I think you didn't understand what my problem is. I did configure the SOGo sources so that I can access to everything I needed (such as mail, calendar and addresses), and it works while I do at least one connection through the web interface. I will take and example of what bother me : If the first person to connect to SOGo use the web interface, it's ok, everything works well. If the first person use Thunderbird to connect to SOGo, he won't have an access to it's calendars, nor address books before one connect to the web interface. He will get the 404 every time. Another problem is that I have to do that trick every morning. I don't know if it's clearer. I think I see now. So your Thunderbird setup is somehow taking advantage of the session after having been established by the correct login on the browser. How did you alter the Thunderbird plugin? Are you changing the sogo-config.js file in the content directory? What changes did you make? Steve -- users@sogo.nu https://inverse.ca/sogo/lists
Re: [SOGo] Error 404 before using the SOGo Web interface
Yvan LE BOUFFANT wrote: I only suppress the line 132 in chrome/content/global/common-dialog-overlay.js : loginContainer.hidden = true; That way, the login is still accessible, and I can change it (because default is email address). So (without the help of your Web login) your Thunderbird login is not working properly at all You can change chrome/content/sogo-config.js such that SOGo will use whatever you want to login. However, why wouldn't you change this setup as I suggested (with an ldap search) such that you could simply login with the ldap uid (userid) and allow ldap to handle the magic of converting over to the email address in the background? This would avoid the extra entry of the login that you are trying to suppress. Steve -- users@sogo.nu https://inverse.ca/sogo/lists