mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-31 22:25:24 +00:00
postfix-2.3-20050331
This commit is contained in:
committed by
Viktor Dukhovni
parent
2bc17f05a7
commit
d8907e698e
@@ -13,7 +13,7 @@ content filter yes (before and after queue, internal and external)
|
|||||||
db tables yes (compile time option)
|
db tables yes (compile time option)
|
||||||
dbm tables yes (compile time option)
|
dbm tables yes (compile time option)
|
||||||
delivered-to yes (configurable with prepend_delivered_header)
|
delivered-to yes (configurable with prepend_delivered_header)
|
||||||
dsn not yet (bounces have DSN form)
|
dsn almost (supports enhanced status codes and DSN format bounces)
|
||||||
errors-to: yes (disabled by default since Postfix 2.1)
|
errors-to: yes (disabled by default since Postfix 2.1)
|
||||||
esmtp yes
|
esmtp yes
|
||||||
etrn support yes (per-destination log for authorized destinations only)
|
etrn support yes (per-destination log for authorized destinations only)
|
||||||
@@ -60,7 +60,7 @@ sendmail.cf no (uses table-driven address rewriting)
|
|||||||
size option yes, server and client
|
size option yes, server and client
|
||||||
smarthost yes (specify relayhost in main.cf)
|
smarthost yes (specify relayhost in main.cf)
|
||||||
spf yes (delegated policy script)
|
spf yes (delegated policy script)
|
||||||
starttls yes
|
starttls yes (compile time option)
|
||||||
tcp wrapper no (use built-in blacklist facility)
|
tcp wrapper no (use built-in blacklist facility)
|
||||||
user+extension yes (also: .forward+extension)
|
user+extension yes (also: .forward+extension)
|
||||||
user-extension yes (also: .forward-extension)
|
user-extension yes (also: .forward-extension)
|
||||||
|
@@ -10574,6 +10574,15 @@ Apologies for any names omitted.
|
|||||||
Bug introduced 20050329 while polishing working code. Files:
|
Bug introduced 20050329 while polishing working code. Files:
|
||||||
smtp/smtp_chat.c, lmtp/lmtp_chat.c.
|
smtp/smtp_chat.c, lmtp/lmtp_chat.c.
|
||||||
|
|
||||||
|
Feature: add enhanced status code support to the smtp-sink
|
||||||
|
test program. File: smtpstone/smtp-sink.c.
|
||||||
|
|
||||||
|
20050331
|
||||||
|
|
||||||
|
Workarounds for ancient gcc compilers that can't handle
|
||||||
|
valid C. Bugs reported by Victor Duchovni. Files:
|
||||||
|
util/sys_defs.h, global/dsn_util.h, tls/tls_client.c.
|
||||||
|
|
||||||
Open problems:
|
Open problems:
|
||||||
|
|
||||||
Med: disable header address rewriting after XCLIENT?
|
Med: disable header address rewriting after XCLIENT?
|
||||||
|
@@ -203,11 +203,10 @@
|
|||||||
# triggered the PREPEND action.
|
# triggered the PREPEND action.
|
||||||
#
|
#
|
||||||
# o The prepended text is not considered part of
|
# o The prepended text is not considered part of
|
||||||
# the input stream. Unlike the result from the
|
# the input stream: it is not subject to
|
||||||
# REPLACE action, prepended text is not sub-
|
# header/body checks or address rewriting, and
|
||||||
# ject to header/body checks or address
|
# it does not affect the way that Postfix adds
|
||||||
# rewriting, and does not affect the way that
|
# missing message headers.
|
||||||
# Postfix adds missing message headers.
|
|
||||||
#
|
#
|
||||||
# o When prepending text before a message header
|
# o When prepending text before a message header
|
||||||
# line, the prepended text must begin with a
|
# line, the prepended text must begin with a
|
||||||
|
@@ -209,11 +209,10 @@ HEADER_CHECKS(5) HEADER_CHECKS(5)
|
|||||||
triggered the <b>PREPEND</b> action.
|
triggered the <b>PREPEND</b> action.
|
||||||
|
|
||||||
<b>o</b> The prepended text is not considered part of
|
<b>o</b> The prepended text is not considered part of
|
||||||
the input stream. Unlike the result from the
|
the input stream: it is not subject to
|
||||||
<b>REPLACE</b> action, prepended text is not sub-
|
header/body checks or address rewriting, and
|
||||||
ject to header/body checks or address
|
it does not affect the way that Postfix adds
|
||||||
rewriting, and does not affect the way that
|
missing message headers.
|
||||||
Postfix adds missing message headers.
|
|
||||||
|
|
||||||
<b>o</b> When prepending text before a message header
|
<b>o</b> When prepending text before a message header
|
||||||
line, the prepended text must begin with a
|
line, the prepended text must begin with a
|
||||||
|
@@ -379,9 +379,15 @@ case "$CC" in
|
|||||||
*CC) error "Don't use CC. That's the C++ compiler";;
|
*CC) error "Don't use CC. That's the C++ compiler";;
|
||||||
*) : ${OPT='-O'};;
|
*) : ${OPT='-O'};;
|
||||||
esac
|
esac
|
||||||
|
#
|
||||||
|
# "gcc -W" 3.4.2 no longer reports functions that fail to return a
|
||||||
|
# result. Use "gcc -Wall -Wno-comment" instead. We'll figure out
|
||||||
|
# later if the other -Wmumble options are really redundant. Having
|
||||||
|
# een burned once by a compiler that lies about what warnings it
|
||||||
|
# produces, not taking that chance again.
|
||||||
|
|
||||||
: ${CC='gcc $(WARN)'} ${OPT='-O'} ${DEBUG='-g'} ${AWK=awk} \
|
: ${CC='gcc $(WARN)'} ${OPT='-O'} ${DEBUG='-g'} ${AWK=awk} \
|
||||||
${WARN='-W -Wformat -Wimplicit -Wmissing-prototypes \
|
${WARN='-Wall -Wno-comment -Wformat -Wimplicit -Wmissing-prototypes \
|
||||||
-Wparentheses -Wstrict-prototypes -Wswitch -Wuninitialized \
|
-Wparentheses -Wstrict-prototypes -Wswitch -Wuninitialized \
|
||||||
-Wunused'}
|
-Wunused'}
|
||||||
|
|
||||||
|
@@ -195,10 +195,9 @@ The prepended text is output on a separate line, immediately
|
|||||||
before the input that triggered the \fBPREPEND\fR action.
|
before the input that triggered the \fBPREPEND\fR action.
|
||||||
.IP \(bu
|
.IP \(bu
|
||||||
The prepended text is not considered part of the input
|
The prepended text is not considered part of the input
|
||||||
stream. Unlike the result from the \fBREPLACE\fR action,
|
stream: it is not subject to header/body checks or address
|
||||||
prepended text is not subject to header/body checks or
|
rewriting, and it does not affect the way that Postfix adds
|
||||||
address rewriting, and does not affect the way that Postfix
|
missing message headers.
|
||||||
adds missing message headers.
|
|
||||||
.IP \(bu
|
.IP \(bu
|
||||||
When prepending text before a message header line, the prepended
|
When prepending text before a message header line, the prepended
|
||||||
text must begin with a valid message header label.
|
text must begin with a valid message header label.
|
||||||
|
@@ -181,10 +181,9 @@
|
|||||||
# before the input that triggered the \fBPREPEND\fR action.
|
# before the input that triggered the \fBPREPEND\fR action.
|
||||||
# .IP \(bu
|
# .IP \(bu
|
||||||
# The prepended text is not considered part of the input
|
# The prepended text is not considered part of the input
|
||||||
# stream. Unlike the result from the \fBREPLACE\fR action,
|
# stream: it is not subject to header/body checks or address
|
||||||
# prepended text is not subject to header/body checks or
|
# rewriting, and it does not affect the way that Postfix adds
|
||||||
# address rewriting, and does not affect the way that Postfix
|
# missing message headers.
|
||||||
# adds missing message headers.
|
|
||||||
# .IP \(bu
|
# .IP \(bu
|
||||||
# When prepending text before a message header line, the prepended
|
# When prepending text before a message header line, the prepended
|
||||||
# text must begin with a valid message header label.
|
# text must begin with a valid message header label.
|
||||||
|
@@ -28,6 +28,8 @@
|
|||||||
/*
|
/*
|
||||||
* Storage for an enhanced status code. Avoid using malloc for itty-bitty
|
* Storage for an enhanced status code. Avoid using malloc for itty-bitty
|
||||||
* strings with a known size limit.
|
* strings with a known size limit.
|
||||||
|
*
|
||||||
|
* XXX gcc version 2 complains about sizeof() as format width specifier.
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char data[DSN_SIZE]; /* NOT a public interface */
|
char data[DSN_SIZE]; /* NOT a public interface */
|
||||||
@@ -36,7 +38,7 @@ typedef struct {
|
|||||||
#define DSN_UPDATE(dsn_buf, dsn, len) do { \
|
#define DSN_UPDATE(dsn_buf, dsn, len) do { \
|
||||||
if (len >= sizeof((dsn_buf).data)) \
|
if (len >= sizeof((dsn_buf).data)) \
|
||||||
msg_panic("DSN_UPDATE: bad DSN code \"%.*s...\" length %d", \
|
msg_panic("DSN_UPDATE: bad DSN code \"%.*s...\" length %d", \
|
||||||
sizeof((dsn_buf).data) - 1, dsn, len); \
|
INT_SIZEOF((dsn_buf).data) - 1, dsn, len); \
|
||||||
strncpy((dsn_buf).data, (dsn), (len)); \
|
strncpy((dsn_buf).data, (dsn), (len)); \
|
||||||
(dsn_buf).data[len] = 0; \
|
(dsn_buf).data[len] = 0; \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
@@ -20,7 +20,7 @@
|
|||||||
* Patches change the patchlevel and the release date. Snapshots change the
|
* Patches change the patchlevel and the release date. Snapshots change the
|
||||||
* release date only.
|
* release date only.
|
||||||
*/
|
*/
|
||||||
#define MAIL_RELEASE_DATE "20050330"
|
#define MAIL_RELEASE_DATE "20050331"
|
||||||
#define MAIL_VERSION_NUMBER "2.3"
|
#define MAIL_VERSION_NUMBER "2.3"
|
||||||
|
|
||||||
#define VAR_MAIL_VERSION "mail_version"
|
#define VAR_MAIL_VERSION "mail_version"
|
||||||
|
@@ -195,7 +195,7 @@ static void helo_response(SINK_STATE *state)
|
|||||||
|
|
||||||
static void ok_response(SINK_STATE *state)
|
static void ok_response(SINK_STATE *state)
|
||||||
{
|
{
|
||||||
smtp_printf(state->stream, "250 Ok");
|
smtp_printf(state->stream, "250 2.0.0 Ok");
|
||||||
smtp_flush(state->stream);
|
smtp_flush(state->stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -204,7 +204,8 @@ static void ok_response(SINK_STATE *state)
|
|||||||
static void mail_response(SINK_STATE *state)
|
static void mail_response(SINK_STATE *state)
|
||||||
{
|
{
|
||||||
state->rcpts = 0;
|
state->rcpts = 0;
|
||||||
ok_response(state);
|
smtp_printf(state->stream, "250 2.1.0 Ok");
|
||||||
|
smtp_flush(state->stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* rcpt_response - bump recipient count, send 250 OK */
|
/* rcpt_response - bump recipient count, send 250 OK */
|
||||||
@@ -212,7 +213,8 @@ static void mail_response(SINK_STATE *state)
|
|||||||
static void rcpt_response(SINK_STATE *state)
|
static void rcpt_response(SINK_STATE *state)
|
||||||
{
|
{
|
||||||
state->rcpts++;
|
state->rcpts++;
|
||||||
ok_response(state);
|
smtp_printf(state->stream, "250 2.1.5 Ok");
|
||||||
|
smtp_flush(state->stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* data_response - respond to DATA command */
|
/* data_response - respond to DATA command */
|
||||||
@@ -240,10 +242,11 @@ static void dot_response(SINK_STATE *state)
|
|||||||
{
|
{
|
||||||
if (enable_lmtp) {
|
if (enable_lmtp) {
|
||||||
while (state->rcpts-- > 0) /* XXX this could block */
|
while (state->rcpts-- > 0) /* XXX this could block */
|
||||||
ok_response(state); /* XXX this flushes too often */
|
smtp_printf(state->stream, "250 2.2.0 Ok");
|
||||||
} else {
|
} else {
|
||||||
ok_response(state);
|
smtp_printf(state->stream, "250 2.0.0 Ok");
|
||||||
}
|
}
|
||||||
|
smtp_flush(state->stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* quit_response - respond to QUIT command */
|
/* quit_response - respond to QUIT command */
|
||||||
@@ -478,7 +481,7 @@ static int command_read(SINK_STATE *state)
|
|||||||
if (msg_verbose)
|
if (msg_verbose)
|
||||||
msg_info("%s", ptr);
|
msg_info("%s", ptr);
|
||||||
if ((command = mystrtok(&ptr, " \t")) == 0) {
|
if ((command = mystrtok(&ptr, " \t")) == 0) {
|
||||||
smtp_printf(state->stream, "500 Error: unknown command");
|
smtp_printf(state->stream, "500 5.5.2 Error: unknown command");
|
||||||
smtp_flush(state->stream);
|
smtp_flush(state->stream);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
@@ -486,19 +489,19 @@ static int command_read(SINK_STATE *state)
|
|||||||
if (strcasecmp(command, cmdp->name) == 0)
|
if (strcasecmp(command, cmdp->name) == 0)
|
||||||
break;
|
break;
|
||||||
if (cmdp->name == 0 || (cmdp->flags & FLAG_ENABLE) == 0) {
|
if (cmdp->name == 0 || (cmdp->flags & FLAG_ENABLE) == 0) {
|
||||||
smtp_printf(state->stream, "500 Error: unknown command");
|
smtp_printf(state->stream, "500 5.5.1 Error: unknown command");
|
||||||
smtp_flush(state->stream);
|
smtp_flush(state->stream);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
if (cmdp->flags & FLAG_DISCONNECT)
|
if (cmdp->flags & FLAG_DISCONNECT)
|
||||||
return (-1);
|
return (-1);
|
||||||
if (cmdp->flags & FLAG_HARD_ERR) {
|
if (cmdp->flags & FLAG_HARD_ERR) {
|
||||||
smtp_printf(state->stream, "500 Error: command failed");
|
smtp_printf(state->stream, "500 5.3.0 Error: command failed");
|
||||||
smtp_flush(state->stream);
|
smtp_flush(state->stream);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
if (cmdp->flags & FLAG_SOFT_ERR) {
|
if (cmdp->flags & FLAG_SOFT_ERR) {
|
||||||
smtp_printf(state->stream, "450 Error: command failed");
|
smtp_printf(state->stream, "450 4.3.0 Error: command failed");
|
||||||
smtp_flush(state->stream);
|
smtp_flush(state->stream);
|
||||||
return (0);
|
return (0);
|
||||||
}
|
}
|
||||||
|
@@ -396,12 +396,18 @@ SSL_CTX *tls_client_init(int unused_verifydepth)
|
|||||||
* OpenSSL can, however, automatically save newly created sessions for
|
* OpenSSL can, however, automatically save newly created sessions for
|
||||||
* us by callback (we create the session name in the call-back
|
* us by callback (we create the session name in the call-back
|
||||||
* function).
|
* function).
|
||||||
|
*
|
||||||
|
* XXX gcc 2.95 can't compile #ifdef .. #endif in the expansion of
|
||||||
|
* SSL_SESS_CACHE_CLIENT | SSL_SESS_CACHE_NO_INTERNAL_STORE |
|
||||||
|
* SSL_SESS_CACHE_NO_AUTO_CLEAR.
|
||||||
*/
|
*/
|
||||||
|
#ifndef SSL_SESS_CACHE_NO_INTERNAL_STORE
|
||||||
|
#define SSL_SESS_CACHE_NO_INTERNAL_STORE 0
|
||||||
|
#endif
|
||||||
|
|
||||||
SSL_CTX_set_session_cache_mode(client_ctx,
|
SSL_CTX_set_session_cache_mode(client_ctx,
|
||||||
SSL_SESS_CACHE_CLIENT |
|
SSL_SESS_CACHE_CLIENT |
|
||||||
#ifdef SSL_SESS_CACHE_NO_INTERNAL_STORE
|
|
||||||
SSL_SESS_CACHE_NO_INTERNAL_STORE |
|
SSL_SESS_CACHE_NO_INTERNAL_STORE |
|
||||||
#endif
|
|
||||||
SSL_SESS_CACHE_NO_AUTO_CLEAR);
|
SSL_SESS_CACHE_NO_AUTO_CLEAR);
|
||||||
SSL_CTX_sess_set_new_cb(client_ctx, new_client_session_cb);
|
SSL_CTX_sess_set_new_cb(client_ctx, new_client_session_cb);
|
||||||
}
|
}
|
||||||
|
@@ -1123,6 +1123,11 @@ typedef int WAIT_STATUS_T;
|
|||||||
#define OCTAL_TO_UNSIGNED(res, str) ((res) = strtoul((str), (char **) 0, 8))
|
#define OCTAL_TO_UNSIGNED(res, str) ((res) = strtoul((str), (char **) 0, 8))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Avoid useless type mis-matches when using sizeof in an integer context.
|
||||||
|
*/
|
||||||
|
#define INT_SIZEOF(foo) ((int) sizeof(foo))
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Turn on the compatibility stuff.
|
* Turn on the compatibility stuff.
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user