Closed Bug 458625 Opened 16 years ago Closed 15 years ago

"Check for new mail at startup" has no effect without "Automatically download new messages" with pop account

Categories

(MailNews Core :: Networking: POP, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Thunderbird 3.0b4

People

(Reporter: henry.nestler, Assigned: Bienvenu)

References

()

Details

(Keywords: regression, Whiteboard: [no l10n impact])

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.6) Gecko/20070730 SUSE/2.0.0.6-25 Firefox/2.0.0.6
Build Identifier: 20081003121803

This are the settings
[x] Check for new mail at startup
[ ] Automatically download new messages
Additional: Password is not stored in password manager.

If I start TB, then it's not getting status from POP3 account. The "Check for new mail at startup" is still ignored, if "Automatically download new messages" is disabled.

The difference to Bug 94671 Comment #14 is, that no "green down arrow" is seen.


Reproducible: Always

Steps to Reproduce:
1.Have mails in a POP3 account
2.Start TB

Actual Results:  
No password questions. Don't see, that I have messages on server.


Expected Results:  
password question and a message in systray ("green down arrow")


If I change the configuration into:
[x] Check for new mail at startup
[x] Automatically download new messages
Then the password question stays on startup and messages will be load.
Henry, can you say whether this is a regression from 2.x or trunk.<something>?
Sorry, have problems with translation "regression" here. Can not decide as it is a "regression" or not.

The "2.x" you see in User-Agent is from my browser. Was autmaticly detected by bugzilla, I have no options for change while creating bugs.

This bug was found on TB3 build2, while any of the litmus tests.

Here the contents from application.ini:
[App]
Name=Thunderbird
Version=3.0a3
BuildID=20081003121803
Version: unspecified → Trunk
I can confirm using TB’s 3.01b1pre/20081122031351 build and several other ones from previous weeks (back to september) on Win2000. Mail does not get checked automatically on startup, nor periodically, not even after a manual check has been done. Using Automatically download new messages could be seen as a workaround.

For what it’s worth: I do see port 110 traffic in all cases, but apparently new mail is just not detected, unless the Auto download option is enabled.
preetham, do you also see this with a trunk build?

(Henry's initial report is from litmus test https://litmus.mozilla.org/single_result.cgi?id=152948 )
Summary: "Check for new mail at startup" has no effect without "Automatically download new messages" → "Check for new mail at startup" has no effect without "Automatically download new messages" with pop account
Have checked this with port sniffer. The follow commands have seen:
RX: +OK Hello there
TX: AUTH
RX: -ERR Invalid command
TX: CAPA
RX: +OK Here's what I can do:<cr><lf>STLS<cr><lf>TOP<cr><lf>USER<cr><lf>...
TX: USER MyUserName
RX: +OK Password required
TX: PASS ***
RX: +OK Connected to proxy server
TX: STAT
RX: +OK 1 1255
TX: QUIT
RX: +OK Bye-bye

But no message is seen in the Thunderbird, and no message in the systray.

For the workaround: If I add the "Automatically download new messages", then mails will be loaded and the info in systray is seen on startup.

Build ID: Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.9.1b3pre) Gecko/20081127 Shredder/3.0b1pre
[x] Check for new messages every [5] minutes
[ ] Automatically download new messages
This does the same pop3 commands (from comment #5) after 5 minutes, but does not inform the user.
Vseerror, thanks for changing the title. This problem exist only on POP accounts.

IMAP is working, and views the "you have new mail" on startup.
Ton, can you use the nightly builds to determine a precise regression range in september when this started happening?
Keywords: regression
OS: Linux → All
Testing several trunk versions from that month back to may last year turned out this is most likely a regression introduced between trunk versions of sept 27 and sept 28 (2007).

Henry, if you want to verify this on linux, you could use the versions found at
ftp://ftp.mozilla.org/pub/thunderbird/nightly/2007/06/2007-06-27-06-trunk/
and
ftp://ftp.mozilla.org/pub/thunderbird/nightly/2007/06/2007-06-28-03-trunk/ .
Blocks: 156998
(In reply to comment #9)
> this is most likely a regression introduced between trunk versions of sept 27
> and sept 28 (2007).
> 
> Henry, if you want to verify this on linux, you could use the versions found at

Thanks.

> ftp://ftp.mozilla.org/pub/thunderbird/nightly/2007/06/2007-06-27-06-trunk/

version 3.0a1pre (20070627)
BuildID = "2007062706"
Yes, this plays a sound on startup for mails in inbox. - without downloading.
No message in systry so far. But, this was never seen under Linux for TB at 2007.

> ftp://ftp.mozilla.org/pub/thunderbird/nightly/2007/06/2007-06-28-03-trunk/ .

version 3.0a1pre (20070628)
BuildID = "2007062803"
This has no user notifications.
lets confirm the bugger
Severity: minor → normal
Status: UNCONFIRMED → NEW
Component: Account Manager → Networking: POP
Ever confirmed: true
Product: Thunderbird → Core
QA Contact: account-manager → networking.pop
Ton, I guess you were right in cc'ing me as it seems my last years patch in bug 156998 caused that.

Line 1970 in nsPop3Protocol.cpp
1969 if(m_pop3ConData->only_check_for_new_mail&&!m_pop3ConData->leave_on_server &&
1970    m_pop3ConData->size_limit <= 0)
was a test for < 0 before and thus never entered since from all I can see, size_limit is either 0 or a positive limit.

I don't have a clue what the code in that if is for. But I think it could be given a meaning by the following change
- m_pop3ConData->biffstate = nsIMsgFolder::nsMsgBiffState_NewMail;
+ m_nsIPop3Sink->SetBiffStateAndUpdateFE(m_pop3ConData->biffstate, m_pop3ConData->number_of_messages, PR_TRUE);

Quitting at this point saves us a LIST and UIDL which are used to evaluate which of the messages on the server is really new. Since we're only stepping into that code if we don't have leave_on_server, every message should be really new.
An exception is the case in that the user previously has used leave on server and is checking the messages the first time after he switched it off.

I don't know if we want to have this shortcut with the possible drawback or just kick the whole if. I can't test this for the next time, maybe someone else can and supply a patch.
Same symptoms as comment in SeaMonkey:
Build identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20081219 SeaMonkey/2.0a3pre

[x] Check for new messages every [10] minutes
[ ] Automatically download new messages

4 pop accounts, all set to check at different time intervals (10min, 11min, 12min, 13min) - no notification of new messages. Get msgs for the accounts or Get all new msgs works without issue.
Flags: wanted-thunderbird3?
(In reply to comment #12)
> Since we're only stepping into that code if we don't have leave_on_server

I see this bug irrespective of the state of "Leave messages on server" and since that checkbox in Server Settings is, as far as I can tell, linked to the same pref as m_pop3ConData->only_check_for_new_mail that suggests that this is not the source of the problem. m_pop3ConData->only_check_for_new_mail appears in other places of that patch, though, e.g. the removed/renamed/moved GetFakeUidlTop().
Product: Core → MailNews Core
Flags: blocking-thunderbird3?
This sounds like a bug that could be quite easily tested with a fake server based unit test.
as a regression, this should be approved blocking or wanted to raise TB3 visibility
Yeah I think we need this.
Flags: wanted-thunderbird3?
Flags: blocking-thunderbird3?
Flags: blocking-thunderbird3+
Whiteboard: [for likely code that causes it, see comment 12]
Whiteboard: [for likely code that causes it, see comment 12] → [for likely code that causes it, see comment 12][no l10n impact]
Target Milestone: --- → Thunderbird 3.0b4
Assignee: nobody → bienvenu
Status: NEW → ASSIGNED
Attached patch proposed fixSplinter Review
I'm hoping ch.ey might have a chance to look this over too, but requesting r/sr from standard8.

The fix is in two parts - make sure we init the prefs even when just checking for new mail, so that the leave_on_server setting will be set correctly, and if leave on server is set, we need to continue on to list msgs to see if any of them are new...This works for me, and I use pop3 for a couple of my main accounts, with leave on server set.

Adding a unit test for this should be possible, I think, if there's a way of finding the biff state of the inbox separate from the new mail alert...
Attachment #396505 - Flags: superreview?(bugzilla)
Attachment #396505 - Flags: review?(bugzilla)
Whiteboard: [for likely code that causes it, see comment 12][no l10n impact] → [no l10n impact][has patch for review]
(In reply to comment #19)
> Adding a unit test for this should be possible, I think, if there's a way of
> finding the biff state of the inbox separate from the new mail alert...

Are you talking about not trying to show the window alert etc? If so, see test_pop3GetNewMail.js for an example - we just disable various prefs to disable those alerts.
Attachment #396505 - Flags: superreview?(bugzilla)
Attachment #396505 - Flags: superreview+
Attachment #396505 - Flags: review?(bugzilla)
Attachment #396505 - Flags: review+
That does it for me too and is quite what I meant in comment #12.

Only I'd either change
  if (!m_pop3ConData->only_check_for_new_mail)
to
  else

or combine the nested ifs
  if (m_pop3ConData->only_check_for_new_mail)
  {
    if (!m_pop3ConData->leave_on_server)
    {
to one if. In my opinion that makes it clearer.
fix checked in, with if clauses combined into one, thx, Christian.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Whiteboard: [no l10n impact][has patch for review] → [no l10n impact]
Where can I check this?

The bug still exist in this nightly build:
Mozilla/5.0 (X11; U; Linux i686 (x86_64); de; rv:1.9.1.4pre) Gecko/20090913 Shredder/3.0b4pre
There must be something else wrong. I can't test on Linux right now, but SeaMonkey on Windows shows a tray icon as well as an alert, Thunderbird only the tray icon (biff settings are equal).
Anyway, since both apps share the background code and it least works for the tray icon the problem you're seeing is not this bug.
Ok. I see. Under Windows exist a cover in systry, and a mouse hover give the count of new messages.

Under Linux such cover does not exist permanently. Only a message box with preview of received messages would see, like a "Ballon message" (I have KDE 3.5).

So, I confirm this bug as fixed. Thanks.
Working for me. Thanks

Build identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.4pre) Gecko/20090914 Lightning/1.0pre SeaMonkey/2.0pre
VERIFIED per comment #24 to 26.
Status: RESOLVED → VERIFIED
No longer blocks: 506609
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: