[email] Support POP3 servers which immediately disconnect after any authentication problem.

NEW
Unassigned

Status

Firefox OS
Gaia::E-Mail
3 years ago
3 years ago

People

(Reporter: leonardot, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

3 years ago
User Agent: Mozilla/5.0 (X11; Linux i686; rv:32.0) Gecko/20100101 Firefox/32.0
Build ID: 20140923175406

Steps to reproduce:

Flame reference phone.
Software: Boot2Gecko 1.4.0.0-prerelease
Last update: 28/09/2017

Config e-mail account POP3+SMTP


Actual results:

Error messagge (via adb logcat) "The server does not support UIDL, which is required"

I/Gecko   (19824): WWAR: PROBE:POP3 sad. pop-server-not-great | The server does not support UIDL, which is required. | undefined
I/Gecko   (19824): WLOG: PROBE:SMTP connected, checking address validity
I/Gecko   (19824): WLOG: PROBE:SMTP happy



Expected results:

should connect because the POP3 server does support UIDL:

CAPA
+OK Capability list follows
TOP
USER
LOGIN-DELAY 0
EXPIRE NEVER
UIDL
RESP-CODES
AUTH-RESP-CODE
X-MANGLE
X-MACRO
X-LOCALTIME Mon, 29 Sep 2014 19:01:47 -0300
IMPLEMENTATION Qpopper-version-4.0.9
(Reporter)

Comment 1

3 years ago
[Blocking Requested - why for this release]:
Keywords: fixed1.4
(Reporter)

Updated

3 years ago
Keywords: fixed1.4
So our probe logic actually issues the command: "UIDL 1" and then if that works, it tries "TOP 1 0".  If either of those generate an error, we return the "pop-server-not-great" error.

Since you are adept at running commands against your POP3 server manually (hooray! :), could you run those two commands in sequence after logging in and see if your server is possibly generating an error in response to those requests?  Thanks!
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(leonardot)
(Reporter)

Comment 3

3 years ago
Hi Andrew,

If I don't have e-mail in INBOX:

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
STAT
+OK 0 0
UIDL 1
-ERR Message 1 out of range.
TOP 1 0
-ERR Message 1 does not exist.
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

If I have e-mail on INBOX:

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
STAT
+OK 1 812
UIDL 1
+OK 1 _,+"!=-L!![2/"!/"B!!
TOP 1 0
+OK Message follows
Return-Path: <leonardo@tadei.com.ar>
X-Original-To: leonardot@pegasusnet.com.ar
Delivered-To: leonardot.pgs@iServer04.pegasus-net.com.ar
Received: from [192.168.0.22] (OL45-149.fibertel.com.ar [24.232.149.45])
	by iServer04.pegasus-net.com.ar (Postfix) with ESMTP id BE85E42372
	for <leonardot@pegasusnet.com.ar>; Mon, 29 Sep 2014 20:47:51 -0300 (ART)
Message-ID: <1412034465.4101.239.camel@praxisviii.intranet.com>
Subject: probando
From: Leonardo Tadei <leonardo@tadei.com.ar>
To: Leonardo Tadei <leonardot@pegasusnet.com.ar>
Date: Mon, 29 Sep 2014 20:47:45 -0300
Content-Type: text/plain; charset="UTF-8"
X-Mailer: Evolution 3.4.4-3 
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
X-UIDL: _,+"!=-L!![2/"!/"B!!

.
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

The error message via adb logcat it's the same (with message or whitout message):

I/Gecko   (21973): WWAR: PROBE:POP3 sad. pop-server-not-great | The server does not support UIDL, which is required. | undefined

Some times, I get also:

E/GeckoConsole(21973): [JavaScript Error: "Socket not open." {file: "jar:file:///system/b2g/omni.ja!/components/TCPSocket.js" line: 657}]
I/GeckoDump(21973): ERR: onerror reporting: NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "Socket not open." {file: "jar:file:///system/b2g/omni.ja!/components/TCPSocket.js" line: 657}]'[JavaScript Error: "Socket not open." {file: "jar:file:///system/b2g/omni.ja!/components/TCPSocket.js" line: 657}]' when calling method: [nsIDOMTCPSocket::send] @ app://email.gaiamobile.org/js/ext/mailapi/main-frame-setup.js : 1841
E/GeckoConsole(21973): [JavaScript Error: "NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS: [JavaScript Error: "Socket not open." {file: "jar:file:///system/b2g/omni.ja!/components/TCPSocket.js" line: 657}]'[JavaScript Error: "Socket not open." {file: "jar:file:///system/b2g/omni.ja!/components/TCPSocket.js" line: 657}]' when calling method: [nsIDOMTCPSocket::send]" {file: "app://email.gaiamobile.org/js/ext/mailapi/main-frame-setup.js" line: 1841}]

but the following message it's:

I/Gecko   (21973): WWAR: PROBE:POP3 sad. pop-server-not-great | The server does not support UIDL, which is required. | undefined
I/Gecko   (21973): WLOG: PROBE:SMTP connected, checking address validity
I/Gecko   (21973): WLOG: PROBE:SMTP happy

then, the connection to server is fine :-?

The sequence "UIDL 1" -> "TOP 1 0" sound good for check new mail, but It isn't correct for the configuration process, because If not any mail, these commands fail.

Please, tell me if You need another test.
Best regards.


PS: sorry my english... I speak spanish every day :)
Flags: needinfo?(leonardot)
(In reply to leonardot from comment #3)
> If I don't have e-mail in INBOX:
...
> The sequence "UIDL 1" -> "TOP 1 0" sound good for check new mail, but It
> isn't correct for the configuration process, because If not any mail, these
> commands fail.

So, if "UIDL 1" fails, we should failover to just running "UIDL".  And if that doesn't return an error, we should be okay with the server.  Can you run "UIDL" on its own and see how that performs when the INBOX is empty?  It seems like that must be returning an error for us somehow...

> PS: sorry my english... I speak spanish every day :)

Tu hablas ingles mas bueno que yo hablo espanol!
Flags: needinfo?(leonardot)
(Reporter)

Comment 5

3 years ago
Hi Andrew,

If I have e-mail on INBOX:

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
STAT
+OK 1 1156
UIDL
+OK uidl command accepted.
1 V58!!UYb!!\3M!!X#&"!
.
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

If I don't have e-mail in INBOX:

-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
STAT
+OK 0 0
UIDL
+OK uidl command accepted.
.
-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

I send STAT command for see the status of spool previusly.

Regards!
Flags: needinfo?(leonardot)
Hmm. If the server you're referring to is mail.pegasusnet.com.ar, it's Qpopper 4, which claims to be a pretty decent POP3 server. The only thing that stands out as weird is their FAQ on UIDLs:

http://www.eudora.com/products/unsupported/qpopper/faq.html#3.0.uidl

In which they use somewhat random-seeming characters. However, we don't actually care about that in our probing process, so that shouldn't matter.

I do get errors running UIDL when not logged in; maybe we're not actually successful at logging in but for some reason it thinks we did?

Apart from that, hard to say what's actually going on here without the protocol log.
(Reporter)

Comment 7

3 years ago
Hello Marcus,

the calculation of UIDL in QPopper is in full conformance with RFC 1939 (yes, look strange, but is valid)

I recently change the security certificate (We always use autosigned certificates) in order to pass the setup process.

I am the sysadmin of that server (and others too): I have full access to log, but the SSL connection it isn't trivial to log on the wire :-( The system log show the conection from phone, but then, seems the something response is inesperated or not processed.

How I do a better protocol log for see what happen?


PS: I can create a mail account for debugging for limited time if You want. Please, contact me in private.
I've sent you an e-mail, CCed with :asuth. A test account would be most helpful, thanks much for the offer.
Assignee: nobody → m
(Reporter)

Comment 9

3 years ago
E-mail account created and send You e-mail with configuration data.

PS: in Latin America (and Africa and middle East) very much e-mail server support only POP to order force users to download e-mail. This is for saving disk space in hosting servers. The provider which support IMAP, have a very low quota on disk (ie 300Mb for web site and all e-mail accounts), then the mail have to download to don't full yours disk. Sad, but true...
Here's what's happening. First, we attempt APOP auth (because the server indicates it supports APOP via the server's greeting) and receive the following error:

-ERR [SYS/TEMP] POP authentication DB not available (user $USERNAME): No such file or directory (2)

Then, the server immediately disconnects us. Normally, in the face of an error like that, we'd just attempt the next auth method (AUTH PLAIN or USER/PASS), and save whichever auth method was successful.

While that error is potentially something you'll want to look into, we're still stuck on our end in other cases -- the server also disconnects immediately upon receiving an invalid username or password, so we end up with the same type of error, classified incorrectly as "no UIDL".

So, in order to fix this error on our side, we'll need to implement connection logic that deals with servers who disconnect on invalid auth (for whatever reason), rather than assuming the server will let us continue trying alternate auth methods in the face of failure.

I'm done with the test account now, so you can delete it if you'd like.
Summary: UIDL not supported on create POP3 account - mail app → [email] Support POP3 servers which immediately disconnect after any authentication problem.
Assignee: m → nobody
You need to log in before you can comment on or make changes to this bug.