2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-09-01 06:35:27 +00:00

postfix-2.3-20050331

This commit is contained in:
Wietse Venema
2005-03-31 00:00:00 -05:00
committed by Viktor Dukhovni
parent 2bc17f05a7
commit d8907e698e
12 changed files with 150 additions and 123 deletions

View File

@@ -13,7 +13,7 @@ content filter yes (before and after queue, internal and external)
db tables yes (compile time option)
dbm tables yes (compile time option)
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)
esmtp yes
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
smarthost yes (specify relayhost in main.cf)
spf yes (delegated policy script)
starttls yes
starttls yes (compile time option)
tcp wrapper no (use built-in blacklist facility)
user+extension yes (also: .forward+extension)
user-extension yes (also: .forward-extension)

View File

@@ -10574,6 +10574,15 @@ Apologies for any names omitted.
Bug introduced 20050329 while polishing working code. Files:
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:
Med: disable header address rewriting after XCLIENT?

View File

@@ -203,11 +203,10 @@
# triggered the PREPEND action.
#
# o The prepended text is not considered part of
# the input stream. Unlike the result from the
# REPLACE action, prepended text is not sub-
# ject to header/body checks or address
# rewriting, and does not affect the way that
# Postfix adds missing message headers.
# the input stream: it is not subject to
# header/body checks or address rewriting, and
# it does not affect the way that Postfix adds
# missing message headers.
#
# o When prepending text before a message header
# line, the prepended text must begin with a

View File

@@ -209,11 +209,10 @@ HEADER_CHECKS(5) HEADER_CHECKS(5)
triggered the <b>PREPEND</b> action.
<b>o</b> The prepended text is not considered part of
the input stream. Unlike the result from the
<b>REPLACE</b> action, prepended text is not sub-
ject to header/body checks or address
rewriting, and does not affect the way that
Postfix adds missing message headers.
the input stream: it is not subject to
header/body checks or address rewriting, and
it does not affect the way that Postfix adds
missing message headers.
<b>o</b> When prepending text before a message header
line, the prepended text must begin with a

View File

@@ -379,9 +379,15 @@ case "$CC" in
*CC) error "Don't use CC. That's the C++ compiler";;
*) : ${OPT='-O'};;
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} \
${WARN='-W -Wformat -Wimplicit -Wmissing-prototypes \
${WARN='-Wall -Wno-comment -Wformat -Wimplicit -Wmissing-prototypes \
-Wparentheses -Wstrict-prototypes -Wswitch -Wuninitialized \
-Wunused'}

View File

@@ -195,10 +195,9 @@ The prepended text is output on a separate line, immediately
before the input that triggered the \fBPREPEND\fR action.
.IP \(bu
The prepended text is not considered part of the input
stream. Unlike the result from the \fBREPLACE\fR action,
prepended text is not subject to header/body checks or
address rewriting, and does not affect the way that Postfix
adds missing message headers.
stream: it is not subject to header/body checks or address
rewriting, and it does not affect the way that Postfix adds
missing message headers.
.IP \(bu
When prepending text before a message header line, the prepended
text must begin with a valid message header label.

View File

@@ -181,10 +181,9 @@
# before the input that triggered the \fBPREPEND\fR action.
# .IP \(bu
# The prepended text is not considered part of the input
# stream. Unlike the result from the \fBREPLACE\fR action,
# prepended text is not subject to header/body checks or
# address rewriting, and does not affect the way that Postfix
# adds missing message headers.
# stream: it is not subject to header/body checks or address
# rewriting, and it does not affect the way that Postfix adds
# missing message headers.
# .IP \(bu
# When prepending text before a message header line, the prepended
# text must begin with a valid message header label.

View File

@@ -28,6 +28,8 @@
/*
* Storage for an enhanced status code. Avoid using malloc for itty-bitty
* strings with a known size limit.
*
* XXX gcc version 2 complains about sizeof() as format width specifier.
*/
typedef struct {
char data[DSN_SIZE]; /* NOT a public interface */
@@ -36,7 +38,7 @@ typedef struct {
#define DSN_UPDATE(dsn_buf, dsn, len) do { \
if (len >= sizeof((dsn_buf).data)) \
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)); \
(dsn_buf).data[len] = 0; \
} while (0)

View File

@@ -20,7 +20,7 @@
* Patches change the patchlevel and the release date. Snapshots change the
* release date only.
*/
#define MAIL_RELEASE_DATE "20050330"
#define MAIL_RELEASE_DATE "20050331"
#define MAIL_VERSION_NUMBER "2.3"
#define VAR_MAIL_VERSION "mail_version"

View File

@@ -195,7 +195,7 @@ static void helo_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);
}
@@ -204,7 +204,8 @@ static void ok_response(SINK_STATE *state)
static void mail_response(SINK_STATE *state)
{
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 */
@@ -212,7 +213,8 @@ static void mail_response(SINK_STATE *state)
static void rcpt_response(SINK_STATE *state)
{
state->rcpts++;
ok_response(state);
smtp_printf(state->stream, "250 2.1.5 Ok");
smtp_flush(state->stream);
}
/* data_response - respond to DATA command */
@@ -240,10 +242,11 @@ static void dot_response(SINK_STATE *state)
{
if (enable_lmtp) {
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 {
ok_response(state);
smtp_printf(state->stream, "250 2.0.0 Ok");
}
smtp_flush(state->stream);
}
/* quit_response - respond to QUIT command */
@@ -478,7 +481,7 @@ static int command_read(SINK_STATE *state)
if (msg_verbose)
msg_info("%s", ptr);
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);
return (0);
}
@@ -486,19 +489,19 @@ static int command_read(SINK_STATE *state)
if (strcasecmp(command, cmdp->name) == 0)
break;
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);
return (0);
}
if (cmdp->flags & FLAG_DISCONNECT)
return (-1);
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);
return (0);
}
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);
return (0);
}

View File

@@ -396,12 +396,18 @@ SSL_CTX *tls_client_init(int unused_verifydepth)
* OpenSSL can, however, automatically save newly created sessions for
* us by callback (we create the session name in the call-back
* 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_SESS_CACHE_CLIENT |
#ifdef SSL_SESS_CACHE_NO_INTERNAL_STORE
SSL_SESS_CACHE_NO_INTERNAL_STORE |
#endif
SSL_SESS_CACHE_NO_AUTO_CLEAR);
SSL_CTX_sess_set_new_cb(client_ctx, new_client_session_cb);
}

View File

@@ -1123,6 +1123,11 @@ typedef int WAIT_STATUS_T;
#define OCTAL_TO_UNSIGNED(res, str) ((res) = strtoul((str), (char **) 0, 8))
#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.
*/