Bug 2379

Summary: prompt for password after authentication timeout
Product: Claws Mail (GTK 2) Reporter: Robert <rs>
Component: POP3Assignee: users
Status: NEW ---    
Severity: enhancement    
Priority: P3    
Version: 3.8.0   
Hardware: PC   
OS: Linux   
Attachments:
Description Flags
patch for non-password auth errors
none
updated patch
none
example poprc with non-password error strings none

Description Robert 2011-03-10 22:38:09 UTC
Once a week or so my POP3 server times out during authentication. When this happens, claws will ask me for my password again.  The error message for a bad password is different, so it seems like this shouldn't be necessary.

Timeout:
[16:09:42] POP3< -ERR Connect attempt failed: server may be down or too busy to respond.

Bad password:
[16:35:24] POP3< -ERR Logon failure: unknown user name or bad password.
Comment 1 Robert 2012-02-15 16:49:18 UTC
Created attachment 1077 [details]
patch for non-password auth errors

I've recently started using DavMail to interface with an Exchange server via EWS, and the EWS server is a little flaky. So sometimes I get "EWS end point not available". This causes the same issue as the connect attempt failure - I get prompted for my password on the next attempt.  This happens much more frequently than the previous error, which finally drove me to fix it.

The attached patch adds a hardcoded list of string which are compared against the ERR string during authentication. If the error matches a string in the list, the error code is changed from PS_AUTHFAIL to PS_ERROR. The error is logged, but the user will not be prompted for their password on the next connection attempt.

Patch is against 3.8.0.
Comment 2 Robert 2012-02-21 16:28:06 UTC
Created attachment 1081 [details]
updated patch

A new non-error error popped up today. I don't want to have to rebuild claws every time this happens, so I rewrote the patch to read a config file for non-password errors instead of hardcoding them.
Comment 3 Robert 2012-02-21 16:30:01 UTC
Created attachment 1082 [details]
example poprc with non-password error strings

example poprc config file with the 3 non-password auth errors I've collected so far.