Closed Bug 242904 Opened 20 years ago Closed 19 years ago

NNTP server error - connect to news uses POP port and mail server address

Categories

(MailNews Core :: Networking: NNTP, defect)

x86
Windows NT
defect
Not set
major

Tracking

(Not tracked)

RESOLVED EXPIRED

People

(Reporter: uwe.krutschinna, Assigned: sspitzer)

Details

User-Agent:       Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7b) Gecko/20040421
Build Identifier: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7b) Gecko/20040421

Posting to news fails under certain conditions.

Reason: for first connect to news server the account data (port and address) of
the mail account is used

Reproducible: Always
Steps to Reproduce:
0. Launch Mozilla (Quick Launch not activated)
1. Open Mailnews (do not expand news account to list groups!)
2. Create new message, select to post to newsgroup and add name of 
   group manually in recipient list
3. Add subject and body
4. Try to post -> error message:

   Sending of message failed
   The message could not be posted because connecting to the news server failed.
   The server may be unavailable or is refusing connections. Please verify that 
   your news server setting is correct and try again, or else contact your
   network administrator.

   Could not connect to server news; the connection was refused

   ==> see log file in additional information

5. Save message to drafts folder
6. Close mozilla

7. Lauch mozilla and mailnews window again
8. Expand news account in left panel to list subscribed groups !!!
9. Try to post same message again --> OK !!!

   ==> see log file in additional information

After writing some mails and using MailNews for daily work again, the problem 
in posting to news will appear again (conditions?).

Collapsing and expanding news account will always fix the problem!!!

This behaviour appeared starting with Mozilla 1.7A. I did definitively not
observe it with previous versions.

To test it I installed Mozilla 1.6 again without changing the profile and
executed the same scenarios as above -> OK

==> see log file in additional information

After upgrade to 1.7RC1 again the problem appeared again as described above.
Actual Results:  
see steps above

Expected Results:  
no errors

Log File of first try without expansion of news accout list -> posting NOK
(1.7RC1)
--------------------------------------------------------------------------

0[751400]: (4331e80) setting busy to 0
0[751400]: (4331e80) creating
0[751400]: (4331e80) initializing, so unset m_currentGroup
0[751400]: (4331e80) setting busy to 1
0[751400]: (4331e80) opening connection to news on port 110    !!POP port!!
0[751400]: (4331e80) setting busy to 1
0[751400]: (4331e80) ParseURL
0[751400]: (4331e80) fullPath = /<mail server>                 !!mail server!!
0[751400]: (4331e80) m_messageID = (null)
0[751400]: (4331e80) group = <mail server>                     !!mail server!!
0[751400]: (4331e80) commandSpecificData = (null)
0[751400]: (4331e80) m_key = -1
0[751400]: (4331e80) ClosingSocket()
0[751400]: (4331e80) CleanupAfterRunningUrl()
0[751400]: (4331e80) setting busy to 0
0[751400]: (4331e80) destroying

Log File of second try with expansion of news accout list -> posting OK
(1.7 RC1)
------------------------------------------------------------------------

0[751400]: (4020a60) setting busy to 0
0[751400]: (4020a60) creating
0[751400]: (4020a60) initializing, so unset m_currentGroup
0[751400]: (4020a60) setting busy to 1
0[751400]: (4020a60) opening connection to news on port 110    !!POP port!!
0[751400]: (4020a60) setting busy to 1
0[751400]: (4020a60) ParseURL
0[751400]: (4020a60) fullPath = /<mail server>                 !!mail server!!
0[751400]: (4020a60) m_messageID = (null)
0[751400]: (4020a60) group = <mail server>                     !!mail server!!
0[751400]: (4020a60) commandSpecificData = (null)
0[751400]: (4020a60) m_key = -1
0[751400]: (403c9e0) setting busy to 0
0[751400]: (403c9e0) creating
0[751400]: (403c9e0) initializing, so unset m_currentGroup
0[751400]: (403c9e0) setting busy to 1
0[751400]: (403c9e0) opening connection to news on port 110    !!POP port!!
0[751400]: (403c9e0) setting busy to 1
0[751400]: (403c9e0) ParseURL
0[751400]: (403c9e0) fullPath = /<mail server>
0[751400]: (403c9e0) m_messageID = (null)
0[751400]: (403c9e0) group = <mail server>
0[751400]: (403c9e0) commandSpecificData = (null)
0[751400]: (403c9e0) m_key = -1
0[751400]: (403c9e0) ClosingSocket()
0[751400]: (403c9e0) CleanupAfterRunningUrl()
0[751400]: (403c9e0) setting busy to 0
0[751400]: (403c9e0) destroying
0[751400]: (4020a60) ClosingSocket()
0[751400]: (4020a60) CleanupAfterRunningUrl()
0[751400]: (4020a60) setting busy to 0
0[751400]: (4020a60) destroying
0[751400]: (406b910) setting busy to 0
0[751400]: (406b910) creating
0[751400]: (406b910) initializing, so unset m_currentGroup
0[751400]: (406b910) setting busy to 1
0[751400]: (406b910) opening connection to news on port 119     !!correct port!!
0[751400]: (406b910) setting busy to 1
0[751400]: (406b910) ParseURL
0[751400]: (406b910) fullPath = /
0[751400]: (406b910) m_messageID = (null)
0[751400]: (406b910) group = (null)
0[751400]: (406b910) commandSpecificData = (null)
0[751400]: (406b910) m_key = -1
0[751400]: (406b910) Next state: NNTP_RESPONSE 
0[751400]: (406b910) Receiving: 200 <news server> NNTPcache server V2.4.0b5 [see
www.nntpcache.org]  (c) 1996-2000 Julian Assange <proff@iq.org> Nov 23 2001
ready (posting ok, 28728 groups available).
0[751400]: (406b910) Next state: NNTP_LOGIN_RESPONSE
0[751400]: (406b910) Next state: NNTP_SEND_MODE_READER
0[751400]: (406b910) Sending: MODE READER0[751400]: (406b910) Next state:
NNTP_RESPONSE
0[751400]: (406b910) Receiving: 200 <news server> NNTPcache server V2.4.0b5 [see
www.nntpcache.org]  (c) 1996-2000 Julian Assange <proff@iq.org> Nov 23 2001
ready (posting ok, 28728 groups available).
0[751400]: (406b910) Next state: NNTP_SEND_MODE_READER_RESPONSE
0[751400]: (406b910) Next state: SEND_FIRST_NNTP_COMMAND
0[751400]: (406b910) Next state: NEWS_DISPLAY_NEWS_RC
   :
0[751400]: (406b910) Next state: NEWS_DISPLAY_NEWS_RC_RESPONSE
0[751400]: (406b910) Next state: NEWS_DISPLAY_NEWS_RC
0[751400]: (406b910) Next state: NEWS_DONE
0[751400]: (406b910) Next state: NEWS_FREE
0[751400]: (406b910) CleanupAfterRunningUrl()
0[751400]: (406b910) setting busy to 0
0[751400]: (406b910) setting busy to 1
0[751400]: (406b910) setting busy to 1
0[751400]: (406b910) ParseURL
0[751400]: (406b910) fullPath = /<mail server>                 !!mail server!!
0[751400]: (406b910) m_messageID = (null)
0[751400]: (406b910) group = <mail server>
0[751400]: (406b910) commandSpecificData = (null)
0[751400]: (406b910) m_key = -1
0[751400]: (406b910) Next state: SEND_FIRST_NNTP_COMMAND
0[751400]: (406b910) Sending: POST0[751400]: (406b910) Next state: NNTP_RESPONSE
0[751400]: (406b910) Receiving: 340 Ok
0[751400]: (406b910) Next state: SEND_FIRST_NNTP_COMMAND_RESPONSE
0[751400]: (406b910) Next state: SETUP_NEWS_STREAM
0[751400]: (406b910) Next state: NNTP_SEND_POST_DATA
0[751400]: (406b910) nsNNTPProtocol::PostData()
0[751400]: (406b910) Sending: Date: Tue, 04 May 2004 11:41:00 +0200
   : 
0[751400]: (406b910) Sending: .0[751400]: (406b910) Next state: NNTP_RESPONSE
0[751400]: (406b910) Receiving: 240 Article posted
0[751400]: (406b910) Next state: NNTP_SEND_POST_DATA_RESPONSE
0[751400]: (406b910) Next state: NEWS_POST_DONE
0[751400]: (406b910) NEWS_POST_DONE
0[751400]: (406b910) Next state: NEWS_FREE
0[751400]: (406b910) CleanupAfterRunningUrl()
0[751400]: (406b910) setting busy to 0

Log file of execution of the first scenario with 1.6
-----------------------------------------------------

0[761400]: (4179e90) setting busy to 0
0[761400]: (4179e90) creating
0[761400]: (4179e90) initializing, so unset m_currentGroup
0[761400]: (4179e90) setting busy to 1
0[761400]: (4179e90) opening connection to news on port 119
0[761400]: (4179e90) setting busy to 1
0[761400]: (4179e90) ParseURL
0[761400]: (4179e90) fullPath = /
0[761400]: (4179e90) m_messageID = (null)
0[761400]: (4179e90) group = (null)
0[761400]: (4179e90) commandSpecificData = (null)
0[761400]: (4179e90) m_key = -1
0[761400]: (4179e90) Next state: NNTP_RESPONSE
0[761400]: (4179e90) Receiving: 200 <news server> NNTPcache server V2.4.0b5 [see
www.nntpcache.org]  (c) 1996-2000 Julian Assange <proff@iq.org> Nov 23 2001
ready (posting ok, 28728 groups available).
0[761400]: (4179e90) Next state: NNTP_LOGIN_RESPONSE
0[761400]: (4179e90) Next state: NNTP_SEND_MODE_READER
0[761400]: (4179e90) Sending: MODE READER0[761400]: (4179e90) Next state:
NNTP_RESPONSE
0[761400]: (4179e90) Receiving: 200 <news server> NNTPcache server V2.4.0b5 [see
www.nntpcache.org]  (c) 1996-2000 Julian Assange <proff@iq.org> Nov 23 2001
ready (posting ok, 28728 groups available).
0[761400]: (4179e90) Next state: NNTP_SEND_MODE_READER_RESPONSE
0[761400]: (4179e90) Next state: SEND_FIRST_NNTP_COMMAND
0[761400]: (4179e90) Sending: POST0[761400]: (4179e90) Next state: NNTP_RESPONSE
0[761400]: (4179e90) Receiving: 340 Ok
0[761400]: (4179e90) Next state: SEND_FIRST_NNTP_COMMAND_RESPONSE
0[761400]: (4179e90) Next state: SETUP_NEWS_STREAM
0[761400]: (4179e90) Next state: NNTP_SEND_POST_DATA
0[761400]: (4179e90) nsNNTPProtocol::PostData()
0[761400]: (4179e90) Sending: Message-ID: <40976026.8040403@alcatel.de>Date:
<date>From: <from>User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.6)
Gecko/20040113X-Accept-Language: de-de, en-us, enMIME-Version: 1.0Newsgroups:
<group>To: <to>
0[761400]: (4179e90) Sending:             <text>
0[761400]: (4179e90) Sending: .0[761400]: (4179e90) Next state: NNTP_RESPONSE
0[761400]: (4179e90) Receiving: 240 Article posted
0[761400]: (4179e90) Next state: NNTP_SEND_POST_DATA_RESPONSE
0[761400]: (4179e90) Next state: NEWS_POST_DONE
0[761400]: (4179e90) NEWS_POST_DONE
0[761400]: (4179e90) Next state: NEWS_FREE
0[761400]: (4179e90) CleanupAfterRunningUrl()
0[761400]: (4179e90) setting busy to 0
But you always select a From: identity connected with a news account, yes?
Summary: NNTP server error - connect to news uses POP port and mail server address → NNTP server error - connect to news uses POP port and mail server address
(In reply to comment #1)
> But you always select a From: identity connected with a news account, yes?

I never used the From: identity up to now, the mail addresses behind mail and
news account are the same so I saw no need to change. Up to 1.6 there was no
problem with this strategy ...
I will try to reproduce the problem using the news identity on monday.
The From: drop-down is not only used to get the mail address, but also to
determine the account to be used (see the light grey text behind the mail
address in the dropdown).
And to choose the NNTP server for sending it's necessary to tell Mozilla which
account to used.
In the 1.8 trunk contains a patch (see bug 234186) that should prevent what you
do at an early stage with appropriate error message.
This seems to be new in 1.7. I use mozilla in the company with one mail account
and one news account only (same user name and mail address, the only difference
are the server settings including login parameters). I use mozilla very often to
send mails to several recipients (To:, CC:) and to post them in the same step
into a (company internal) newsgroup (Newsgroup:). This worked well. I never
changed the From: list (was this possible already with 1.6?).
In 1.7 the result depends on what I did before: If I open the message compose
window while I have still a news group open it seems to be possible to use To:,
CC: and Newsgroup: at a time. When one of the mail folders is the active one it
seems to result in an error (to be confirmed in detail, I have no access to my
company settings at this time). This is nearly unpredictable and requires
special attention while composing the header.

By the way: I understand the reason for this change. It really makes sense to
distinguish between the identities. But then, how can I send a message to one or
more mail accounts and post it to news (different identitiesi mozilla, even if
same mail address!) at the same time in one step as it was possible up to 1.6
??? In my oppinion this was a real useful feature especially in professional
environments.

I'm still not 100% sure but I guess the behaviour was changed by my patch to bug
228597. Since this time the NNTP server used is not only determined by the
identity but also the account (which points to an unique server). So you're
right, this is new in 1.7.
Please see the bug (and bug 54911) why this was necessary.

> When one of the mail folders is the active one it seems to result in an error.
> This is nearly unpredictable and requires special attention while composing
> the header.

As I wrote, the trunk contains a patch for this problem.

> But then, how can I send a message to one or more mail accounts and post it
> to news.

You've to do this with an news identity/account.

The background why it's impossible to send to a news server via a mail
identity/account is the internal organisation.

+- Account 1
|    +- Incoming Server 1 (POP)
|    +- Identity 1
|       +- SMTP Server 1
+- Account 2
     +- Incoming Server 2 (NNTP)
     +- Identity 2
        +- SMTP Server 2

Account 1 only knows SMTP Server 1 for outgoing mail (POP can't be used for
outgoing mail) but Account 2 knows its SMTP and NNTP server (NNTP is a two way
protocol).
After some additional tests I became much more confused, because the behaviour 
is really inconsistent and the result not predictable:

- I had been used Mozilla for one hour for reading and answering mails (no
  access to news up to this time). I decided to test what you suggested but
  wanted to try to reproduce the old problem I saw before. The input folder of
  my mail account was opened, I created a mail with CC to Newsgroup: using the
  mail identity. It worked without error message. I can't reproduce the 
  difference between my initial tests and this one.

- Several minutes later the same test failed (I opened the news folder, 
  canceled the posted test message between, ...).

- I created two templates, one with mail and one with news identity. After 
  sending the news one without problem, I could send the one with mail identity
  successfully too (several times) ...

- If you have to use different identity/server you have to split drafts and
  templates too (or use the same folders for both mail and news), if you
  use a template just created for your mail identity and change the identity
  to the news one the signature will be added a second time and has to be
  removed, ... The are several things to be taken into account by the user
  who only wanted to CC a mail into a newsgroup ...

- It is possible to add Newsgroup: to the recipient list even if the mail 
  identity is used in From: list. I don't want to have changed this because I 
  expect some confusion in case of using templates and identity changes but
  this is at least an inconsistency from the users point of view.

- In my opinion the current behaviour is quite complicate to be understood
  by a "normal" user not really familar with the internal behaviour of 
  mozilla (like me).
  Personally I was quite happy with the behaviour up to Mozilla version 1.6. 
  Up to now I can't suggest to my collegues to move to 1.7 because most of them
  use mail and news in a similar manner.

- What I see from the users point of view in my preferences is the following 
  structure

  +- Account 1 (mail)
  |    +- Identity 1
  |    +- Incoming Server 1 (POP)
  |    +- SMTP Server (points to Outgoing SMTP Server)
  +- Account 2 (news)
  |    +- Incoming Server 2 (NNTP)
  |    +- Identity 2 (same content as identity 1)
  |    +- SMTP Server (points to Outgoing SMTP Server)
  +- Outgoing SMTP Server

- In my opinion the following scenario would be a better one: If in a simple 
  configuration the identity is the same for both mail and news account and
  the server of the news group to be posted to can be assigned unambiguously 
  the mail should be sent to the proper servers independently on the 
  identity/server settings in the From: field. In case of different identities
  a warning message with confirmation prompt could be sent to avoid postings
  with wrong identity by mistake.
  If the newsgroup to be posted to is subscribed on different servers the
  user should be forced to specify the proper news identity.
I can confirm the same behaviour on the Sun Solaris 9 SPARC platform build >
Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20040609

If I run a perl daemon on port 110 of the news server, it shows mozilla connects
to 110 instead of 119 as is in the preferences for this server in mozilla.  The
message ".. sending of message failed.." is pooped-up by mozilla as well.(In
reply to comment #0)
> User-Agent:       Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.7b)
Gecko/20040421

<snip>
Product: MailNews → Core
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:
Firefox:     http://www.mozilla.org/projects/firefox/
Thunderbird: http://www.mozilla.org/products/thunderbird/releases/1.5beta1.html
Seamonkey:   http://www.mozilla.org/projects/seamonkey/
This bug has been automatically resolved after a period of inactivity (see above
comment). If anyone thinks this is incorrect, they should feel free to reopen it.
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → EXPIRED
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.