postfix 2.3.3

This commit is contained in:
rpaulo 2006-08-27 00:37:46 +00:00
parent eb74489b57
commit a41b242909
26 changed files with 206 additions and 90 deletions

View File

@ -12637,3 +12637,57 @@ Apologies for any names omitted.
Cleanup: change redundant milter_abort() and milter_disc_event()
calls into NO-OPs. This avoids unnecessary panic() events
for completely harmless conditions. File: milter/milter8.c.
20060805
Bugfix (introduced Postfix 2.3): #ifdef damage caused
smtp_sasl_start() to be invoked twice. Reported by C-J
Lofstedt. File: smtp/smtp_sasl_proto.c.
20060806
Postfix no longer announces its name in delivery status
notifications. Users believe that Wietse provides a free
helpdesk service that solves all their email problems.
Credits to Jonathan Balester. File: bounce/bounce_templates.c.
20060807
Bugfix (introduced Postfix 2.2): when upgrading from Postfix
< 2.2 with the third-party TLS patch, the post-install
upgrade procedure didn't put a "?" in the existing tlsmgr
entry, causing tlsmgr to repeatedly start and exit when TLS
support was not compiled in. File: conf/post-install.
20060812
Bugfix (introduced Postfix < alpha): safety mechanism in
mail_date() didn't work. Found in code review. File:
global/mail_date.c.
20060822
Added missing logging for "message to large" etc. Files:
smtpd/smtpd.c, cleanup/cleanup_milter.c.
20060823
Bugfix (introduced Postfix 2.2): segfault when vstream_fclose()
attempted to flush unwritten output, after vstream_fdclose()
had already disconnected the stream from its file descriptor.
File: util/vstream.c.
Bugfix (introduced Postfix 2.2): vstream_fdclose() did not
flush unwritten output before disconnecting a stream from
its file descriptor(s). File: util/vstream.c.
20060825
Bugfix (introduced Postfix 2.3): with headers-only mail, a
Milter "header insert" action corrupted the queue file. The
cleanup server executed some end-of-body action before the
end-of-header actions. File: cleanup/cleanup_message.c.
Robustness: mail delivery agents now detect loops in queue
files. Files with too many backward jumps are saved to the
"corrupt" directory. File: global/record.c.

View File

@ -49,10 +49,11 @@ Alternatively, for the D.J.B. version of CDB:
"AUXLIBS=$CDB/cdb.a $CDB/alloc.a $CDB/buffer.a $CDB/unix.a $CDB/byte.a"
% make
After postfix has been built with cdb support, you can use "cdb" tables
After Postfix has been built with cdb support, you can use "cdb" tables
wherever you can use read-only "hash", "btree" or "dbm" tables. However, the
"ppoossttmmaapp --ii" (incremental record insertion) and "ppoossttmmaapp --dd" (incremental
record deletion) command-line options are not available. For the same reason
the "cdb" map type cannot be used to store the persistent address verification
cache for the verify(8) service.
cache for the verify(8) service, or to store TLS session information for the
tlsmgr(8) service.

View File

@ -61,24 +61,23 @@ Needless to say, these commands are not available in earlier Postfix versions.
BBuuiillddiinngg PPoossttffiixx wwiitthh DDoovveeccoott SSAASSLL ssuuppppoorrtt
Dovecot SASL support is available in Postfix 2.3 and later. The Dovecot source
code is available via http://www.dovecot.org/. At the time of writing, only
server-side SASL support is available, so you can't use it to authenticate to
your network provider's server. Dovecot uses its own daemon process for
authentication. This keeps the Postfix build process simple, because there is
no need to link extra libraries into Postfix.
Support for the Dovecot version 1 SASL protocol is available in Postfix 2.3 and
later. At the time of writing, only server-side SASL support is available, so
you can't use it to authenticate to your network provider's server. Dovecot
uses its own daemon process for authentication. This keeps the Postfix build
process simple, because there is no need to link extra libraries into Postfix.
To generate the necessary Makefiles, execute the following in the Postfix top-
level directory:
% make makefiles CCARGS='-DUSE_SASL_AUTH -
DDEF_SASL_SERVER_TYPE=\"dovecot\"'
DDEF_SERVER_SASL_TYPE=\"dovecot\"'
After this, proceed with "make" as described in the INSTALL document.
Notes:
* The "-DDEF_SASL_SERVER_TYPE" stuff is not necessary; it just makes Postfix
* The "-DDEF_SERVER_SASL_TYPE" stuff is not necessary; it just makes Postfix
configuration a little more convenient because you don't have to specify
the SASL plug-in type in the Postfix main.cf file.

View File

@ -11,6 +11,13 @@ instead, a new snapshot is released.
The mail_release_date configuration parameter (format: yyyymmdd)
specifies the release date of a stable release or snapshot release.
Incompatible changes with Postfix 2.3.3
---------------------------------------
Postfix no longer announces its name in delivery status notifications.
Users believe that Wietse provides a free help desk service that
solves all their email problems.
Critical notes
--------------

View File

@ -79,10 +79,11 @@ like: </p>
</pre>
</blockquote>
<p> After postfix has been built with cdb support, you can use
<p> After Postfix has been built with cdb support, you can use
"cdb" tables wherever you can use read-only "hash", "btree" or
"dbm" tables. However, the "<b>postmap -i</b>" (incremental record
insertion) and "<b>postmap -d</b>" (incremental record deletion)
command-line options are not available. For the same reason the
"cdb" map type cannot be used to store the persistent address
verification cache for the <a href="verify.8.html">verify(8)</a> service. </p>
verification cache for the <a href="verify.8.html">verify(8)</a> service, or to store
TLS session information for the <a href="tlsmgr.8.html">tlsmgr(8)</a> service. </p>

View File

@ -113,9 +113,8 @@ Postfix versions. </p>
<h2><a name="build_dovecot">Building Postfix with Dovecot SASL
support</a></h2>
<p> Dovecot SASL support is available in Postfix 2.3 and later. The
Dovecot source code is available via <a href="http://www.dovecot.org/">http://www.dovecot.org/</a>. At
the time
<p> Support for the Dovecot version 1 SASL protocol is available
in Postfix 2.3 and later. At the time
of writing, only server-side SASL support is available, so you can't
use it to authenticate to your network provider's server. Dovecot
uses its own daemon process for authentication. This keeps the
@ -127,7 +126,7 @@ in the Postfix top-level directory: </p>
<blockquote>
<pre>
% make makefiles CCARGS='-DUSE_SASL_AUTH -DDEF_SASL_SERVER_TYPE=\"dovecot\"'
% make makefiles CCARGS='-DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\"'
</pre>
</blockquote>
@ -138,7 +137,7 @@ in the Postfix top-level directory: </p>
<ul>
<li> <p> The "-DDEF_SASL_SERVER_TYPE" stuff is not necessary; it just
<li> <p> The "-DDEF_SERVER_SASL_TYPE" stuff is not necessary; it just
makes Postfix configuration a little more convenient because you
don't have to specify the SASL plug-in type in the Postfix <a href="postconf.5.html">main.cf</a>
file. </p>

View File

@ -76,7 +76,7 @@ BOUNCE(5) BOUNCE(5)
Subject: Undelivered Mail Returned to Sender
Postmaster-Subject: Postmaster Copy: Undelivered Mail
This is the $<a href="postconf.5.html#mail_name">mail_name</a> program at host $<a href="postconf.5.html#myhostname">myhostname</a>.
This is the mail system at host $<a href="postconf.5.html#myhostname">myhostname</a>.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
@ -86,7 +86,7 @@ BOUNCE(5) BOUNCE(5)
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The $<a href="postconf.5.html#mail_name">mail_name</a> program
The mail system
EOF
The usage and specification of bounce templates is subject

View File

@ -147,8 +147,8 @@ MASTER(5) MASTER(5)
mented by connecting to the service and sending a
wake up request. A ? at the end of the wake-up
time field requests that no wake up events be sent
before the service is used. Specify 0 for no auto-
matic wake up.
before the first time a service is used. Specify 0
for no automatic wake up.
The <a href="pickup.8.html"><b>pickup</b>(8)</a>, <a href="qmgr.8.html"><b>qmgr</b>(8)</a> and <a href="flush.8.html"><b>flush</b>(8)</a> daemons require
a wake up timer.

View File

@ -5508,6 +5508,11 @@ may wish to turn on the policy (UCE and mail relaying) and protocol
error (broken mail software) reports.
</p>
<p> NOTE: postmaster notifications may contain confidential information
such as SASL passwords or message content. It is the system
administrator's responsibility to treat such information with care.
</p>
<p>
The error classes are:
</p>
@ -11823,7 +11828,8 @@ message contains no To: or Cc: message header. </p>
<p>
The numerical Postfix SMTP server response code when a sender or
recipient address is rejected by the <a href="postconf.5.html#reject_unknown_sender_domain">reject_unknown_sender_domain</a>
or <a href="postconf.5.html#reject_unknown_recipient_domain">reject_unknown_recipient_domain</a> restriction.
or <a href="postconf.5.html#reject_unknown_recipient_domain">reject_unknown_recipient_domain</a> restriction. The response is
always 450 in case of a temporary DNS error.
</p>
<p>

View File

@ -1,4 +1,4 @@
.\" $NetBSD: bounce.5,v 1.1.1.1 2006/07/19 01:16:45 rpaulo Exp $
.\" $NetBSD: bounce.5,v 1.1.1.2 2006/08/27 00:38:02 rpaulo Exp $
.\"
.TH BOUNCE 5
.ad
@ -88,7 +88,7 @@ From: MAILER-DAEMON (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
Postmaster-Subject: Postmaster Copy: Undelivered Mail
This is the $mail_name program at host $myhostname.
This is the mail system at host $myhostname.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
@ -99,7 +99,7 @@ If you do so, please include this problem report. You can
delete your own text from the attached returned message.
.ti +12
The $mail_name program
The mail system
EOF
.in -4
.ad

View File

@ -1,4 +1,4 @@
.\" $NetBSD: master.5,v 1.1.1.2 2006/07/19 01:16:45 rpaulo Exp $
.\" $NetBSD: master.5,v 1.1.1.3 2006/08/27 00:38:03 rpaulo Exp $
.\"
.TH MASTER 5
.ad
@ -136,7 +136,7 @@ Automatically wake up the named service after the specified
number of seconds. The wake up is implemented by connecting
to the service and sending a wake up request. A ? at the
end of the wake-up time field requests that no wake up
events be sent before the service is used.
events be sent before the first time a service is used.
Specify 0 for no automatic wake up.
.sp
The \fBpickup\fR(8), \fBqmgr\fR(8) and \fBflush\fR(8)

View File

@ -79,10 +79,11 @@ like: </p>
</pre>
</blockquote>
<p> After postfix has been built with cdb support, you can use
<p> After Postfix has been built with cdb support, you can use
"cdb" tables wherever you can use read-only "hash", "btree" or
"dbm" tables. However, the "<b>postmap -i</b>" (incremental record
insertion) and "<b>postmap -d</b>" (incremental record deletion)
command-line options are not available. For the same reason the
"cdb" map type cannot be used to store the persistent address
verification cache for the verify(8) service. </p>
verification cache for the verify(8) service, or to store
TLS session information for the tlsmgr(8) service. </p>

View File

@ -113,9 +113,8 @@ Postfix versions. </p>
<h2><a name="build_dovecot">Building Postfix with Dovecot SASL
support</a></h2>
<p> Dovecot SASL support is available in Postfix 2.3 and later. The
Dovecot source code is available via http://www.dovecot.org/. At
the time
<p> Support for the Dovecot version 1 SASL protocol is available
in Postfix 2.3 and later. At the time
of writing, only server-side SASL support is available, so you can't
use it to authenticate to your network provider's server. Dovecot
uses its own daemon process for authentication. This keeps the
@ -127,7 +126,7 @@ in the Postfix top-level directory: </p>
<blockquote>
<pre>
% make makefiles CCARGS='-DUSE_SASL_AUTH -DDEF_SASL_SERVER_TYPE=\"dovecot\"'
% make makefiles CCARGS='-DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\"'
</pre>
</blockquote>
@ -138,7 +137,7 @@ INSTALL document. </p>
<ul>
<li> <p> The "-DDEF_SASL_SERVER_TYPE" stuff is not necessary; it just
<li> <p> The "-DDEF_SERVER_SASL_TYPE" stuff is not necessary; it just
makes Postfix configuration a little more convenient because you
don't have to specify the SASL plug-in type in the Postfix main.cf
file. </p>

View File

@ -76,7 +76,7 @@
# Subject: Undelivered Mail Returned to Sender
# Postmaster-Subject: Postmaster Copy: Undelivered Mail
#
# This is the $mail_name program at host $myhostname.
# This is the mail system at host $myhostname.
#
# I'm sorry to have to inform you that your message could not
# be delivered to one or more recipients. It's attached below.
@ -87,7 +87,7 @@
# delete your own text from the attached returned message.
#
# .ti +12
# The $mail_name program
# The mail system
# EOF
# .in -4
# .ad

View File

@ -128,7 +128,7 @@
# number of seconds. The wake up is implemented by connecting
# to the service and sending a wake up request. A ? at the
# end of the wake-up time field requests that no wake up
# events be sent before the service is used.
# events be sent before the first time a service is used.
# Specify 0 for no automatic wake up.
# .sp
# The \fBpickup\fR(8), \fBqmgr\fR(8) and \fBflush\fR(8)

View File

@ -2801,6 +2801,11 @@ may wish to turn on the policy (UCE and mail relaying) and protocol
error (broken mail software) reports.
</p>
<p> NOTE: postmaster notifications may contain confidential information
such as SASL passwords or message content. It is the system
administrator's responsibility to treat such information with care.
</p>
<p>
The error classes are:
</p>
@ -5894,7 +5899,8 @@ The default time unit is s (seconds).
<p>
The numerical Postfix SMTP server response code when a sender or
recipient address is rejected by the reject_unknown_sender_domain
or reject_unknown_recipient_domain restriction.
or reject_unknown_recipient_domain restriction. The response is
always 450 in case of a temporary DNS error.
</p>
<p>

View File

@ -4,7 +4,7 @@ From: MAILER-DAEMON (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
Postmaster-Subject: Postmaster Copy: Undelivered Mail
This is the $mail_name program at host $myhostname.
This is the mail system at host $myhostname.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
@ -14,7 +14,7 @@ For further assistance, please send mail to <postmaster>
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The $mail_name program
The mail system
EOF
delay_template = <<EOF
@ -23,7 +23,7 @@ From: MAILER-DAEMON (Mail Delivery System)
Subject: Delayed Mail (still being retried)
Postmaster-Subject: Postmaster Warning: Delayed Mail
This is the $mail_name program at host $myhostname.
This is the mail system at host $myhostname.
####################################################################
# THIS IS A WARNING ONLY. YOU DO NOT NEED TO RESEND YOUR MESSAGE. #
@ -37,7 +37,7 @@ For further assistance, please send mail to <postmaster>
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The $mail_name program
The mail system
EOF
success_template = <<EOF
@ -45,14 +45,14 @@ Charset: us-ascii
From: MAILER-DAEMON (Mail Delivery System)
Subject: Successful Mail Delivery Report
This is the $mail_name program at host $myhostname.
This is the mail system at host $myhostname.
Your message was successfully delivered to the destination(s)
listed below. If the message was delivered to mailbox you will
receive no further notifications. Otherwise you may still receive
notifications of mail delivery errors from other systems.
The $mail_name program
The mail system
EOF
verify_template = <<EOF
@ -60,11 +60,11 @@ Charset: us-ascii
From: MAILER-DAEMON (Mail Delivery System)
Subject: Mail Delivery Status Report
This is the $mail_name program at host $myhostname.
This is the mail system at host $myhostname.
Enclosed is the mail delivery report that you requested.
The $mail_name program
The mail system
EOF
failure_template = <<EOF
Charset: us-ascii
@ -72,7 +72,7 @@ From: MAILER-DAEMON (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
Postmaster-Subject: Postmaster Copy: Undelivered Mail
This is the $mail_name program at host $myhostname.
This is the mail system at host $myhostname.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
@ -82,7 +82,7 @@ For further assistance, please send mail to <postmaster>
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The $mail_name program
The mail system
EOF
delay_template = <<EOF
@ -91,7 +91,7 @@ From: MAILER-DAEMON (Mail Delivery System)
Subject: Delayed Mail (still being retried)
Postmaster-Subject: Postmaster Warning: Delayed Mail
This is the $mail_name program at host $myhostname.
This is the mail system at host $myhostname.
####################################################################
# THIS IS A WARNING ONLY. YOU DO NOT NEED TO RESEND YOUR MESSAGE. #
@ -105,7 +105,7 @@ For further assistance, please send mail to <postmaster>
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The $mail_name program
The mail system
EOF
success_template = <<EOF
@ -113,14 +113,14 @@ Charset: us-ascii
From: MAILER-DAEMON (Mail Delivery System)
Subject: Successful Mail Delivery Report
This is the $mail_name program at host $myhostname.
This is the mail system at host $myhostname.
Your message was successfully delivered to the destination(s)
listed below. If the message was delivered to mailbox you will
receive no further notifications. Otherwise you may still receive
notifications of mail delivery errors from other systems.
The $mail_name program
The mail system
EOF
verify_template = <<EOF
@ -128,9 +128,9 @@ Charset: us-ascii
From: MAILER-DAEMON (Mail Delivery System)
Subject: Mail Delivery Status Report
This is the $mail_name program at host $myhostname.
This is the mail system at host $myhostname.
Enclosed is the mail delivery report that you requested.
The $mail_name program
The mail system
EOF

View File

@ -1,4 +1,4 @@
/* $NetBSD: bounce_templates.c,v 1.1.1.1 2006/07/19 01:17:18 rpaulo Exp $ */
/* $NetBSD: bounce_templates.c,v 1.1.1.2 2006/08/27 00:39:27 rpaulo Exp $ */
/*++
/* NAME
@ -95,7 +95,7 @@
* The fail template is for permanent failure.
*/
static const char *def_bounce_failure_body[] = {
"This is the $mail_name program at host $myhostname.",
"This is the mail system at host $myhostname.",
"",
"I'm sorry to have to inform you that your message could not",
"be delivered to one or more recipients. It's attached below.",
@ -105,7 +105,7 @@ static const char *def_bounce_failure_body[] = {
"If you do so, please include this problem report. You can",
"delete your own text from the attached returned message.",
"",
" The $mail_name program",
" The mail system",
0,
};
@ -126,7 +126,7 @@ static const BOUNCE_TEMPLATE def_bounce_failure_template = {
* The delay template is for delayed mail notifications.
*/
static const char *def_bounce_delay_body[] = {
"This is the $mail_name program at host $myhostname.",
"This is the mail system at host $myhostname.",
"",
"####################################################################",
"# THIS IS A WARNING ONLY. YOU DO NOT NEED TO RESEND YOUR MESSAGE. #",
@ -141,7 +141,7 @@ static const char *def_bounce_delay_body[] = {
"If you do so, please include this problem report. You can",
"delete your own text from the attached returned message.",
"",
" The $mail_name program",
" The mail system",
0,
};
@ -163,14 +163,14 @@ static const BOUNCE_TEMPLATE def_bounce_delay_template = {
* notifications.
*/
static const char *def_bounce_success_body[] = {
"This is the $mail_name program at host $myhostname.",
"This is the mail system at host $myhostname.",
"",
"Your message was successfully delivered to the destination(s)",
"listed below. If the message was delivered to mailbox you will",
"receive no further notifications. Otherwise you may still receive",
"notifications of mail delivery errors from other systems.",
"",
" The $mail_name program",
" The mail system",
0,
};
@ -192,11 +192,11 @@ static const BOUNCE_TEMPLATE def_bounce_success_template = {
* address verification (sendmail -bv).
*/
static const char *def_bounce_verify_body[] = {
"This is the $mail_name program at host $myhostname.",
"This is the mail system at host $myhostname.",
"",
"Enclosed is the mail delivery report that you requested.",
"",
" The $mail_name program",
" The mail system",
0,
};

View File

@ -4,7 +4,7 @@ From: MAILER-DAEMON (Mail Delivery System)
Subject: Undelivered Mail Returned to Sender
Postmaster-Subject: Postmaster Copy: Undelivered Mail
This is the $mail_name program at host $myhostname.
This is the mail system at host $myhostname.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
@ -14,7 +14,7 @@ For further assistance, please send mail to <postmaster>
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The $mail_name program
The mail system
EOF
delay_template = <<EOF
@ -23,7 +23,7 @@ From: MAILER-DAEMON (Mail Delivery System)
Subject: Delayed Mail (still being retried)
Postmaster-Subject: Postmaster Warning: Delayed Mail
This is the $mail_name program at host $myhostname.
This is the mail system at host $myhostname.
####################################################################
# THIS IS A WARNING ONLY. YOU DO NOT NEED TO RESEND YOUR MESSAGE. #
@ -37,7 +37,7 @@ For further assistance, please send mail to <postmaster>
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The $mail_name program
The mail system
EOF
success_template = <<EOF
@ -45,14 +45,14 @@ Charset: us-ascii
From: MAILER-DAEMON (Mail Delivery System)
Subject: Successful Mail Delivery Report
This is the $mail_name program at host $myhostname.
This is the mail system at host $myhostname.
Your message was successfully delivered to the destination(s)
listed below. If the message was delivered to mailbox you will
receive no further notifications. Otherwise you may still receive
notifications of mail delivery errors from other systems.
The $mail_name program
The mail system
EOF
verify_template = <<EOF
@ -60,9 +60,9 @@ Charset: us-ascii
From: MAILER-DAEMON (Mail Delivery System)
Subject: Mail Delivery Status Report
This is the $mail_name program at host $myhostname.
This is the mail system at host $myhostname.
Enclosed is the mail delivery report that you requested.
The $mail_name program
The mail system
EOF

View File

@ -1,4 +1,4 @@
/* $NetBSD: cleanup_message.c,v 1.1.1.11 2006/07/19 01:17:19 rpaulo Exp $ */
/* $NetBSD: cleanup_message.c,v 1.1.1.12 2006/08/27 00:39:32 rpaulo Exp $ */
/*++
/* NAME
@ -799,10 +799,10 @@ static void cleanup_message_headerbody(CLEANUP_STATE *state, int type,
* current file position so we can compute the message size lateron.
*/
else if (type == REC_TYPE_XTRA) {
state->mime_errs = mime_state_update(state->mime_state, type, buf, len);
if (state->milters || cleanup_milters)
/* Make room for body modification. */
cleanup_out_format(state, REC_TYPE_PTR, REC_TYPE_PTR_FORMAT, 0L);
state->mime_errs = mime_state_update(state->mime_state, type, buf, len);
/* Ignore header truncation after primary message headers. */
state->mime_errs &= ~MIME_ERR_TRUNC_HEADER;
if (state->mime_errs && state->reason == 0) {

View File

@ -1,4 +1,4 @@
/* $NetBSD: cleanup_milter.c,v 1.1.1.2 2006/08/01 00:03:43 rpaulo Exp $ */
/* $NetBSD: cleanup_milter.c,v 1.1.1.3 2006/08/27 00:39:34 rpaulo Exp $ */
/*++
/* NAME
@ -215,11 +215,14 @@
static void cleanup_milter_set_error(CLEANUP_STATE *state, int err)
{
if (err == EFBIG)
if (err == EFBIG) {
msg_warn("%s: queue file size limit exceeded", state->queue_id);
state->errs |= CLEANUP_STAT_SIZE;
else
} else {
msg_warn("%s: write queue file: %m", state->queue_id);
state->errs |= CLEANUP_STAT_WRITE;
}
}
/* cleanup_milter_error - return dummy error description */

View File

@ -1,4 +1,4 @@
/* $NetBSD: mail_date.c,v 1.1.1.4 2004/05/31 00:24:31 heas Exp $ */
/* $NetBSD: mail_date.c,v 1.1.1.5 2006/08/27 00:39:46 rpaulo Exp $ */
/*++
/* NAME
@ -123,7 +123,7 @@ const char *mail_date(time_t when)
* Finally, add the time zone name.
*/
while (strftime(vstring_end(vp), vstring_avail(vp), " (%Z)", lt) == 0)
VSTRING_SPACE(vp, 100);
VSTRING_SPACE(vp, vstring_avail(vp) + 100);
VSTRING_SKIP(vp);
return (vstring_str(vp));

View File

@ -1,4 +1,4 @@
/* $NetBSD: mail_version.h,v 1.1.1.24 2006/08/01 00:03:53 rpaulo Exp $ */
/* $NetBSD: mail_version.h,v 1.1.1.25 2006/08/27 00:39:50 rpaulo Exp $ */
#ifndef _MAIL_VERSION_H_INCLUDED_
#define _MAIL_VERSION_H_INCLUDED_
@ -22,8 +22,8 @@
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
#define MAIL_RELEASE_DATE "20060727"
#define MAIL_VERSION_NUMBER "2.3.2"
#define MAIL_RELEASE_DATE "200600825"
#define MAIL_VERSION_NUMBER "2.3.3"
#ifdef SNAPSHOT
# define MAIL_VERSION_DATE "-" MAIL_RELEASE_DATE

View File

@ -1,4 +1,4 @@
/* $NetBSD: record.c,v 1.1.1.4 2006/07/19 01:17:28 rpaulo Exp $ */
/* $NetBSD: record.c,v 1.1.1.5 2006/08/27 00:39:56 rpaulo Exp $ */
/*++
/* NAME
@ -295,18 +295,42 @@ int rec_get_raw(VSTREAM *stream, VSTRING *buf, ssize_t maxsize, int flags)
int rec_goto(VSTREAM *stream, const char *buf)
{
off_t offset;
static const char *saved_path;
static off_t saved_offset;
static int reverse_count;
/*
* Crude workaround for queue file loops. VSTREAMs currently have no
* option to attach application-specific data, so we use global state and
* simple logic to detect if an application switches streams. We trigger
* on reverse jumps only. There's one reverse jump for every inserted
* header, but only one reverse jump for all appended recipients. No-one
* is likely to insert 10000 message headers, but someone might append
* 10000 recipients.
*/
#define STREQ(x,y) ((x) == (y) && strcmp((x), (y)) == 0)
#define REVERSE_JUMP_LIMIT 10000
if (!STREQ(saved_path, VSTREAM_PATH(stream))) {
saved_path = VSTREAM_PATH(stream);
reverse_count = 0;
saved_offset = 0;
}
while (ISSPACE(*buf))
buf++;
if ((offset = off_cvt_string(buf)) < 0) {
msg_warn("%s: malformed pointer record value: %s",
VSTREAM_PATH(stream), buf);
return (REC_TYPE_ERROR);
} else if (offset < saved_offset && ++reverse_count > REVERSE_JUMP_LIMIT) {
msg_warn("%s: too many reverse jump records", VSTREAM_PATH(stream));
return (REC_TYPE_ERROR);
} else if (offset > 0 && vstream_fseek(stream, offset, SEEK_SET) < 0) {
msg_warn("%s: seek error after pointer record: %m",
VSTREAM_PATH(stream));
return (REC_TYPE_ERROR);
} else {
saved_offset = offset;
return (0);
}
}

View File

@ -1,4 +1,4 @@
/* $NetBSD: smtp_sasl_proto.c,v 1.1.1.6 2006/07/19 01:17:41 rpaulo Exp $ */
/* $NetBSD: smtp_sasl_proto.c,v 1.1.1.7 2006/08/27 00:40:33 rpaulo Exp $ */
/*++
/* NAME
@ -178,18 +178,19 @@ int smtp_sasl_helo_login(SMTP_STATE *state)
ret = smtp_sess_fail(state);
/* Session reuse is disabled. */
} else {
#ifdef USE_TLS
if (session->tls_context == 0)
#endif
#ifndef USE_TLS
smtp_sasl_start(session, VAR_SMTP_SASL_OPTS,
var_smtp_sasl_opts);
#else
if (session->tls_context == 0)
smtp_sasl_start(session, VAR_SMTP_SASL_OPTS,
var_smtp_sasl_opts);
#ifdef USE_TLS
#ifdef SNAPSHOT /* XXX: Not yet */
else if (session->tls_context->peer_verified)
smtp_sasl_start(session, VAR_SMTP_SASL_TLSV_OPTS,
var_smtp_sasl_tlsv_opts);
else
#endif
else
smtp_sasl_start(session, VAR_SMTP_SASL_TLS_OPTS,
var_smtp_sasl_tls_opts);
#endif

View File

@ -1,4 +1,4 @@
/* $NetBSD: vstream.c,v 1.1.1.7 2006/07/19 01:17:56 rpaulo Exp $ */
/* $NetBSD: vstream.c,v 1.1.1.8 2006/08/27 00:41:19 rpaulo Exp $ */
/*++
/* NAME
@ -1051,8 +1051,9 @@ int vstream_fclose(VSTREAM *stream)
*/
if (stream->pid != 0)
msg_panic("vstream_fclose: stream has process");
if ((stream->buf.flags & VSTREAM_FLAG_WRITE_DOUBLE) != 0)
if ((stream->buf.flags & VSTREAM_FLAG_WRITE_DOUBLE) != 0 && stream->fd >= 0)
vstream_fflush(stream);
/* Do not remove: vstream_fdclose() depends on this error test. */
err = vstream_ferror(stream);
if (stream->buf.flags & VSTREAM_FLAG_DOUBLE) {
if (stream->read_fd >= 0)
@ -1081,8 +1082,22 @@ int vstream_fclose(VSTREAM *stream)
int vstream_fdclose(VSTREAM *stream)
{
/*
* Flush unwritten output, just like vstream_fclose(). Errors are
* reported by vstream_fclose().
*/
if ((stream->buf.flags & VSTREAM_FLAG_WRITE_DOUBLE) != 0)
(void) vstream_fflush(stream);
/*
* NOTE: Negative file descriptors are not part of the external
* interface. They are for internal use only, in order to support
* vstream_fdclose() without a lot of code duplication. Applications that
* rely on negative VSTREAM file descriptors will break without warning.
*/
if (stream->buf.flags & VSTREAM_FLAG_DOUBLE) {
stream->read_fd = stream->write_fd = -1;
stream->fd = stream->read_fd = stream->write_fd = -1;
} else {
stream->fd = -1;
}