[Oberon] Re: Refine *Mail*.Mod

easlab at absamail.co.za easlab at absamail.co.za
Sun Nov 5 13:32:02 MET 2006


--snip--
> > # telnet smtp.absamail.co.za 25
> > Trying 196.35.40.10...
> > Connected to smtp.absamail.co.za.
> > Escape character is '^]'.
> > 220 absamail.co.za Novonyx SMTP ready $Revision:3.22.1.16  $
> > ehlo

Bill Hacker wrote:
> Should furnish "ehlo <hostname/domain>.<tld>" if acting as a peer MTA
> Submission client string is less rigourous, but should arrive on port 587

That's why I love N-O: it took an effortless few seconds to search my
'linux' & 'telecoms' partitions [some 30 MB] for "tld"; which RFC 1548
shows as: "tld = This-Layer-Down".

In fact 'hostname' seems meaningless, since AFAIK the ISP just 
gives me a dymaic IP, which is associated with their domain:
absamail.co.za.

Please explain:  <hostname/domain>.<tld>.
This seems related to the problem described below.
The rfc seems to assume that no user info is known, before the 
TxAuthentication starts.

> Try: "ehlo crglur at absamail.co.za" 
> 
Well no, this is related to the problem described below.
BTW I think much of ETH-N-O's problem is the "try"
[suck it and see method] vs a more theoretical approach ?

> > 250-absamail.co.za Pleased to meet you
> > 250-HELP
> > 250-EXPN
> > 250-PIPELINING
> > 250-8BITMIME
> > 250-DSN
> 
> > 250-AUTH LOGIN   <--- the Tx-authentication type available [per M$!]
> Actally that one is the standard
> 
> > 250-AUTH=LOGIN
> 
> The one with embedded '=' sign is the WinWOES smudge
> Not all hosts support it (none of our MTA do)
> 
Thanks, I'll check my research docs.

> I can advise on setting up a local 'dummy MTA' with Exim to run
> tests against if it would help.

No thanks:
*  I don't want to open another can of worms;
* I'm not debugging it on the box which runs linux-oberon,
  because debugging is text intensive, and the old VGA > N-O is
  better for text;
 I don't know how/if linux-oberon connects to the linux
   sockets, although somehow linux-oberon works for Usenet,
   after linux is used to go on-line.   Ie. N-O's weak ppp
    facilities are not used.
<><><><><><><><><>

The 3 steps for sending mail using TextMail.Mod are simply:
1. Connect(Mail, host, SMTP, res);
2. 'dialog with smtpServer',
3. NS.CloseConnection(Mail);

Stage 2: dialog with smtpServer; handles the EmailTxAuthentication.

The EmailTxAuthenticate for WinType ISPs is confirmed by telnet
  and by modifying TextMail.Mod to be simply:
SendNexpect("AUTH LOGIN","3"); == select a type of TxAuthentication
SendNexpect(<Base64(UserID)>, "3"); == give your UserID
SendNexpect(<Base64(Passwrd)>, "3").  == give your Passwrd

Where the 2nd arg of SendNexpect is the 1st char of the 
expected return string, for the 1st arg sent.
Eg. send: "AUTH LOGIN"  and expect to get back:
"334 VXNlcm5hbWU6",
 where the 1st char is "3" and 'VXNlcm5hbWU6' Base64
decodes to 'Password:'.

N-O has 2 similar modules for emailing: Mail.*  &  TextMail.* .
I have never used TextMail.Send, even before my ISP required 
EmailTxAuthenticate.  I suspect that no one else has used
TextMail.Send either, because the code is non-working.  
OTOH TextMail.Directory was/is my standard email-fetcher 
for years.

IMO the code of TextMail.Mod is cleaner and simple than
Mail.Mod , which tries to be too clever. 

I suspect that TextMail.Send has problems with parsing
and sending the mail-text, after the TxAuthentication
succeeds, [by my additions] because I don't receive any 
such 'sent' mail.

OTOH I don't see any error messages and I want to
avoid analysing the 'parse & send message' code,
because obviously this function works for Mail.Send
which I used for years, before TxAuthentication was
needed.

Presently I'm mostly interest in rfc1939, TxAuthentication.
So I've tried to modify Mail.Send so that it handles 
TxAuthentication, as TextMail.Send was modified to do.

I find that Mail.Send skips 'asking for Username',
and that when I reply the [Bas64 encoded] request for
password, this fails to authenticate.
Ie. the smtpServer doesn't ask for Username, as per rfc.

I'm assuming these two symptoms can be explained by
the 'username info' having been sent during the 
connection-stage, and that this 'username info' is wrong 
and doesn't correspond with the password sent later.

Because I don't want to investigate the 'connection
process', ie. stage 1 of the 3 stages [I'm trying to focus
on the TxAuthentication aspect of stage 2, only], I'm asking
for input/collaboration.

Mail.Mod connects to smtp via: 
Send*
-> OpenSMTP(S, server, email, DefSMTPPort)
--> IF NetTools.Connect(S.C, port, host, FALSE) THEN
	S.S := NetTools.OpenStream(S.C); {S: NetTools.Session

Q  -  for:
		trace := NetTools.QueryBool("TraceMail");
how is this trace-flag set and how/where are the traces read;
   they may add extra info to my own traces ?

Q  -  does:
	    NetTools.Connect(S.C, port, host, FALSE)
 try to get the password and send it to the smtpServer ?
 	    
Q  -  AFAIK both Mail.Mod & TextMail.Mod are wrong in using
  "HELO".  The rfc & my telnet & TextMail.Mod authentication
   test show that "EHLO" [case insensitive] is needed ?

I suspect that N-O's email facilities were passed on the basis 
of empirical tests: does it work for the tester's conditions;
rather than per rfc ?
-------

For years I've been harping on about a 'system where collaborators
can incrementally contribute'. And Edgar replied by refering to wiki.
Now that I've finally found and read a mass of wikipedia, I've 
confirmed that the idea works very well.  

The ETH method, where each student must do his OWN project,
is NOT appropriate to *us* outsiders.    I strongly urge the setting up
of a method whereby, several contributors can incrementally
advance the same [one of several] project.


== Chris Glur.






More information about the Oberon mailing list