OK,

After consulting the source code, I find the problem (and another one
related to SMTPDoAuthCramMD5 !!!):

The problem is in the SMTPResetSession function that clears all the
SMTPS.ulFlags (except the eventual Authenticated flag)  previously set by
the SMTPInitSession function and the eventual call to the various
SMTPDoAuth* functions.

But when a smtp client send the RSET command, it don't have to auth again.
The Auth flag is ok but the others flags (relay, mailbox and verify) are
still reset by SMTPResetSession !! so they are disabled/not allowed.

The other bug fix is that the SMTPDoAuthCramMD5 don't call SMTPApplyPerms
after good authentication !!!

Here is attached the corrected source file (SMTPSrv.cpp) based on XMail v
0.68 source code.
Modifications are minor :
 - Just a line to comment at start of the SMTPResetSession function !!
 - Just a line to add near end of the SMTPDoAuthCramMD5 function

After recompiling XMail, on my server, all is now ok !! SMTP Clients doing
Auth can send multiple external messages in the same SMTP session (In
outlook express, the 'send messages immediatly' is not checked, the user can
prepare its messages and then finished click the 'receive/send' button to
connect to Internet and realy send)

Francis




-----Message d'origine-----
De : CLEMENT Francis 
Envoyé : jeudi 29 mars 2001 16:32
À : XMail List (E-mail)
Objet : [xmail] problem with smtp auth/outlook express 5/multiple
messages


Hi, Davide
 
I have some strange errors reported by outlook express 5 in this situation
explained below with xmail 0.68 (original not hacked with my hacks) :
 
Outlook Express 5 configured to use smtp authentication.

Outlook Express 5 setting "Send messages immediatly" is not checked,
allowing user to prepare multiple mails, in our case with external
destinations, outlook stores them in the outgoing folder but don't send them
immediatly, and then user have finished its, says 2 messages or more , it
clicks on "send and receive".

In this situation, xmail, after smtp auth,  accepts the first mail then
returns an "ERELAY" error for the second, causing outlook express to stop
sending.
If the user then clicks on "send and receive" immediatly, the second (wich
is becoming the first to send in the outgoing folder) is send without
problems and the next is rejected !!
and so on ...

I suppose, outlook express use the same smtp session to send waiting mails
in the outgoing folder and don't re'auth' for each message (it don't close
session and open a new for each message) so i beleave there is a problem
with xmail resetting the session parameters after each message, also
RESETTING THE LAST auth setting and permissions for this user as if it was a
entirely new session !!.

Can you help me !!!

Some of my customers want to use outlook express feature to prepare mails in
a "not connected to internet", and then send them in a unique "connected to
internet" dial-up session minimizing the phones costs and times to connect.

Francis



SMTPSvr.cpp

Reply via email to