mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-30 05:38:06 +00:00
postfix-2.4.4-RC1
This commit is contained in:
parent
876daa6cbd
commit
1693a43386
@ -13481,3 +13481,13 @@ Apologies for any names omitted.
|
||||
Portability: Victor helpfully pointed out that change
|
||||
20070425 broke on non-IPv6 systems. Files: smtpd/smtpd_peer.c,
|
||||
qmqpd/qmqpd_peer.c.
|
||||
|
||||
20070613
|
||||
|
||||
Bugfix: the Milter client assumed that a Milter application
|
||||
does not modify the message header or envelope, after that
|
||||
same Milter application has modified the message body of
|
||||
that same email message. This is not a problem with updates
|
||||
by different Milter applications. Problem was triggered
|
||||
by Jose-Marcio Martins da Cruz. Also simplified the handling
|
||||
of queue file update errors. File: milter/milter8.c.
|
||||
|
@ -53,6 +53,8 @@ recursively replaced by the value of the named parameter. </p>
|
||||
"$name" is empty. This form is supported with Postfix version 2.2
|
||||
and later. </p>
|
||||
|
||||
<li> <p> Specify "$$" to produce a single "$" character. </p>
|
||||
|
||||
</ul>
|
||||
|
||||
<li> <p> When the same parameter is defined multiple times, only
|
||||
|
@ -42,6 +42,8 @@ version 2.2 and later.
|
||||
The expression "${name:value}" expands to "value" when
|
||||
"$name" is empty. This form is supported with Postfix
|
||||
version 2.2 and later.
|
||||
.IP \(bu
|
||||
Specify "$$" to produce a single "$" character.
|
||||
.RE
|
||||
.IP \(bu
|
||||
When the same parameter is defined multiple times, only the last
|
||||
|
@ -53,6 +53,8 @@ recursively replaced by the value of the named parameter. </p>
|
||||
"$name" is empty. This form is supported with Postfix version 2.2
|
||||
and later. </p>
|
||||
|
||||
<li> <p> Specify "$$" to produce a single "$" character. </p>
|
||||
|
||||
</ul>
|
||||
|
||||
<li> <p> When the same parameter is defined multiple times, only
|
||||
|
@ -42,6 +42,8 @@ version 2.2 and later.
|
||||
The expression "${name:value}" expands to "value" when
|
||||
"$name" is empty. This form is supported with Postfix
|
||||
version 2.2 and later.
|
||||
.IP \(bu
|
||||
Specify "$$" to produce a single "$" character.
|
||||
.RE
|
||||
.IP \(bu
|
||||
When the same parameter is defined multiple times, only the last
|
||||
|
@ -20,8 +20,8 @@
|
||||
* Patches change both the patchlevel and the release date. Snapshots have no
|
||||
* patchlevel; they change the release date only.
|
||||
*/
|
||||
#define MAIL_RELEASE_DATE "20070531"
|
||||
#define MAIL_VERSION_NUMBER "2.4.3"
|
||||
#define MAIL_RELEASE_DATE "20070614"
|
||||
#define MAIL_VERSION_NUMBER "2.4.4-RC1"
|
||||
|
||||
#ifdef SNAPSHOT
|
||||
# define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE
|
||||
|
@ -475,6 +475,28 @@ static int milter8_comm_error(MILTER8 *milter)
|
||||
return (milter->state = MILTER8_STAT_ERROR);
|
||||
}
|
||||
|
||||
/* milter8_edit_error - local queue file update error */
|
||||
|
||||
static void milter8_edit_error(MILTER8 *milter, const char *reply)
|
||||
{
|
||||
|
||||
/*
|
||||
* Close the socket, so we don't have to skip pending replies from this
|
||||
* Milter instance.
|
||||
*/
|
||||
if (milter->fp != 0) {
|
||||
(void) vstream_fclose(milter->fp);
|
||||
milter->fp = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Set the socket state to ERROR, so we don't try to send further MTA
|
||||
* events to this Milter instance.
|
||||
*/
|
||||
milter8_def_reply(milter, reply);
|
||||
milter->state = MILTER8_STAT_ERROR;
|
||||
}
|
||||
|
||||
/* milter8_close_stream - close stream to milter application */
|
||||
|
||||
static void milter8_close_stream(MILTER8 *milter)
|
||||
@ -1002,6 +1024,27 @@ static const char *milter8_event(MILTER8 *milter, int event,
|
||||
msg_info("reply: %s data %ld bytes",
|
||||
(smfir_name = str_name_code(smfir_table, cmd)) != 0 ?
|
||||
smfir_name : "unknown", (long) data_size);
|
||||
|
||||
/*
|
||||
* Handle unfinished message body replacement first.
|
||||
*/
|
||||
if (body_line_buf != 0 && cmd != SMFIR_REPLBODY) {
|
||||
/* In case the last body replacement line didn't end in CRLF. */
|
||||
if (LEN(body_line_buf) > 0)
|
||||
edit_resp = parent->repl_body(parent->chg_context,
|
||||
MILTER_BODY_LINE,
|
||||
body_line_buf);
|
||||
if (edit_resp == 0)
|
||||
edit_resp = parent->repl_body(parent->chg_context,
|
||||
MILTER_BODY_END,
|
||||
(VSTRING *) 0);
|
||||
if (edit_resp) {
|
||||
milter8_edit_error(milter, edit_resp);
|
||||
MILTER8_EVENT_BREAK(milter->def_reply);
|
||||
}
|
||||
vstring_free(body_line_buf);
|
||||
body_line_buf = 0;
|
||||
}
|
||||
switch (cmd) {
|
||||
|
||||
/*
|
||||
@ -1212,8 +1255,10 @@ static const char *milter8_event(MILTER8 *milter, int event,
|
||||
edit_resp = parent->del_header(parent->chg_context,
|
||||
(ssize_t) index,
|
||||
STR(milter->buf));
|
||||
if (edit_resp)
|
||||
MILTER8_EVENT_BREAK(edit_resp);
|
||||
if (edit_resp) {
|
||||
milter8_edit_error(milter, edit_resp);
|
||||
MILTER8_EVENT_BREAK(milter->def_reply);
|
||||
}
|
||||
continue;
|
||||
#endif
|
||||
|
||||
@ -1229,8 +1274,10 @@ static const char *milter8_event(MILTER8 *milter, int event,
|
||||
edit_resp = parent->add_header(parent->chg_context,
|
||||
STR(milter->buf),
|
||||
STR(milter->body));
|
||||
if (edit_resp)
|
||||
MILTER8_EVENT_BREAK(edit_resp);
|
||||
if (edit_resp) {
|
||||
milter8_edit_error(milter, edit_resp);
|
||||
MILTER8_EVENT_BREAK(milter->def_reply);
|
||||
}
|
||||
continue;
|
||||
|
||||
/*
|
||||
@ -1257,8 +1304,10 @@ static const char *milter8_event(MILTER8 *milter, int event,
|
||||
(ssize_t) index + 1,
|
||||
STR(milter->buf),
|
||||
STR(milter->body));
|
||||
if (edit_resp)
|
||||
MILTER8_EVENT_BREAK(edit_resp);
|
||||
if (edit_resp) {
|
||||
milter8_edit_error(milter, edit_resp);
|
||||
MILTER8_EVENT_BREAK(milter->def_reply);
|
||||
}
|
||||
continue;
|
||||
#endif
|
||||
|
||||
@ -1272,8 +1321,10 @@ static const char *milter8_event(MILTER8 *milter, int event,
|
||||
MILTER8_EVENT_BREAK(milter->def_reply);
|
||||
edit_resp = parent->add_rcpt(parent->chg_context,
|
||||
STR(milter->buf));
|
||||
if (edit_resp)
|
||||
MILTER8_EVENT_BREAK(edit_resp);
|
||||
if (edit_resp) {
|
||||
milter8_edit_error(milter, edit_resp);
|
||||
MILTER8_EVENT_BREAK(milter->def_reply);
|
||||
}
|
||||
continue;
|
||||
|
||||
/*
|
||||
@ -1286,8 +1337,10 @@ static const char *milter8_event(MILTER8 *milter, int event,
|
||||
MILTER8_EVENT_BREAK(milter->def_reply);
|
||||
edit_resp = parent->del_rcpt(parent->chg_context,
|
||||
STR(milter->buf));
|
||||
if (edit_resp)
|
||||
MILTER8_EVENT_BREAK(edit_resp);
|
||||
if (edit_resp) {
|
||||
milter8_edit_error(milter, edit_resp);
|
||||
MILTER8_EVENT_BREAK(milter->def_reply);
|
||||
}
|
||||
continue;
|
||||
|
||||
/*
|
||||
@ -1323,6 +1376,10 @@ static const char *milter8_event(MILTER8 *milter, int event,
|
||||
VSTRING_ADDCH(body_line_buf, ch);
|
||||
}
|
||||
}
|
||||
if (edit_resp) {
|
||||
milter8_edit_error(milter, edit_resp);
|
||||
MILTER8_EVENT_BREAK(milter->def_reply);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}
|
||||
@ -1348,35 +1405,11 @@ static const char *milter8_event(MILTER8 *milter, int event,
|
||||
}
|
||||
|
||||
/*
|
||||
* Finish message body replacement.
|
||||
* Clean up after aborted message body replacement.
|
||||
*/
|
||||
if (body_line_buf != 0) {
|
||||
if (edit_resp == 0) {
|
||||
/* In case the last body replacement line didn't end in CRLF. */
|
||||
if (LEN(body_line_buf) > 0)
|
||||
edit_resp = parent->repl_body(parent->chg_context,
|
||||
MILTER_BODY_LINE,
|
||||
body_line_buf);
|
||||
if (edit_resp == 0)
|
||||
edit_resp = parent->repl_body(parent->chg_context,
|
||||
MILTER_BODY_END,
|
||||
(VSTRING *) 0);
|
||||
}
|
||||
if (body_line_buf)
|
||||
vstring_free(body_line_buf);
|
||||
|
||||
/*
|
||||
* Override a non-reject/discard result value after body replacement
|
||||
* failure.
|
||||
*
|
||||
* XXX Some cleanup clients ask the cleanup server to bounce mail for
|
||||
* them. In that case we must override a hard reject retval result
|
||||
* after queue file update failure. This is not a big problem; the
|
||||
* odds are small that a Milter application sends a hard reject after
|
||||
* replacing the message body.
|
||||
*/
|
||||
if (edit_resp && (retval == 0 || strchr("DS4", retval[0]) == 0))
|
||||
retval = edit_resp;
|
||||
}
|
||||
return (retval);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user