On Mon, 2 Feb 2009, Ralf wrote:

> Davide Libenzi wrote:
> > On Sun, 1 Feb 2009, Ralf wrote:
> > 
> > > Bug report for xmail v1.25:
> > > 
> > > server.tab:
> > > "DisableEmitAuthUser"   "1"
> > > 
> > > "DisableEmitAuthUser" in server.tab does not work.
> > > Disabling it works only if that line is (also?) put into user.tab
> > > in the mailbox directory of the user.
> > > 
> > > (Yes, the doc says that this setting in user.tab overrides
> > > that in server.tab, and that's ok).
> > 
> > Just noticed that. You don't need to re-set it inside the user.tab. It's a
> > bug that shows up only when the server uses STARTTLS. The session is reset
> > too deep, and that flag is lost.
> > It has been fixed now, and servers not using STARTTLS should not care about
> > it.
> 
> Thank you for the quick fix.
> How do you handle such bug reports and fixes?
> Is it ok to post such bug reports to the list
> or do you have maybe a special email-adress or a bug tracking site for it?
> And how do you distribute such fixed bugs?
> Is the fix now included in the source distribution at your web site

I make pre-releases when there's enough new things to be interesting.


> or is there maybe a diff available?

Yes, below.



- Davide



diff --git a/SMTPSvr.cpp b/SMTPSvr.cpp
index e6ca1a8..02043af 100644
--- a/SMTPSvr.cpp
+++ b/SMTPSvr.cpp
@@ -87,7 +87,7 @@
                                 SMTPF_SNDRCHECK_BYPASS | SMTPF_BLOCKED_IP | 
SMTPF_IPMAPPED_IP)
 #define SMTPF_AUTH_MASK         (SMTPF_RELAY_ENABLED | SMTPF_MAIL_UNLOCKED | 
SMTPF_AUTHENTICATED | \
                                 SMTPF_VRFY_ENABLED | SMTPF_ETRN_ENABLED | 
SMTPF_EASE_TLS)
-#define SMTPF_RESET_MASK        (SMTPF_AUTH_MASK | SMTPF_STATIC_MASK | 
SMTPF_NOEMIT_AUTH)
+#define SMTPF_RESET_MASK        (SMTPF_AUTH_MASK | SMTPF_STATIC_MASK)
 
 #define SMTP_FILTER_FL_BREAK    (1 << 4)
 #define SMTP_FILTER_FL_MASK     SMTP_FILTER_FL_BREAK
@@ -693,7 +693,7 @@ static int SMTPInitSession(ThreadConfig const *pThCfg, 
BSOCK_HANDLE hBSock,
 
        /* Check if the emission of "X-Auth-User:" is diabled */
        if (SvrGetConfigInt("DisableEmitAuthUser", 0, SMTPS.hSvrConfig))
-               SMTPS.ulFlags |= SMTPF_NOEMIT_AUTH;
+               SMTPS.ulSetupFlags |= SMTPF_NOEMIT_AUTH;
 
        /* Try to load specific configuration */
        char szConfigName[128] = "";
@@ -999,7 +999,6 @@ static void SMTPResetSession(SMTPSession &SMTPS)
 
        SMTPS.iSMTPState = (SMTPS.ulFlags & SMTPF_AUTHENTICATED) ? 
stateAuthenticated:
                Min(SMTPS.iSMTPState, stateHelo);
-
 }
 
 static void SMTPFullResetSession(SMTPSession &SMTPS)
diff --git a/docs/ChangeLog.pod b/docs/ChangeLog.pod
index e13699b..ad0c628 100644
--- a/docs/ChangeLog.pod
+++ b/docs/ChangeLog.pod
@@ -13,6 +13,11 @@ XMail Change Log as of Version 1.26
 
 =item *
 
+FIxed a bug where STARTTLS was resetting the session too much, by canceling
+certain flags/options read inside the SERVER.TAB.
+
+=item *
+
 Changed the line termination used to store messages into the mailboxes
 of Unix versions of XMail. Now messages are stored with the OS native LF
 termination, instead of the RFC CRLF that was used before.
_______________________________________________
xmail mailing list
[email protected]
http://xmailserver.org/mailman/listinfo/xmail

Reply via email to