Workaround: AIX 5.1 getaddrinfo() can't handle a "0" service
argument. Instead we specify "1". Files: util/inet_addr_host.c.
-20040513
+20050113
Cleanup: now that the over-all structure is proving itself,
clean up some internal APIs to increase robustness and get
This reduces time for checking the Postfix queue. Files:
conf/post-install, global/mail_params.h.
-20040514
+20050114
Further cleanup: eliminate duplicate IPv6 results when the
mynetworks value is generated by Postfix. More documentation
Milestone: first non-non-production snapshot with TLS.
-20040524
+20050124
Workaround: don't send mail to $fallback_relay if Postfix
is MX host for the next-hop destination. This is, however,
command examples. Files: mantools/manlint, mantools/fixman,
mantools/postconf2man.
+20050205
+
+ Cleanup: updated the mass-deletion example in the postsuper
+ manual.
+
20050206
Cleanup: don't count a [45]XX SMTP server greeting towards
mis-behaves when the current entry is deleted. File:
tls/tls_scache.c.
-20040211
+20050211
Cleanup: the "generics" feature (output address rewriting)
is renamed to "generic", for consistency with "canonical"
When header address rewriting is enabled, Postfix now updates a
message header only when at least one address address in that header
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
================================================
(and colon) may be omitted. Either host or
port may be given in symbolic form (host or
service name) or in numeric form (IP address
- or port number).
-
- Examples: a service named <b>127.0.0.1:smtp</b>
- receives mail via the loopback interface
- only; and a service named <b>10025</b> accepts con-
- nections on TCP port 10025 via all inter-
- faces configured with the <b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a></b>
- parameter.
+ 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> or
+ <b>::1:smtp</b> receives mail via the loopback
+ interface only; and a service named <b>10025</b>
+ accepts connections on TCP port 10025 via
+ all interfaces configured with the
+ <b><a href="postconf.5.html#inet_interfaces">inet_interfaces</a></b> parameter.
<b>unix</b> The service listens on a UNIX-domain socket
and is accessible for local clients only.
</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> 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
that is not a loopback address, the Postfix SMTP client will use
this address as the IP source address for outbound mail. Support
<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>,
-but this form is not recommended. </p>
+but this form is not recommended here. </p>
</DD>
<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>,
-but this form is not recommended. </p>
+but this form is not recommended here. </p>
</DD>
mailq | tail +2 | awk 'BEGIN { RS = "" }
# $7=sender, $8=recipient1, $9=recipient2
{ if ($8 == "user@example.com" && $9 == "")
- print $1 }
+ print $1 }
' | tr -d '*!' | postsuper -d -
Specify <b>-d ALL</b> to remove all messages; for example,
# $7=sender, $8=recipient1, $9=recipient2
.ti +4
{ if ($8 == "user@example.com" && $9 == "")
-.ti +6
+.ti +10
print $1 }
.br
\' | tr -d '*!' | postsuper -d -
accepted. The host part (and colon) may be omitted. Either
host or port may be given in symbolic form (host or service
name) or in numeric form (IP address or port number).
+Host information may be enclosed inside "[]", but this form
+is not necessary.
.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
\fB10025\fR accepts connections on TCP port 10025 via
all interfaces configured with the \fBinet_interfaces\fR
on loopback network interfaces only (Postfix 2.2 and later). The
parameter also controls delivery of mail to <tt>user@[ip.address]</tt>.
.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
When inet_interfaces specifies just one IPv4 and/or IPv6 address
that is not a loopback address, the Postfix SMTP client will use
inet_interfaces documentation for more detail.
.PP
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)
An optional numerical network address that the SMTP client should
bind to when making an IPv6 connection.
inet_interfaces documentation for more detail.
.PP
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)
The SMTP client time limit for completing a TCP connection, or
zero (use the operating system built-in time limit).
# accepted. The host part (and colon) may be omitted. Either
# host or port may be given in symbolic form (host or service
# name) or in numeric form (IP address or port number).
+# Host information may be enclosed inside "[]", but this form
+# is not necessary.
# .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
# \fB10025\fR accepts connections on TCP port 10025 via
# all interfaces configured with the \fBinet_interfaces\fR
</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> 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
that is not a loopback address, the Postfix SMTP client will use
this address as the IP source address for outbound mail. Support
inet_interfaces documentation for more detail. </p>
<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
inet_interfaces documentation for more detail. </p>
<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
* Patches change the patchlevel and the release date. Snapshots change the
* release date only.
*/
-#define MAIL_RELEASE_DATE "20050212"
+#define MAIL_RELEASE_DATE "20050214"
#define MAIL_VERSION_NUMBER "2.2"
#define VAR_MAIL_VERSION "mail_version"
* all MTA processes cleanly. Give up if we can't separate from our
* 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");
/*
MASTER_SERV *serv;
char *cp;
char *name;
- char *host;
- char *port;
+ char *host = 0;
+ char *port = 0;
char *transport;
int private;
int unprivileged; /* passed on to child */
serv->listen_fd_count = MASTER_INET_ADDRLIST(serv)->used;
}
MASTER_INET_PORT(serv) = mystrdup(port);
- myfree(atmp);
} else if (STR_SAME(transport, MASTER_XPORT_NAME_UNIX)) {
serv->type = MASTER_SERV_TYPE_UNIX;
serv->listen_fd_count = 1;
* attributes such as privacy.
*/
if (serv->type == MASTER_SERV_TYPE_INET) {
+ MAI_HOSTADDR_STR host_addr;
+ MAI_SERVPORT_STR serv_port;
+ struct addrinfo *res0;
+
if (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) {
serv->name = mail_pathname(private ? MAIL_CLASS_PRIVATE :
MAIL_CLASS_PUBLIC, name);
/* # $7=sender, $8=recipient1, $9=recipient2
/* .ti +4
/* { if ($8 == "user@example.com" && $9 == "")
-/* .ti +6
+/* .ti +10
/* print $1 }
/* .br
/* \' | tr -d '*!' | postsuper -d -
/*
/* smtp_rset() sends a single RSET command and waits for the
/* 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
-/* response if configured to do so. It always turns off caching
-/* for the current session.
+/* response if configured to do so. It always turns off connection
+/* caching.
/* DIAGNOSTICS
/* smtp_helo(), smtp_xfer(), smtp_rset() and smtp_quit() return
/* 0 in case of success, -1 in case of failure. For smtp_xfer(),
addr_list = tok822_grep(tree, TOK822_ADDR);
for (tpp = addr_list; *tpp; tpp++)
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) {
vstring_sprintf(buf, "%s: ", header_info->name);
tok822_externalize(buf, tree, TOK822_STR_HEAD);
* possible (without rearranging the order of addresses). Prepending
* white space to the beginning of lines is delegated to the output
* routine.
+ *
+ * Code derived from cleanup_fold_header().
*/
for (line = start = vstring_str(buf); line != 0; line = next_line) {
end_line = line + strcspn(line, "\n");
* rewriting machinery. Just like smtp_header_out(), this code destroys
* the header. We could try to avoid clobbering it, but we're not going
* to use the data any further.
+ *
+ * Code derived from cleanup_out_header().
*/
for (line = start = vstring_str(buf); line != 0; line = next_line) {
next_line = split_at(line, '\n');
DEFER_IF_REJECT2(state, MAIL_ERROR_POLICY,
"450 <%s>: %s rejected: defer_if_reject requested",
reply_name, reply_class);
+#ifdef SNAPSHOT
} else if (strcasecmp(name, SLEEP) == 0) {
if (cpp[1] == 0 || alldig(cpp[1]) == 0) {
msg_warn("restriction %s must be followed by number", SLEEP);
MAIL_ERROR_SOFTWARE, "451 Server configuration error"));
} else
sleep(atoi(*++cpp));
+#endif
}
/*