2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-09-01 14:45:32 +00:00

postfix-2.2-20050214

This commit is contained in:
Wietse Venema
2005-02-14 00:00:00 -05:00
committed by Viktor Dukhovni
parent da78e2f4be
commit 4e7da52277
16 changed files with 96 additions and 36 deletions

View File

@@ -10127,7 +10127,7 @@ Apologies for any names omitted.
Workaround: AIX 5.1 getaddrinfo() can't handle a "0" service Workaround: AIX 5.1 getaddrinfo() can't handle a "0" service
argument. Instead we specify "1". Files: util/inet_addr_host.c. argument. Instead we specify "1". Files: util/inet_addr_host.c.
20040513 20050113
Cleanup: now that the over-all structure is proving itself, Cleanup: now that the over-all structure is proving itself,
clean up some internal APIs to increase robustness and get clean up some internal APIs to increase robustness and get
@@ -10138,7 +10138,7 @@ Apologies for any names omitted.
This reduces time for checking the Postfix queue. Files: This reduces time for checking the Postfix queue. Files:
conf/post-install, global/mail_params.h. conf/post-install, global/mail_params.h.
20040514 20050114
Further cleanup: eliminate duplicate IPv6 results when the Further cleanup: eliminate duplicate IPv6 results when the
mynetworks value is generated by Postfix. More documentation mynetworks value is generated by Postfix. More documentation
@@ -10193,7 +10193,7 @@ Apologies for any names omitted.
Milestone: first non-non-production snapshot with TLS. Milestone: first non-non-production snapshot with TLS.
20040524 20050124
Workaround: don't send mail to $fallback_relay if Postfix Workaround: don't send mail to $fallback_relay if Postfix
is MX host for the next-hop destination. This is, however, is MX host for the next-hop destination. This is, however,
@@ -10268,6 +10268,11 @@ Apologies for any names omitted.
command examples. Files: mantools/manlint, mantools/fixman, command examples. Files: mantools/manlint, mantools/fixman,
mantools/postconf2man. mantools/postconf2man.
20050205
Cleanup: updated the mass-deletion example in the postsuper
manual.
20050206 20050206
Cleanup: don't count a [45]XX SMTP server greeting towards Cleanup: don't count a [45]XX SMTP server greeting towards
@@ -10350,7 +10355,7 @@ Apologies for any names omitted.
mis-behaves when the current entry is deleted. File: mis-behaves when the current entry is deleted. File:
tls/tls_scache.c. tls/tls_scache.c.
20040211 20050211
Cleanup: the "generics" feature (output address rewriting) Cleanup: the "generics" feature (output address rewriting)
is renamed to "generic", for consistency with "canonical" is renamed to "generic", for consistency with "canonical"

View File

@@ -13,7 +13,10 @@ Major changes with snapshot Postfix-2.2-20050212
When header address rewriting is enabled, Postfix now updates a When header address rewriting is enabled, Postfix now updates a
message header only when at least one address address in that header message header only when at least one address address in that header
is modified. Older Postfix versions first parse and then unparse is modified. Older Postfix versions first parse and then unparse
a header so that there may be subtle changes in formatting. a header so that there may be subtle changes in formatting, such
as the amount of whitespace between tokens, or in capitalization
of header labels such as FROM:/CC: because they are not replaced
by From:/Cc:.
Major changes with snapshot Postfix-2.2-20050211 Major changes with snapshot Postfix-2.2-20050211
================================================ ================================================

View File

@@ -73,14 +73,16 @@ MASTER(5) MASTER(5)
(and colon) may be omitted. Either host or (and colon) may be omitted. Either host or
port may be given in symbolic form (host or port may be given in symbolic form (host or
service name) or in numeric form (IP address service name) or in numeric form (IP address
or port number). or port number). Host information may be
enclosed inside "[]", but this form is not
necessary.
Examples: a service named <b>127.0.0.1:smtp</b> Examples: a service named <b>127.0.0.1:smtp</b> or
receives mail via the loopback interface <b>::1:smtp</b> receives mail via the loopback
only; and a service named <b>10025</b> accepts con- interface only; and a service named <b>10025</b>
nections on TCP port 10025 via all inter- accepts connections on TCP port 10025 via
faces configured with the <b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a></b> all interfaces configured with the
parameter. <b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a></b> parameter.
<b>unix</b> The service listens on a UNIX-domain socket <b>unix</b> The service listens on a UNIX-domain socket
and is accessible for local clients only. and is accessible for local clients only.

View File

@@ -2601,9 +2601,12 @@ parameter also controls delivery of mail to <tt>user@[ip.address]</tt>.
</p> </p>
<p> <p>
Note: you need to stop and start Postfix when this parameter changes. Note 1: you need to stop and start Postfix when this parameter changes.
</p> </p>
<p> Note 2: address information may be enclosed inside <tt>[]</tt>,
but this form is not recommended here. </p>
<p> When <a href="postconf.5.html#inet_interfaces">inet_interfaces</a> specifies just one IPv4 and/or IPv6 address <p> When <a href="postconf.5.html#inet_interfaces">inet_interfaces</a> specifies just one IPv4 and/or IPv6 address
that is not a loopback address, the Postfix SMTP client will use that is not a loopback address, the Postfix SMTP client will use
this address as the IP source address for outbound mail. Support this address as the IP source address for outbound mail. Support
@@ -5626,7 +5629,7 @@ IP hosting, but can be a problem on multi-homed firewalls. See the
<a href="postconf.5.html#inet_interfaces">inet_interfaces</a> documentation for more detail. </p> <a href="postconf.5.html#inet_interfaces">inet_interfaces</a> documentation for more detail. </p>
<p> Note 2: address information may be enclosed inside <tt>[]</tt>, <p> Note 2: address information may be enclosed inside <tt>[]</tt>,
but this form is not recommended. </p> but this form is not recommended here. </p>
</DD> </DD>
@@ -5659,7 +5662,7 @@ IP hosting, but can be a problem on multi-homed firewalls. See the
<a href="postconf.5.html#inet_interfaces">inet_interfaces</a> documentation for more detail. </p> <a href="postconf.5.html#inet_interfaces">inet_interfaces</a> documentation for more detail. </p>
<p> Note 2: address information may be enclosed inside <tt>[]</tt>, <p> Note 2: address information may be enclosed inside <tt>[]</tt>,
but this form is not recommended. </p> but this form is not recommended here. </p>
</DD> </DD>

View File

@@ -48,7 +48,7 @@ POSTSUPER(1) POSTSUPER(1)
mailq | tail +2 | awk 'BEGIN { RS = "" } mailq | tail +2 | awk 'BEGIN { RS = "" }
# $7=sender, $8=recipient1, $9=recipient2 # $7=sender, $8=recipient1, $9=recipient2
{ if ($8 == "user@example.com" &amp;&amp; $9 == "") { if ($8 == "user@example.com" &amp;&amp; $9 == "")
print $1 } print $1 }
' | tr -d '*!' | postsuper -d - ' | tr -d '*!' | postsuper -d -
Specify <b>-d ALL</b> to remove all messages; for example, Specify <b>-d ALL</b> to remove all messages; for example,

View File

@@ -47,7 +47,7 @@ mailq | tail +2 | awk \'BEGIN { RS = "" }
# $7=sender, $8=recipient1, $9=recipient2 # $7=sender, $8=recipient1, $9=recipient2
.ti +4 .ti +4
{ if ($8 == "user@example.com" && $9 == "") { if ($8 == "user@example.com" && $9 == "")
.ti +6 .ti +10
print $1 } print $1 }
.br .br
\' | tr -d '*!' | postsuper -d - \' | tr -d '*!' | postsuper -d -

View File

@@ -69,8 +69,11 @@ the host and port on which new connections should be
accepted. The host part (and colon) may be omitted. Either accepted. The host part (and colon) may be omitted. Either
host or port may be given in symbolic form (host or service host or port may be given in symbolic form (host or service
name) or in numeric form (IP address or port number). name) or in numeric form (IP address or port number).
Host information may be enclosed inside "[]", but this form
is not necessary.
.sp .sp
Examples: a service named \fB127.0.0.1:smtp\fR receives Examples: a service named \fB127.0.0.1:smtp\fR or \fB::1:smtp\fR
receives
mail via the loopback interface only; and a service named mail via the loopback interface only; and a service named
\fB10025\fR accepts connections on TCP port 10025 via \fB10025\fR accepts connections on TCP port 10025 via
all interfaces configured with the \fBinet_interfaces\fR all interfaces configured with the \fBinet_interfaces\fR

View File

@@ -1333,7 +1333,10 @@ interfaces (default), and "loopback-only" to receive mail
on loopback network interfaces only (Postfix 2.2 and later). The on loopback network interfaces only (Postfix 2.2 and later). The
parameter also controls delivery of mail to <tt>user@[ip.address]</tt>. parameter also controls delivery of mail to <tt>user@[ip.address]</tt>.
.PP .PP
Note: you need to stop and start Postfix when this parameter changes. Note 1: you need to stop and start Postfix when this parameter changes.
.PP
Note 2: address information may be enclosed inside <tt>[]</tt>,
but this form is not recommended here.
.PP .PP
When inet_interfaces specifies just one IPv4 and/or IPv6 address When inet_interfaces specifies just one IPv4 and/or IPv6 address
that is not a loopback address, the Postfix SMTP client will use that is not a loopback address, the Postfix SMTP client will use
@@ -3086,7 +3089,7 @@ IP hosting, but can be a problem on multi-homed firewalls. See the
inet_interfaces documentation for more detail. inet_interfaces documentation for more detail.
.PP .PP
Note 2: address information may be enclosed inside <tt>[]</tt>, Note 2: address information may be enclosed inside <tt>[]</tt>,
but this form is not recommended. but this form is not recommended here.
.SH smtp_bind_address6 (default: empty) .SH smtp_bind_address6 (default: empty)
An optional numerical network address that the SMTP client should An optional numerical network address that the SMTP client should
bind to when making an IPv6 connection. bind to when making an IPv6 connection.
@@ -3113,7 +3116,7 @@ IP hosting, but can be a problem on multi-homed firewalls. See the
inet_interfaces documentation for more detail. inet_interfaces documentation for more detail.
.PP .PP
Note 2: address information may be enclosed inside <tt>[]</tt>, Note 2: address information may be enclosed inside <tt>[]</tt>,
but this form is not recommended. but this form is not recommended here.
.SH smtp_connect_timeout (default: 30s) .SH smtp_connect_timeout (default: 30s)
The SMTP client time limit for completing a TCP connection, or The SMTP client time limit for completing a TCP connection, or
zero (use the operating system built-in time limit). zero (use the operating system built-in time limit).

View File

@@ -63,8 +63,11 @@
# accepted. The host part (and colon) may be omitted. Either # accepted. The host part (and colon) may be omitted. Either
# host or port may be given in symbolic form (host or service # host or port may be given in symbolic form (host or service
# name) or in numeric form (IP address or port number). # name) or in numeric form (IP address or port number).
# Host information may be enclosed inside "[]", but this form
# is not necessary.
# .sp # .sp
# Examples: a service named \fB127.0.0.1:smtp\fR receives # Examples: a service named \fB127.0.0.1:smtp\fR or \fB::1:smtp\fR
# receives
# mail via the loopback interface only; and a service named # mail via the loopback interface only; and a service named
# \fB10025\fR accepts connections on TCP port 10025 via # \fB10025\fR accepts connections on TCP port 10025 via
# all interfaces configured with the \fBinet_interfaces\fR # all interfaces configured with the \fBinet_interfaces\fR

View File

@@ -1585,9 +1585,12 @@ parameter also controls delivery of mail to <tt>user@[ip.address]</tt>.
</p> </p>
<p> <p>
Note: you need to stop and start Postfix when this parameter changes. Note 1: you need to stop and start Postfix when this parameter changes.
</p> </p>
<p> Note 2: address information may be enclosed inside <tt>[]</tt>,
but this form is not recommended here. </p>
<p> When inet_interfaces specifies just one IPv4 and/or IPv6 address <p> When inet_interfaces specifies just one IPv4 and/or IPv6 address
that is not a loopback address, the Postfix SMTP client will use that is not a loopback address, the Postfix SMTP client will use
this address as the IP source address for outbound mail. Support this address as the IP source address for outbound mail. Support
@@ -3381,7 +3384,7 @@ IP hosting, but can be a problem on multi-homed firewalls. See the
inet_interfaces documentation for more detail. </p> inet_interfaces documentation for more detail. </p>
<p> Note 2: address information may be enclosed inside <tt>[]</tt>, <p> Note 2: address information may be enclosed inside <tt>[]</tt>,
but this form is not recommended. </p> but this form is not recommended here. </p>
%PARAM smtp_bind_address6 %PARAM smtp_bind_address6
@@ -3410,7 +3413,7 @@ IP hosting, but can be a problem on multi-homed firewalls. See the
inet_interfaces documentation for more detail. </p> inet_interfaces documentation for more detail. </p>
<p> Note 2: address information may be enclosed inside <tt>[]</tt>, <p> Note 2: address information may be enclosed inside <tt>[]</tt>,
but this form is not recommended. </p> but this form is not recommended here. </p>
%PARAM smtp_connection_cache_time_limit 2s %PARAM smtp_connection_cache_time_limit 2s

View File

@@ -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 "20050212" #define MAIL_RELEASE_DATE "20050214"
#define MAIL_VERSION_NUMBER "2.2" #define MAIL_VERSION_NUMBER "2.2"
#define VAR_MAIL_VERSION "mail_version" #define VAR_MAIL_VERSION "mail_version"

View File

@@ -289,7 +289,7 @@ int main(int argc, char **argv)
* all MTA processes cleanly. Give up if we can't separate from our * all MTA processes cleanly. Give up if we can't separate from our
* parent process. We're not supposed to blow away the parent. * parent process. We're not supposed to blow away the parent.
*/ */
if (setsid() == -1) if (debug_me == 0 && setsid() == -1)
msg_fatal("unable to set session and process group ID: %m"); msg_fatal("unable to set session and process group ID: %m");
/* /*

View File

@@ -225,8 +225,8 @@ MASTER_SERV *get_master_ent()
MASTER_SERV *serv; MASTER_SERV *serv;
char *cp; char *cp;
char *name; char *name;
char *host; char *host = 0;
char *port; char *port = 0;
char *transport; char *transport;
int private; int private;
int unprivileged; /* passed on to child */ int unprivileged; /* passed on to child */
@@ -323,7 +323,6 @@ MASTER_SERV *get_master_ent()
serv->listen_fd_count = MASTER_INET_ADDRLIST(serv)->used; serv->listen_fd_count = MASTER_INET_ADDRLIST(serv)->used;
} }
MASTER_INET_PORT(serv) = mystrdup(port); MASTER_INET_PORT(serv) = mystrdup(port);
myfree(atmp);
} else if (STR_SAME(transport, MASTER_XPORT_NAME_UNIX)) { } else if (STR_SAME(transport, MASTER_XPORT_NAME_UNIX)) {
serv->type = MASTER_SERV_TYPE_UNIX; serv->type = MASTER_SERV_TYPE_UNIX;
serv->listen_fd_count = 1; serv->listen_fd_count = 1;
@@ -349,9 +348,39 @@ MASTER_SERV *get_master_ent()
* attributes such as privacy. * attributes such as privacy.
*/ */
if (serv->type == MASTER_SERV_TYPE_INET) { if (serv->type == MASTER_SERV_TYPE_INET) {
MAI_HOSTADDR_STR host_addr;
MAI_SERVPORT_STR serv_port;
struct addrinfo *res0;
if (private) if (private)
fatal_with_context("inet service cannot be private"); fatal_with_context("inet service cannot be private");
serv->name = mystrdup(name); #ifdef SNAPSHOT
if (*host == 0)
host = 0;
/* Canonicalize numeric host and numeric or symbolic service. */
if (hostaddr_to_sockaddr(host, port, 0, &res0) == 0) {
SOCKADDR_TO_HOSTADDR(res0->ai_addr, res0->ai_addrlen,
host ? &host_addr : (MAI_HOSTADDR_STR *) 0,
&serv_port, 0);
serv->name = (host ? concatenate("[", host_addr.buf, "]:",
serv_port.buf, (char *) 0) :
mystrdup(serv_port.buf));
freeaddrinfo(res0);
}
/* Canonicalize numeric or symbolic service. */
else if (hostaddr_to_sockaddr((char *) 0, port, 0, &res0) == 0) {
SOCKADDR_TO_HOSTADDR(res0->ai_addr, res0->ai_addrlen,
(MAI_HOSTADDR_STR *) 0, &serv_port, 0);
serv->name = (host ? concatenate("[", host, "]:",
serv_port.buf, (char *) 0) :
mystrdup(serv_port.buf));
freeaddrinfo(res0);
}
/* Bad service name? */
else
#endif
serv->name = mystrdup(name);
myfree(atmp);
} else if (serv->type == MASTER_SERV_TYPE_UNIX) { } else if (serv->type == MASTER_SERV_TYPE_UNIX) {
serv->name = mail_pathname(private ? MAIL_CLASS_PRIVATE : serv->name = mail_pathname(private ? MAIL_CLASS_PRIVATE :
MAIL_CLASS_PUBLIC, name); MAIL_CLASS_PUBLIC, name);

View File

@@ -41,7 +41,7 @@
/* # $7=sender, $8=recipient1, $9=recipient2 /* # $7=sender, $8=recipient1, $9=recipient2
/* .ti +4 /* .ti +4
/* { if ($8 == "user@example.com" && $9 == "") /* { if ($8 == "user@example.com" && $9 == "")
/* .ti +6 /* .ti +10
/* print $1 } /* print $1 }
/* .br /* .br
/* \' | tr -d '*!' | postsuper -d - /* \' | tr -d '*!' | postsuper -d -

View File

@@ -32,11 +32,11 @@
/* /*
/* smtp_rset() sends a single RSET command and waits for the /* smtp_rset() sends a single RSET command and waits for the
/* response. In case of no response, or negative response, it /* response. In case of no response, or negative response, it
/* turns off caching for the current session. /* turns off connection caching.
/* /*
/* smtp_quit() sends a single QUIT command and waits for the /* smtp_quit() sends a single QUIT command and waits for the
/* response if configured to do so. It always turns off caching /* response if configured to do so. It always turns off connection
/* for the current session. /* caching.
/* DIAGNOSTICS /* DIAGNOSTICS
/* smtp_helo(), smtp_xfer(), smtp_rset() and smtp_quit() return /* smtp_helo(), smtp_xfer(), smtp_rset() and smtp_quit() return
/* 0 in case of success, -1 in case of failure. For smtp_xfer(), /* 0 in case of success, -1 in case of failure. For smtp_xfer(),
@@ -757,7 +757,7 @@ static void smtp_header_rewrite(void *context, int header_class,
addr_list = tok822_grep(tree, TOK822_ADDR); addr_list = tok822_grep(tree, TOK822_ADDR);
for (tpp = addr_list; *tpp; tpp++) for (tpp = addr_list; *tpp; tpp++)
did_rewrite |= smtp_map11_tree(tpp[0], smtp_generic_maps, did_rewrite |= smtp_map11_tree(tpp[0], smtp_generic_maps,
smtp_ext_prop_mask & EXT_PROP_GENERIC); smtp_ext_prop_mask & EXT_PROP_GENERIC);
if (did_rewrite) { if (did_rewrite) {
vstring_sprintf(buf, "%s: ", header_info->name); vstring_sprintf(buf, "%s: ", header_info->name);
tok822_externalize(buf, tree, TOK822_STR_HEAD); tok822_externalize(buf, tree, TOK822_STR_HEAD);
@@ -780,6 +780,8 @@ static void smtp_header_rewrite(void *context, int header_class,
* possible (without rearranging the order of addresses). Prepending * possible (without rearranging the order of addresses). Prepending
* white space to the beginning of lines is delegated to the output * white space to the beginning of lines is delegated to the output
* routine. * routine.
*
* Code derived from cleanup_fold_header().
*/ */
for (line = start = vstring_str(buf); line != 0; line = next_line) { for (line = start = vstring_str(buf); line != 0; line = next_line) {
end_line = line + strcspn(line, "\n"); end_line = line + strcspn(line, "\n");
@@ -798,6 +800,8 @@ static void smtp_header_rewrite(void *context, int header_class,
* rewriting machinery. Just like smtp_header_out(), this code destroys * rewriting machinery. Just like smtp_header_out(), this code destroys
* the header. We could try to avoid clobbering it, but we're not going * the header. We could try to avoid clobbering it, but we're not going
* to use the data any further. * to use the data any further.
*
* Code derived from cleanup_out_header().
*/ */
for (line = start = vstring_str(buf); line != 0; line = next_line) { for (line = start = vstring_str(buf); line != 0; line = next_line) {
next_line = split_at(line, '\n'); next_line = split_at(line, '\n');

View File

@@ -3208,6 +3208,7 @@ static int generic_checks(SMTPD_STATE *state, ARGV *restrictions,
DEFER_IF_REJECT2(state, MAIL_ERROR_POLICY, DEFER_IF_REJECT2(state, MAIL_ERROR_POLICY,
"450 <%s>: %s rejected: defer_if_reject requested", "450 <%s>: %s rejected: defer_if_reject requested",
reply_name, reply_class); reply_name, reply_class);
#ifdef SNAPSHOT
} else if (strcasecmp(name, SLEEP) == 0) { } else if (strcasecmp(name, SLEEP) == 0) {
if (cpp[1] == 0 || alldig(cpp[1]) == 0) { if (cpp[1] == 0 || alldig(cpp[1]) == 0) {
msg_warn("restriction %s must be followed by number", SLEEP); msg_warn("restriction %s must be followed by number", SLEEP);
@@ -3215,6 +3216,7 @@ static int generic_checks(SMTPD_STATE *state, ARGV *restrictions,
MAIL_ERROR_SOFTWARE, "451 Server configuration error")); MAIL_ERROR_SOFTWARE, "451 Server configuration error"));
} else } else
sleep(atoi(*++cpp)); sleep(atoi(*++cpp));
#endif
} }
/* /*