mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-30 05:38:06 +00:00
postfix-2.3-20051212
This commit is contained in:
parent
3c425ec8a5
commit
35a49b518f
@ -11549,6 +11549,16 @@ Apologies for any names omitted.
|
|||||||
logic for address list and fallback relay processing.
|
logic for address list and fallback relay processing.
|
||||||
Still need to simplify deferred recipient handling.
|
Still need to simplify deferred recipient handling.
|
||||||
|
|
||||||
|
20051210
|
||||||
|
|
||||||
|
Bugfix: after a failed TLS session, the 20051210 SMTP client
|
||||||
|
code cleanup broke sessions with backup servers, causing the
|
||||||
|
client to get out of step with the backup server. This in
|
||||||
|
turn exposed a one-year old missing exception handling
|
||||||
|
context in the EHLO handstake after sending STARTTLS. Victim
|
||||||
|
was Ralf Hildebrandt, detectives Victor Duchovni and Wietse.
|
||||||
|
File: smtp/smtp_proto.c.
|
||||||
|
|
||||||
Open problems:
|
Open problems:
|
||||||
|
|
||||||
"postsuper -r" no longer resets the message arrival time,
|
"postsuper -r" no longer resets the message arrival time,
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
* Patches change both the patchlevel and the release date. Snapshots have no
|
* Patches change both the patchlevel and the release date. Snapshots have no
|
||||||
* patchlevel; they change the release date only.
|
* patchlevel; they change the release date only.
|
||||||
*/
|
*/
|
||||||
#define MAIL_RELEASE_DATE "20051210"
|
#define MAIL_RELEASE_DATE "20051212"
|
||||||
#define MAIL_VERSION_NUMBER "2.3"
|
#define MAIL_VERSION_NUMBER "2.3"
|
||||||
|
|
||||||
#ifdef SNAPSHOT
|
#ifdef SNAPSHOT
|
||||||
|
@ -260,8 +260,17 @@ int smtp_helo(SMTP_STATE *state)
|
|||||||
|
|
||||||
#ifdef USE_TLS
|
#ifdef USE_TLS
|
||||||
int saved_features = session->features;
|
int saved_features = session->features;
|
||||||
|
int tls_helo_status;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
const char *NOCLOBBER where;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Prepare for disaster.
|
||||||
|
*/
|
||||||
|
smtp_timeout_setup(state->session->stream, var_smtp_helo_tmout);
|
||||||
|
if ((except = vstream_setjmp(state->session->stream)) != 0)
|
||||||
|
return (smtp_stream_except(state, except, where));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If not recursing after STARTTLS, examine the server greeting banner
|
* If not recursing after STARTTLS, examine the server greeting banner
|
||||||
@ -269,17 +278,10 @@ int smtp_helo(SMTP_STATE *state)
|
|||||||
*/
|
*/
|
||||||
if ((state->misc_flags & SMTP_MISC_FLAG_IN_STARTTLS) == 0) {
|
if ((state->misc_flags & SMTP_MISC_FLAG_IN_STARTTLS) == 0) {
|
||||||
|
|
||||||
/*
|
|
||||||
* Prepare for disaster.
|
|
||||||
*/
|
|
||||||
smtp_timeout_setup(state->session->stream, var_smtp_helo_tmout);
|
|
||||||
if ((except = vstream_setjmp(state->session->stream)) != 0)
|
|
||||||
return (smtp_stream_except(state, except,
|
|
||||||
"receiving the initial server greeting"));
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Read and parse the server's SMTP greeting banner.
|
* Read and parse the server's SMTP greeting banner.
|
||||||
*/
|
*/
|
||||||
|
where = "receiving the initial server greeting";
|
||||||
switch ((resp = smtp_chat_resp(session))->code / 100) {
|
switch ((resp = smtp_chat_resp(session))->code / 100) {
|
||||||
case 2:
|
case 2:
|
||||||
break;
|
break;
|
||||||
@ -343,12 +345,14 @@ int smtp_helo(SMTP_STATE *state)
|
|||||||
* heuristic failed.
|
* heuristic failed.
|
||||||
*/
|
*/
|
||||||
if ((state->misc_flags & SMTP_MISC_FLAG_USE_LMTP) == 0) {
|
if ((state->misc_flags & SMTP_MISC_FLAG_USE_LMTP) == 0) {
|
||||||
|
where = "performing the EHLO handshake";
|
||||||
if (session->features & SMTP_FEATURE_ESMTP) {
|
if (session->features & SMTP_FEATURE_ESMTP) {
|
||||||
smtp_chat_cmd(session, "EHLO %s", var_smtp_helo_name);
|
smtp_chat_cmd(session, "EHLO %s", var_smtp_helo_name);
|
||||||
if ((resp = smtp_chat_resp(session))->code / 100 != 2)
|
if ((resp = smtp_chat_resp(session))->code / 100 != 2)
|
||||||
session->features &= ~SMTP_FEATURE_ESMTP;
|
session->features &= ~SMTP_FEATURE_ESMTP;
|
||||||
}
|
}
|
||||||
if ((session->features & SMTP_FEATURE_ESMTP) == 0) {
|
if ((session->features & SMTP_FEATURE_ESMTP) == 0) {
|
||||||
|
where = "performing the HELO handshake";
|
||||||
smtp_chat_cmd(session, "HELO %s", var_smtp_helo_name);
|
smtp_chat_cmd(session, "HELO %s", var_smtp_helo_name);
|
||||||
if ((resp = smtp_chat_resp(session))->code / 100 != 2)
|
if ((resp = smtp_chat_resp(session))->code / 100 != 2)
|
||||||
return (smtp_site_fail(state, session->host, resp,
|
return (smtp_site_fail(state, session->host, resp,
|
||||||
@ -358,6 +362,7 @@ int smtp_helo(SMTP_STATE *state)
|
|||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
where = "performing the LHLO handshake";
|
||||||
smtp_chat_cmd(session, "LHLO %s", var_smtp_helo_name);
|
smtp_chat_cmd(session, "LHLO %s", var_smtp_helo_name);
|
||||||
if ((resp = smtp_chat_resp(session))->code / 100 != 2)
|
if ((resp = smtp_chat_resp(session))->code / 100 != 2)
|
||||||
return (smtp_site_fail(state, session->host, resp,
|
return (smtp_site_fail(state, session->host, resp,
|
||||||
@ -541,8 +546,11 @@ int smtp_helo(SMTP_STATE *state)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
session->features = saved_features;
|
session->features = saved_features;
|
||||||
|
/* XXX Mix-up of per-session and per-request flags. */
|
||||||
state->misc_flags |= SMTP_MISC_FLAG_IN_STARTTLS;
|
state->misc_flags |= SMTP_MISC_FLAG_IN_STARTTLS;
|
||||||
return (smtp_start_tls(state));
|
tls_helo_status = smtp_start_tls(state);
|
||||||
|
state->misc_flags &= ~SMTP_MISC_FLAG_IN_STARTTLS;
|
||||||
|
return (tls_helo_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user