🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: demon.ip.developers
Article #931

Re: format of .wrk files in spool/mqueue

#931
From: Brian {Hamilton Kelly}
Date: Sat, 01 Jun 1996 00:00
62 lines
3681 bytes
In article <244799584wnr@geordie.demon.co.uk>
           Simon@geordie.demon.co.uk "Simon Crute" writes:

> Hi,
>   I was wondering if anyone could point me to a document describing the format, > and logic used in creating the .wrk files that NewsWin and PCELM create in the 
> /demon/spool/mqueue directory. 

It's very simple; the .wrk file consists of three (or more) lines.  The
first is the host to which the message is addressed; often this will be
the same as the host name following the @ in the third (and successive)
lines.  It's this host (or rather, whichever host(s) is specified in the
MX records for this host) to which the SMTP client will effect a
connection when the mail is uploaded.  It could, for instance, be
post.demon.co.uk, with multiple disparate recipients listed in the third
and subsequent lines

The second line is the address of the originator of the mail.  This will
be used in the RFC-821 SMTP dialogue to inform the SMTP server at the far
end that this is MAIL FROM: <blah@blah.blah>

The third (and subsequent, if any) lines each contain an addressee's
e-mail identity.  These will again be used in the RCPT TO: lines of the
RFC-821 dialogue.

So essentially the .wrk file controls the basic "enveloping" operations
of the SMTP.  The whole sequence would be:

1) Your local SMTP client grabs the .wrk file, and takes the name from
the first line.
2) This name is used to make a DNS query looking for MX or A records for
the named host.  If MX records exist, their A records are used instead.
3) The local host makes a connection to that address, using port 25, to
talk to its SMTP server.
4) On getting the answer, the local client issues an HELO blah.blah to
identify itself to the remote server (or might try EHLO if it wants to be
ESMTP capable).
5) Assuming the remote server is happy with that handshake, the local
client issues a MAIL FROM message, using the data from the second line of
the .wrk file
6) On getting a positive response to that, the local client issues a
series of RCPT TO messages, using the content of each of the following
lines of the work file.  RFC-821 requires that a remote server accept up
to 100 such recipients; many servers will accept far more.
7) Upon getting another positive response, the local client issues the
DATA command; after another positive response, the content of the .TXT
file is played out to the remote server, and followed by CR LF . CR LF

> I'm thinking of writing a REXX to convert messages posted to a local POP 
> server to this format so that I don't need to use Sendmail and I can just just
>  sendit 
> instead

Interesting: I was thinking of writing a REXX/2 program to generate the
work and text files for a regular Usenet posting (until someone
volunteered to post it automatically for me, using something that he
already had in place for some other FAQs).  Good language, REXX!

-- 
Brian {Hamilton Kelly}                                         bhk@dsl.co.uk
                       "A language is a dialect that has an army and a navy"    
                                                          --  Samuel Johnson
Technical Details
Message-ID: <833633988snz@dsl.co.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <244799584wnr@geordie.demon.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10bb05,42582e895807e07e
X-Google-Attributes: gid10bb05,public
From: Brian {Hamilton Kelly} <bhk@dsl.co.uk>
Subject: Re: format of .wrk files in spool/mqueue
Date: 1996/06/01
Message-ID: <833633988snz@dsl.co.uk>
X-Deja-AN: 157911182
x-mail2news-path: dragnhll.demon.co.uk
x-nntp-posting-host: dragnhll.demon.co.uk
references: <244799584wnr@geordie.demon.co.uk>
organization: Dragonhill Systems Ltd
newsgroups: demon.ip.developers