On Mon October 18 2004 10:07, Charles Lindsey wrote:
So a Dual-Use User Agent needs some better way to determine whether the
message in hand is an email message or a news article. The proper way to
do this is to keep track of where it got it from.
A couple of typical cases are:
a) it "got it from" a flat mbox-like file or a single text message file
b) it "got it from" an IMAP "folder"
In neither case is there any information to indicate the distinction
between an "email" message vs. a "news" message. In either case,
the message may have passed through one or more gateways
between news transport and mail transport. Another somewhat
more unusual case is:
c) it "got it from" an NNTP server after having passed through a
mail-to-news gateway
I believe that case might apply for some people who read *this*
mailing list; N.B. this is a mailing list, not a newsgroup, and if one
insists on making a distinction, the messages sent by this list's
expander are unquestionably mail.
As Ned Freed has explained to you, if there is a legitimate need to
be able to make a distinction, there is a standardized mechanism
available via RFC 3458. However I doubt that there is such a
need in the first place, and I doubt that any mechanism (including
RFC 3458) will work reliably when messages pass through gateways,
are copied to files, moved and/or copied between folders, etc.
If it arrived by NNTP
from a news-server, then it was a news article; if it arrived via SMTP or
from a message store which obtained it from SMTP, then it is an email
message.
And if it was delivered via SMTP to a mail-to-news gateway, then
transported via NNTP? Or transported via NNTP to a news-to-mail
gateway, then delivered via SMTP? What if it was delivered via
UUCP? Or accessed via IMAP?
If an Agent is setting out to be for "dual-use" between two
media, then it behoves it to know which medium it is handling at any given
moment.
It's handling "messages". When a message is being transported, it
might be transported via a news-specific protocol, or via a mail-specific
protocol, or via a protocol which is non-specific. Once it has been
transported, it is simply a message.
And if it absolutely MUST guess which medium it is from examination of the
message, then a better discriminator would be the presence or absence of a
Return-Path header, of a "^From " line.
Return-Path fields are only inserted by SMTP when making final delivery;
they do not exist for mail delivered via UUCP (for example). "^From " lines
are an artifact of a particular storage format, not of the means of
transportation that a message may have been subjected to. Newsreaders
(e.g. trn) save "news" messages in that format.