Unable to authenticate over IMAP/SMTP after server migration
Question asked by Ali Mualla - September 3, 2017 at 6:55 PM
Unanswered
Hi all,
 
I took advantage of the weekend to migrate my small SmarterMail installation to a new server installation. I have done a couple of times before in the 5+ years I have been using SmarterMail without any issues. I followed my usual routine of installing and configuring the latest version of SmarterMail (16.2.6442) in the newly installed and configured server. I created my users with the same usernames. Finally, I stopped SmarterMail on the old server, zipped the data folder, copied and unzipped it on the new server.
 
Now, I am able to login, and send and receive emails with all users using the webmail interface without issue. However, when I try to connect over IMAP or SMTP using outlook, authentication fails. When I check the SMTP log file, I see I get "535 Authentication failed". However, the IMAP logfile has only one message:
 
System.Net.Sockets.SocketException (0x80004005): Only one usage of each socket address (protocol/network address/port) is normally permitted
   at System.Net.Sockets.Socket.DoBind(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.Sockets.Socket.Bind(EndPoint localEP)
   at MailService.TcpServerLib.Common.PooledTcpServer.#I5(IPEndPoint #L8i)
 
I suspect this was from when I tried to bind both plain IMAP and IMAP with TLS on the same port on the same IP. I have disabled plain IMAP now, but still no logs in the IMAP log file. The certificate is valid, and neither outlook nor chrome are complaining about it. Netstat tells me mailservice.exe is listening on both ports 25 and 143. I have created firewall rules to allow incoming connections on those ports.
 
debuglog had several exceptions saying "AddMessage called with UID xxxx", but nothing is written there when I try to authenticate using outlook.
 
What am I missing? Is there any configuration to enable more detailed logs?
 
EDIT: I enabled detailed logs on IMAP, and outlook is able to connect and negotiate TLS. It is failing on the LOGIN imap command. I have tested using several accounts with the same result. Using webmail, however, they are able to login.

1 Reply

Reply to Thread
0
Ali Mualla Replied
Like in the Declude thread, I managed to solve the issue. I still don't know what the problem is/was exactly, but checking the Domains/domain.com/Users between the new installation (post restore) and the backup of the old installation using WinMerge I noticed that the userConfig.xml files were different. Specifically, the password strings were different. I find this weird since I am able to login through the webmail. Anyway, I stopped the SmarterMail service, stopped the IIS site (just to be safe), and copied all userConfig.xml files for all users (using WinMerge's folder compare). Started the service, and started the IIS site, and this time logins worked both on webmail and outlook :)
 
As I said in my original post, I've moved servers before without issue. I'm curious to know whether a user's password is stored anywhere else besides their userConfig.xml, as I had initially used other passwords when creating the users upon installing SmarterMail.

Reply to Thread