upgrade-configuration" append "inet_protocols = ipv4" to
main.cf when no explicit setting is present. This compatibility
workaround will be phased out in a future release. Files:
- global/mail_params.h, conf/post-install, proto/postconf.proto.
+ util/sys_defs.h, conf/post-install, proto/postconf.proto.
Incompatibility: the default smtp_address_preference value
is now "any" instead of "ipv6", meaning choose randomly
responses from a before-queue content filter as text with
bare <LF> instead of <CR><LF>. Found during code maintenance.
File: smtpd/smtpd_proxy.c.
+
+20111011
+
+ Cleanup: for consistency with the SMTP standard, the
+ smtp_line_length_limit default value was increased from 990
+ characters to 998 (i.e. 1000 characters including <CR><LF>).
+ File: global/mail_params.h, proto/postconf.proto.
+
+ Cleanup: the Postfix sendmail command now always transforms
+ all input lines ending in <CR><LF> into UNIX format (lines
+ ending in <LF>). This simplifies integration with third-party
+ mail generating applications. Specify "sendmail_fix_line_endings
+ = strict" to restore historical Postfix behavior (i.e. convert
+ all input lines ending in <CR><LF> only if the first input
+ line ends in <CR><LF>). Files: sendmail/sendmail.c,
+ global/mail_params.h, proto/postconf.proto.
If you upgrade from Postfix 2.7 or earlier, read RELEASE_NOTES-2.8
before proceeding.
+Incompatible changes with snapshot 201110XX
+===========================================
+
+For consistency with the SMTP standard, the smtp_line_length_limit
+default value was increased from 990 characters to 998 (i.e. 1000
+characters including <CR><LF>). Specify "smtp_line_length_limit =
+990" to restore historical Postfix behavior.
+
+To simplify integration with third-party applications, the Postfix
+sendmail command now always transforms all input lines ending in
+<CR><LF> into UNIX format (lines ending in <LF>). Specify
+"sendmail_fix_line_endings = strict" to restore historical Postfix
+behavior (i.e. convert all input lines ending in <CR><LF> only if
+the first line ends in <CR><LF>).
+
Incompatible changes with snapshot 20110918
===========================================
Things to do after the stable release:
+ TLS_README has the priorities reversed. The section about
+ SMTP client settings begins with an exposition about client
+ certificates, which almost no-one needs. Instead, the text
+ should first explain how to turn on opportunistic TLS. After
+ that, it can discuss the gory details of higher security
+ levels for the few people who need it.
+
+ Investigate viability of memcached for applications
+ that require performance for low-security operations
+ such as sharing the postscreen cache.
+
Investigate viability of Sendmail socket maps (the moral
equivalent of tcp_table(5)), and dns maps.
+ Check if FILTER_README has the "postsuper -r" workaround
+
+ Bounces without <> in the plaintext section. Apparently,
+ some software renders the text as HTML (and therefore
+ does not render addresses and other text inside <> ).
+
Make the rules for how to use close-on-exec more explicit.
Provide separate timeout control for dict_proxy client,
summary. See <a href="postconf.5.html"><b>postconf</b>(5)</a> for more details including exam-
ples.
+<b>COMPATIBILITY CONTROLS</b>
+ <b>sendmail_fix_line_endings (always)</b>
+ Controls how the Postfix sendmail command converts
+ email message line endings from <CR><LF> into UNIX
+ format (<LF>).
+
<b>TROUBLE SHOOTING CONTROLS</b>
The <a href="DEBUG_README.html">DEBUG_README</a> file gives examples of how to trouble
shoot a Postfix system.
<b>ACCESS CONTROLS</b>
Available in Postfix version 2.2 and later:
- <b><a href="postconf.5.html#authorized_flush_users">authorized_flush_users</a> (static:anyone)</b>
+ <b><a href="postconf.5.html#authorized_flush_users">authorized_flush_users</a> (<a href="DATABASE_README.html#types">static</a>:anyone)</b>
List of users who are authorized to flush the
queue.
- <b><a href="postconf.5.html#authorized_mailq_users">authorized_mailq_users</a> (static:anyone)</b>
+ <b><a href="postconf.5.html#authorized_mailq_users">authorized_mailq_users</a> (<a href="DATABASE_README.html#types">static</a>:anyone)</b>
List of users who are authorized to view the queue.
- <b><a href="postconf.5.html#authorized_submit_users">authorized_submit_users</a> (static:anyone)</b>
+ <b><a href="postconf.5.html#authorized_submit_users">authorized_submit_users</a> (<a href="DATABASE_README.html#types">static</a>:anyone)</b>
List of users who are authorized to submit mail
with the <a href="sendmail.1.html"><b>sendmail</b>(1)</a> command (and with the privi-
leged <a href="postdrop.1.html"><b>postdrop</b>(1)</a> helper command).
summary. See <a href="postconf.5.html"><b>postconf</b>(5)</a> for more details including exam-
ples.
+<b>COMPATIBILITY CONTROLS</b>
+ <b>sendmail_fix_line_endings (always)</b>
+ Controls how the Postfix sendmail command converts
+ email message line endings from <CR><LF> into UNIX
+ format (<LF>).
+
<b>TROUBLE SHOOTING CONTROLS</b>
The <a href="DEBUG_README.html">DEBUG_README</a> file gives examples of how to trouble
shoot a Postfix system.
<b>ACCESS CONTROLS</b>
Available in Postfix version 2.2 and later:
- <b><a href="postconf.5.html#authorized_flush_users">authorized_flush_users</a> (static:anyone)</b>
+ <b><a href="postconf.5.html#authorized_flush_users">authorized_flush_users</a> (<a href="DATABASE_README.html#types">static</a>:anyone)</b>
List of users who are authorized to flush the
queue.
- <b><a href="postconf.5.html#authorized_mailq_users">authorized_mailq_users</a> (static:anyone)</b>
+ <b><a href="postconf.5.html#authorized_mailq_users">authorized_mailq_users</a> (<a href="DATABASE_README.html#types">static</a>:anyone)</b>
List of users who are authorized to view the queue.
- <b><a href="postconf.5.html#authorized_submit_users">authorized_submit_users</a> (static:anyone)</b>
+ <b><a href="postconf.5.html#authorized_submit_users">authorized_submit_users</a> (<a href="DATABASE_README.html#types">static</a>:anyone)</b>
List of users who are authorized to submit mail
with the <a href="sendmail.1.html"><b>sendmail</b>(1)</a> command (and with the privi-
leged <a href="postdrop.1.html"><b>postdrop</b>(1)</a> helper command).
</p>
+</DD>
+
+<DT><b><a name="sendmail_fix_line_endings">sendmail_fix_line_endings</a>
+(default: always)</b></DT><DD>
+
+<p> Controls how the Postfix sendmail command converts email message
+line endings from <CR><LF> into UNIX format (<LF>).
+</p>
+
+<dl>
+
+<dt> <b>always</b> </dt> <dd> Always convert message lines ending
+in <CR><LF>. This setting is the default with Postfix
+2.9 and later. </dd>
+
+<dt> <b>strict</b> </dt> <dd> Convert message lines ending in
+<CR><LF> only if the first input line ends in
+<CR><LF>. This setting is backwards-compatible with
+Postfix 2.8 and earlier. </dd>
+
+<dt> <b>never</b> </dt> <dd> Never convert message lines ending in
+<CR><LF>. This setting exists for completeness only.
+</dd>
+
+</dl>
+
+<p> This feature is available in Postfix 2.9 and later. </p>
+
+
</DD>
<DT><b><a name="sendmail_path">sendmail_path</a>
</DD>
<DT><b><a name="smtp_line_length_limit">smtp_line_length_limit</a>
-(default: 990)</b></DT><DD>
+(default: 998)</b></DT><DD>
<p>
The maximal length of message header and body lines that Postfix
-will send via SMTP. Longer lines are broken by inserting
-"<CR><LF><SPACE>". This minimizes the damage to
-MIME formatted mail.
+will send via SMTP. This limit does not include the <CR><LF>
+at the end of each line. Longer lines are broken by inserting
+"<CR><LF><SPACE>", to minimize the damage to MIME
+formatted mail.
</p>
<p>
-By default, the line length is limited to 990 characters, because
-some server implementations cannot receive mail with long lines.
+The Postfix limit of 998 characters not including <CR><LF>
+is consistent with the SMTP limit of 1000 characters including
+<CR><LF>. The Postfix limit was 990 with Postfix 2.8
+and earlier.
</p>
summary. See <a href="postconf.5.html"><b>postconf</b>(5)</a> for more details including exam-
ples.
+<b>COMPATIBILITY CONTROLS</b>
+ <b>sendmail_fix_line_endings (always)</b>
+ Controls how the Postfix sendmail command converts
+ email message line endings from <CR><LF> into UNIX
+ format (<LF>).
+
<b>TROUBLE SHOOTING CONTROLS</b>
The <a href="DEBUG_README.html">DEBUG_README</a> file gives examples of how to trouble
shoot a Postfix system.
<b>ACCESS CONTROLS</b>
Available in Postfix version 2.2 and later:
- <b><a href="postconf.5.html#authorized_flush_users">authorized_flush_users</a> (static:anyone)</b>
+ <b><a href="postconf.5.html#authorized_flush_users">authorized_flush_users</a> (<a href="DATABASE_README.html#types">static</a>:anyone)</b>
List of users who are authorized to flush the
queue.
- <b><a href="postconf.5.html#authorized_mailq_users">authorized_mailq_users</a> (static:anyone)</b>
+ <b><a href="postconf.5.html#authorized_mailq_users">authorized_mailq_users</a> (<a href="DATABASE_README.html#types">static</a>:anyone)</b>
List of users who are authorized to view the queue.
- <b><a href="postconf.5.html#authorized_submit_users">authorized_submit_users</a> (static:anyone)</b>
+ <b><a href="postconf.5.html#authorized_submit_users">authorized_submit_users</a> (<a href="DATABASE_README.html#types">static</a>:anyone)</b>
List of users who are authorized to submit mail
with the <a href="sendmail.1.html"><b>sendmail</b>(1)</a> command (and with the privi-
leged <a href="postdrop.1.html"><b>postdrop</b>(1)</a> helper command).
this program.
The text below provides only a parameter summary. See
\fBpostconf\fR(5) for more details including examples.
+.SH "COMPATIBILITY CONTROLS"
+.na
+.nf
+.ad
+.fi
+.IP "\fBsendmail_fix_line_endings (always)\fR"
+Controls how the Postfix sendmail command converts email message
+line endings from <CR><LF> into UNIX format (<LF>).
.SH "TROUBLE SHOOTING CONTROLS"
.na
.nf
substitutions in regular expression maps.
.PP
This feature is available in Postfix 2.3 and later.
+.SH sendmail_fix_line_endings (default: always)
+Controls how the Postfix sendmail command converts email message
+line endings from <CR><LF> into UNIX format (<LF>).
+.IP "\fBalways\fR"
+Always convert message lines ending
+in <CR><LF>. This setting is the default with Postfix
+2.9 and later.
+.IP "\fBstrict\fR"
+Convert message lines ending in
+<CR><LF> only if the first input line ends in
+<CR><LF>. This setting is backwards-compatible with
+Postfix 2.8 and earlier.
+.IP "\fBnever\fR"
+Never convert message lines ending in
+<CR><LF>. This setting exists for completeness only.
+.PP
+This feature is available in Postfix 2.9 and later.
.SH sendmail_path (default: see "postconf -d" output)
A Sendmail compatibility feature that specifies the location of
the Postfix \fBsendmail\fR(1) command. This command can be used to
Use the native service for hosts not found in the DNS.
.PP
This feature is available in Postfix 2.1 and later.
-.SH smtp_line_length_limit (default: 990)
+.SH smtp_line_length_limit (default: 998)
The maximal length of message header and body lines that Postfix
-will send via SMTP. Longer lines are broken by inserting
-"<CR><LF><SPACE>". This minimizes the damage to
-MIME formatted mail.
-.PP
-By default, the line length is limited to 990 characters, because
-some server implementations cannot receive mail with long lines.
+will send via SMTP. This limit does not include the <CR><LF>
+at the end of each line. Longer lines are broken by inserting
+"<CR><LF><SPACE>", to minimize the damage to MIME
+formatted mail.
+.PP
+The Postfix limit of 998 characters not including <CR><LF>
+is consistent with the SMTP limit of 1000 characters including
+<CR><LF>. The Postfix limit was 990 with Postfix 2.8
+and earlier.
.SH smtp_mail_timeout (default: 300s)
The SMTP client time limit for sending the MAIL FROM command, and
for receiving the server response.
This feature is available in Postfix 2.1 and later.
</p>
-%PARAM smtp_line_length_limit 990
+%PARAM smtp_line_length_limit 998
<p>
The maximal length of message header and body lines that Postfix
-will send via SMTP. Longer lines are broken by inserting
-"<CR><LF><SPACE>". This minimizes the damage to
-MIME formatted mail.
+will send via SMTP. This limit does not include the <CR><LF>
+at the end of each line. Longer lines are broken by inserting
+"<CR><LF><SPACE>", to minimize the damage to MIME
+formatted mail.
</p>
<p>
-By default, the line length is limited to 990 characters, because
-some server implementations cannot receive mail with long lines.
+The Postfix limit of 998 characters not including <CR><LF>
+is consistent with the SMTP limit of 1000 characters including
+<CR><LF>. The Postfix limit was 990 with Postfix 2.8
+and earlier.
</p>
%PARAM smtp_mail_timeout 300s
name changes. </p>
<p> This feature is available in Postfix 2.9 and later. </p>
+
+%PARAM sendmail_fix_line_endings always
+
+<p> Controls how the Postfix sendmail command converts email message
+line endings from <CR><LF> into UNIX format (<LF>).
+</p>
+
+<dl>
+
+<dt> <b>always</b> </dt> <dd> Always convert message lines ending
+in <CR><LF>. This setting is the default with Postfix
+2.9 and later. </dd>
+
+<dt> <b>strict</b> </dt> <dd> Convert message lines ending in
+<CR><LF> only if the first input line ends in
+<CR><LF>. This setting is backwards-compatible with
+Postfix 2.8 and earlier. </dd>
+
+<dt> <b>never</b> </dt> <dd> Never convert message lines ending in
+<CR><LF>. This setting exists for completeness only.
+</dd>
+
+</dl>
+
+<p> This feature is available in Postfix 2.9 and later. </p>
extern bool var_smtp_rand_addr;
#define VAR_SMTP_LINE_LIMIT "smtp_line_length_limit"
-#define DEF_SMTP_LINE_LIMIT 990
+#define DEF_SMTP_LINE_LIMIT 998
#define VAR_LMTP_LINE_LIMIT "lmtp_line_length_limit"
-#define DEF_LMTP_LINE_LIMIT 990
+#define DEF_LMTP_LINE_LIMIT 998
extern int var_smtp_line_limit;
#define VAR_SMTP_PIX_THRESH "smtp_pix_workaround_threshold_time"
#define DEF_LMTP_REC_DEADLINE 0
extern bool var_smtp_rec_deadline;
+ /*
+ * Postfix sendmail command compatibility features.
+ */
+#define SM_FIX_EOL_STRICT "strict"
+#define SM_FIX_EOL_NEVER "never"
+#define SM_FIX_EOL_ALWAYS "always"
+
+#define VAR_SM_FIX_EOL "sendmail_fix_line_endings"
+#define DEF_SM_FIX_EOL SM_FIX_EOL_ALWAYS
+extern char *var_sm_fix_eol;
+
/* LICENSE
/* .ad
/* .fi
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
-#define MAIL_RELEASE_DATE "20110930"
+#define MAIL_RELEASE_DATE "20111012"
#define MAIL_VERSION_NUMBER "2.9"
#ifdef SNAPSHOT
sendmail.o: ../../include/msg_syslog.h
sendmail.o: ../../include/msg_vstream.h
sendmail.o: ../../include/mymalloc.h
+sendmail.o: ../../include/name_code.h
sendmail.o: ../../include/rec_streamlf.h
sendmail.o: ../../include/rec_type.h
sendmail.o: ../../include/recipient_list.h
/* this program.
/* The text below provides only a parameter summary. See
/* \fBpostconf\fR(5) for more details including examples.
+/* COMPATIBILITY CONTROLS
+/* .ad
+/* .fi
+/* .IP "\fBsendmail_fix_line_endings (always)\fR"
+/* Controls how the Postfix sendmail command converts email message
+/* line endings from <CR><LF> into UNIX format (<LF>).
/* TROUBLE SHOOTING CONTROLS
/* .ad
/* .fi
#include <set_ugid.h>
#include <connect.h>
#include <split_at.h>
+#include <name_code.h>
/* Global library. */
} SM_STATE;
/*
- * Mail submission ACL
+ * Mail submission ACL, line-end fixing.
*/
char *var_submit_acl;
+char *var_sm_fix_eol;
static const CONFIG_STR_TABLE str_table[] = {
VAR_SUBMIT_ACL, DEF_SUBMIT_ACL, &var_submit_acl, 0, 0,
+ VAR_SM_FIX_EOL, DEF_SM_FIX_EOL, &var_sm_fix_eol, 1, 0,
0,
};
TOK822 *tp;
int rcpt_count = 0;
enum {
- STRIP_CR_DUNNO, STRIP_CR_DO, STRIP_CR_DONT
+ STRIP_CR_DUNNO, STRIP_CR_DO, STRIP_CR_DONT, STRIP_CR_ERROR
} strip_cr;
MAIL_STREAM *handle;
VSTRING *postdrop_command;
const char *errstr;
int addr_count;
int level;
+ static NAME_CODE sm_fix_eol_table[] = {
+ SM_FIX_EOL_ALWAYS, STRIP_CR_DO,
+ SM_FIX_EOL_STRICT, STRIP_CR_DUNNO,
+ SM_FIX_EOL_NEVER, STRIP_CR_DONT,
+ 0, STRIP_CR_ERROR,
+ };
/*
* Access control is enforced in the postdrop command. The code here
* Process header/body lines.
*/
skip_from_ = 1;
- strip_cr = STRIP_CR_DUNNO;
+ strip_cr = name_code(sm_fix_eol_table, NAME_CODE_FLAG_STRICT_CASE,
+ var_sm_fix_eol);
+ if (strip_cr == STRIP_CR_ERROR)
+ msg_fatal_status(EX_USAGE,
+ "invalid %s value: %s", VAR_SM_FIX_EOL, var_sm_fix_eol);
for (prev_type = 0; (type = rec_streamlf_get(VSTREAM_IN, buf, var_line_limit))
!= REC_TYPE_EOF; prev_type = type) {
if (strip_cr == STRIP_CR_DUNNO && type == REC_TYPE_NORM) {
skip_from_ = 0;
}
if (strip_cr == STRIP_CR_DO && type == REC_TYPE_NORM)
- if (VSTRING_LEN(buf) > 0 && vstring_end(buf)[-1] == '\r')
+ while (VSTRING_LEN(buf) > 0 && vstring_end(buf)[-1] == '\r')
vstring_truncate(buf, VSTRING_LEN(buf) - 1);
if ((flags & SM_FLAG_AEOF) && prev_type != REC_TYPE_CONT
&& VSTRING_LEN(buf) == 1 && *STR(buf) == '.')