action with the verified hostname instead of the name
obtained with PTR lookup. File: smtpd/smtpd.c.
+20061004
+
+ Cleanup: force space between mailq queueid+status and file
+ size items. File: showq/showq.c.
+
+20061005
+
+ Cleanup: make CISCO PIX bug workarounds configurable. This
+ introduces new parameters: smtp_pix_workarounds (default:
+ disable_esmtp, delay_dotcrlf) and smtp_pix_workaround_maps
+ (workarounds indexed by server IP address). The default
+ settings are backwards compatible. File: smtp/smtp.c,
+ smtp/smtp_proto.c.
+
Wish list:
Update FILTER_README with mailing list suggestions to tag
<dl>
-<dt> <b> bounce </b> </dt> <dd> Inspect the content of delivery
+<dt><b>bounce</b></dt> <dd> Inspect the content of delivery
status notifications. </dd>
-<dt> <b> notify </b> </dt> <dd> Inspect the content of postmaster
+<dt><b>notify</b></dt> <dd> Inspect the content of postmaster
notifications by the <a href="smtp.8.html">smtp(8)</a> and <a href="smtpd.8.html">smtpd(8)</a> processes. </dd>
</dl>
<p> This feature is available in Postfix 2.3 and later. </p>
+</DD>
+
+<DT><b><a name="lmtp_pix_workaround_maps">lmtp_pix_workaround_maps</a>
+(default: empty)</b></DT><DD>
+
+<p> The LMTP-specific version of the <a href="postconf.5.html#smtp_pix_workaround_maps">smtp_pix_workaround_maps</a>
+configuration parameter. See there for details. </p>
+
+<p> This feature is available in Postfix 2.4 and later. </p>
+
+
</DD>
<DT><b><a name="lmtp_pix_workaround_threshold_time">lmtp_pix_workaround_threshold_time</a>
<p> This feature is available in Postfix 2.3 and later. </p>
+</DD>
+
+<DT><b><a name="lmtp_pix_workarounds">lmtp_pix_workarounds</a>
+(default: empty)</b></DT><DD>
+
+<p> The LMTP-specific version of the smtp_pix_workaround
+configuration parameter. See there for details. </p>
+
+<p> This feature is available in Postfix 2.4 and later. </p>
+
+
</DD>
<DT><b><a name="lmtp_quit_timeout">lmtp_quit_timeout</a>
<dl>
-<dt> <b> <a href="postconf.5.html#permit_inet_interfaces">permit_inet_interfaces</a> </b></dt>
+<dt><b><a href="postconf.5.html#permit_inet_interfaces">permit_inet_interfaces</a></b></dt>
<dd> Append the domain name in $<a href="postconf.5.html#myorigin">myorigin</a> or $<a href="postconf.5.html#mydomain">mydomain</a> when the
client IP address matches $<a href="postconf.5.html#inet_interfaces">inet_interfaces</a>. This is enabled by
default. </dd>
-<dt> <b> <a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a> </b></dt>
+<dt><b><a href="postconf.5.html#permit_mynetworks">permit_mynetworks</a></b></dt>
<dd> Append the domain name in $<a href="postconf.5.html#myorigin">myorigin</a> or $<a href="postconf.5.html#mydomain">mydomain</a> when the
client IP address matches any network or network address listed in
</p>
+</DD>
+
+<DT><b><a name="smtp_pix_workaround_maps">smtp_pix_workaround_maps</a>
+(default: empty)</b></DT><DD>
+
+<p> Lookup tables, indexed by the remote SMTP server address, with
+per-destination workarounds for CISCO PIX firewall bugs. The table
+is not indexed by hostname for consistency with
+<a href="postconf.5.html#smtp_discard_ehlo_keyword_address_maps">smtp_discard_ehlo_keyword_address_maps</a>. </p>
+
+<p> This feature is available in Postfix 2.4 and later. </p>
+
+
</DD>
<DT><b><a name="smtp_pix_workaround_threshold_time">smtp_pix_workaround_threshold_time</a>
(default: 500s)</b></DT><DD>
-<p>
-How long a message must be queued before the PIX firewall
-"<CR><LF>.<CR><LF>" bug workaround is turned
-on for delivery through firewalls with "smtp fixup" mode turned on.
-</p>
+<p> How long a message must be queued before the Postfix SMTP client
+turns on the PIX firewall "<CR><LF>.<CR><LF>"
+bug workaround for delivery through firewalls with "smtp fixup"
+mode turned on. </p>
<p>
By default, the workaround is turned off for mail that is queued
</p>
+</DD>
+
+<DT><b><a name="smtp_pix_workarounds">smtp_pix_workarounds</a>
+(default: disable_esmtp, delay_dotcrlf)</b></DT><DD>
+
+<p> A list that specifies zero or more workarounds for CISCO PIX
+firewall bugs. These workarounds are implemented by the Postfix
+SMTP client. Workaround names are separated by comma or space, and
+are case insensitive. This parameter setting can be overruled with
+per-destination <a href="postconf.5.html#smtp_pix_workaround_maps">smtp_pix_workaround_maps</a> settings. </p>
+
+<dl>
+
+<dt><b>delay_dotcrlf</b><dd> Insert a delay before sending
+".<CR><LF>" after the end of the message content. The
+delay is subject to the <a href="postconf.5.html#smtp_pix_workaround_delay_time">smtp_pix_workaround_delay_time</a> and
+<a href="postconf.5.html#smtp_pix_workaround_threshold_time">smtp_pix_workaround_threshold_time</a> parameter settings. </dd>
+
+<dt><b>disable_esmtp</b><dd> Disable all extended SMTP commands:
+send HELO instead of EHLO. </dd>
+
+</dl>
+
+<p> This feature is available in Postfix 2.4 and later. The default
+settings are backwards compatible with earlier Postfix versions.
+</p>
+
+
</DD>
<DT><b><a name="smtp_quit_timeout">smtp_quit_timeout</a>
firewall "<CR><LF>.<CR><LF>" bug.
<b><a href="postconf.5.html#smtp_pix_workaround_threshold_time">smtp_pix_workaround_threshold_time</a> (500s)</b>
- How long a message must be queued before the PIX
- firewall "<CR><LF>.<CR><LF>" bug workaround is
- turned on for delivery through firewalls with "smtp
- fixup" mode turned on.
+ How long a message must be queued before the Post-
+ fix SMTP client turns on the PIX firewall
+ "<CR><LF>.<CR><LF>" bug workaround for delivery
+ through firewalls with "smtp fixup" mode turned on.
+
+ <b><a href="postconf.5.html#smtp_pix_workarounds">smtp_pix_workarounds</a> (disable_esmtp, delay_dotcrlf)</b>
+ A list that specifies zero or more workarounds for
+ CISCO PIX firewall bugs.
+
+ <b><a href="postconf.5.html#smtp_pix_workaround_maps">smtp_pix_workaround_maps</a> (empty)</b>
+ Lookup tables, indexed by the remote SMTP server
+ address, with per-destination workarounds for CISCO
+ PIX firewall bugs.
<b><a href="postconf.5.html#smtp_quote_rfc821_envelope">smtp_quote_rfc821_envelope</a> (yes)</b>
Quote addresses in SMTP MAIL FROM and RCPT TO com-
before-queue content inspection by non_smtpd_milters, header_checks
and body_checks. Specify zero or more of the following, separated
by whitespace or comma.
-.IP "\fB bounce \fR"
+.IP "\fBbounce\fR"
Inspect the content of delivery
status notifications.
-.IP "\fB notify \fR"
+.IP "\fBnotify\fR"
Inspect the content of postmaster
notifications by the \fBsmtp\fR(8) and \fBsmtpd\fR(8) processes.
.PP
configuration parameter. See there for details.
.PP
This feature is available in Postfix 2.3 and later.
+.SH lmtp_pix_workaround_maps (default: empty)
+The LMTP-specific version of the smtp_pix_workaround_maps
+configuration parameter. See there for details.
+.PP
+This feature is available in Postfix 2.4 and later.
.SH lmtp_pix_workaround_threshold_time (default: 500s)
The LMTP-specific version of the smtp_pix_workaround_threshold_time
configuration parameter. See there for details.
.PP
This feature is available in Postfix 2.3 and later.
+.SH lmtp_pix_workarounds (default: empty)
+The LMTP-specific version of the smtp_pix_workaround
+configuration parameter. See there for details.
+.PP
+This feature is available in Postfix 2.4 and later.
.SH lmtp_quit_timeout (default: 300s)
The LMTP client time limit for sending the QUIT command, and for
receiving the server response.
for details of how domain names are appended to incomplete addresses.
.PP
Specify a list of zero or more of the following:
-.IP "\fB permit_inet_interfaces \fR"
+.IP "\fBpermit_inet_interfaces\fR"
Append the domain name in $myorigin or $mydomain when the
client IP address matches $inet_interfaces. This is enabled by
default.
-.IP "\fB permit_mynetworks \fR"
+.IP "\fBpermit_mynetworks\fR"
Append the domain name in $myorigin or $mydomain when the
client IP address matches any network or network address listed in
$mynetworks. This setting will not prevent remote mail header
.PP
Choosing a too short time makes this workaround ineffective when
sending large messages over slow network connections.
+.SH smtp_pix_workaround_maps (default: empty)
+Lookup tables, indexed by the remote SMTP server address, with
+per-destination workarounds for CISCO PIX firewall bugs. The table
+is not indexed by hostname for consistency with
+smtp_discard_ehlo_keyword_address_maps.
+.PP
+This feature is available in Postfix 2.4 and later.
.SH smtp_pix_workaround_threshold_time (default: 500s)
-How long a message must be queued before the PIX firewall
-"<CR><LF>.<CR><LF>" bug workaround is turned
-on for delivery through firewalls with "smtp fixup" mode turned on.
+How long a message must be queued before the Postfix SMTP client
+turns on the PIX firewall "<CR><LF>.<CR><LF>"
+bug workaround for delivery through firewalls with "smtp fixup"
+mode turned on.
.PP
By default, the workaround is turned off for mail that is queued
for less than 500 seconds. In other words, the workaround is normally
Specify 0 to enable the PIX firewall
"<CR><LF>.<CR><LF>" bug workaround upon the
first delivery attempt.
+.SH smtp_pix_workarounds (default: disable_esmtp, delay_dotcrlf)
+A list that specifies zero or more workarounds for CISCO PIX
+firewall bugs. These workarounds are implemented by the Postfix
+SMTP client. Workaround names are separated by comma or space, and
+are case insensitive. This parameter setting can be overruled with
+per-destination smtp_pix_workaround_maps settings.
+.IP "\fBdelay_dotcrlf\fR
+Insert a delay before sending
+".<CR><LF>" after the end of the message content. The
+delay is subject to the smtp_pix_workaround_delay_time and
+smtp_pix_workaround_threshold_time parameter settings.
+.IP "\fBdisable_esmtp\fR
+Disable all extended SMTP commands:
+send HELO instead of EHLO.
+.PP
+This feature is available in Postfix 2.4 and later. The default
+settings are backwards compatible with earlier Postfix versions.
.SH smtp_quit_timeout (default: 300s)
The SMTP client time limit for sending the QUIT command, and for
receiving the server response.
".<CR><LF>" in order to work around the PIX firewall
"<CR><LF>.<CR><LF>" bug.
.IP "\fBsmtp_pix_workaround_threshold_time (500s)\fR"
-How long a message must be queued before the PIX firewall
-"<CR><LF>.<CR><LF>" bug workaround is turned
-on for delivery through firewalls with "smtp fixup" mode turned on.
+How long a message must be queued before the Postfix SMTP client
+turns on the PIX firewall "<CR><LF>.<CR><LF>"
+bug workaround for delivery through firewalls with "smtp fixup"
+mode turned on.
+.IP "\fBsmtp_pix_workarounds (disable_esmtp, delay_dotcrlf)\fR"
+A list that specifies zero or more workarounds for CISCO PIX
+firewall bugs.
+.IP "\fBsmtp_pix_workaround_maps (empty)\fR"
+Lookup tables, indexed by the remote SMTP server address, with
+per-destination workarounds for CISCO PIX firewall bugs.
.IP "\fBsmtp_quote_rfc821_envelope (yes)\fR"
Quote addresses in SMTP MAIL FROM and RCPT TO commands as required
by RFC 821.
s;\blmtp_generic_maps\b;<a href="postconf.5.html#lmtp_generic_maps">$&</a>;g;
s;\blmtp_pix_workaround_threshold_time\b;<a href="postconf.5.html#lmtp_pix_workaround_threshold_time">$&</a>;g;
s;\blmtp_pix_workaround_delay_time\b;<a href="postconf.5.html#lmtp_pix_workaround_delay_time">$&</a>;g;
+ s;\blmtp_pix_workarounds\b;<a href="postconf.5.html#lmtp_pix_workarounds">$&</a>;g;
+ s;\blmtp_pix_workaround_maps\b;<a href="postconf.5.html#lmtp_pix_workaround_maps">$&</a>;g;
s;\blmtp_connection_reuse_time_limit\b;<a href="postconf.5.html#lmtp_connection_reuse_time_limit">$&</a>;g;
s;\blmtp_starttls_timeout\b;<a href="postconf.5.html#lmtp_starttls_timeout">$&</a>;g;
s;\blmtp_line_length_limit\b;<a href="postconf.5.html#lmtp_line_length_limit">$&</a>;g;
s;\bsmtp_sender_depen[-</bB>]*\n*[ <bB>]*dent_authentication\b;<a href="postconf.5.html#smtp_sender_dependent_authentication">$&</a>;g;
s;\bsmtp_pix_workaround_delay_time\b;<a href="postconf.5.html#smtp_pix_workaround_delay_time">$&</a>;g;
s;\bsmtp_pix_workaround_threshold_time\b;<a href="postconf.5.html#smtp_pix_workaround_threshold_time">$&</a>;g;
+ s;\bsmtp_pix_workarounds\b;<a href="postconf.5.html#smtp_pix_workarounds">$&</a>;g;
+ s;\bsmtp_pix_workaround_maps\b;<a href="postconf.5.html#smtp_pix_workaround_maps">$&</a>;g;
s;\bsmtp_quit_timeout\b;<a href="postconf.5.html#smtp_quit_timeout">$&</a>;g;
s;\bsmtp_quote_rfc821_envelope\b;<a href="postconf.5.html#smtp_quote_rfc821_envelope">$&</a>;g;
s;\bsmtp_randomize_addresses\b;<a href="postconf.5.html#smtp_randomize_addresses">$&</a>;g;
%PARAM smtp_pix_workaround_threshold_time 500s
-<p>
-How long a message must be queued before the PIX firewall
-"<CR><LF>.<CR><LF>" bug workaround is turned
-on for delivery through firewalls with "smtp fixup" mode turned on.
-</p>
+<p> How long a message must be queued before the Postfix SMTP client
+turns on the PIX firewall "<CR><LF>.<CR><LF>"
+bug workaround for delivery through firewalls with "smtp fixup"
+mode turned on. </p>
<p>
By default, the workaround is turned off for mail that is queued
<dl>
-<dt> <b> permit_inet_interfaces </b></dt>
+<dt><b>permit_inet_interfaces</b></dt>
<dd> Append the domain name in $myorigin or $mydomain when the
client IP address matches $inet_interfaces. This is enabled by
default. </dd>
-<dt> <b> permit_mynetworks </b></dt>
+<dt><b>permit_mynetworks</b></dt>
<dd> Append the domain name in $myorigin or $mydomain when the
client IP address matches any network or network address listed in
<dl>
-<dt> <b> bounce </b> </dt> <dd> Inspect the content of delivery
+<dt><b>bounce</b></dt> <dd> Inspect the content of delivery
status notifications. </dd>
-<dt> <b> notify </b> </dt> <dd> Inspect the content of postmaster
+<dt><b>notify</b></dt> <dd> Inspect the content of postmaster
notifications by the smtp(8) and smtpd(8) processes. </dd>
</dl>
</blockquote>
<p> This feature is available in Postfix 2.3 and later. </p>
+
+%PARAM smtp_pix_workarounds disable_esmtp, delay_dotcrlf
+
+<p> A list that specifies zero or more workarounds for CISCO PIX
+firewall bugs. These workarounds are implemented by the Postfix
+SMTP client. Workaround names are separated by comma or space, and
+are case insensitive. This parameter setting can be overruled with
+per-destination smtp_pix_workaround_maps settings. </p>
+
+<dl>
+
+<dt><b>delay_dotcrlf</b><dd> Insert a delay before sending
+".<CR><LF>" after the end of the message content. The
+delay is subject to the smtp_pix_workaround_delay_time and
+smtp_pix_workaround_threshold_time parameter settings. </dd>
+
+<dt><b>disable_esmtp</b><dd> Disable all extended SMTP commands:
+send HELO instead of EHLO. </dd>
+
+</dl>
+
+<p> This feature is available in Postfix 2.4 and later. The default
+settings are backwards compatible with earlier Postfix versions.
+</p>
+
+%PARAM smtp_pix_workaround_maps
+
+<p> Lookup tables, indexed by the remote SMTP server address, with
+per-destination workarounds for CISCO PIX firewall bugs. The table
+is not indexed by hostname for consistency with
+smtp_discard_ehlo_keyword_address_maps. </p>
+
+<p> This feature is available in Postfix 2.4 and later. </p>
+
+%PARAM lmtp_pix_workarounds
+
+<p> The LMTP-specific version of the smtp_pix_workaround
+configuration parameter. See there for details. </p>
+
+<p> This feature is available in Postfix 2.4 and later. </p>
+
+%PARAM lmtp_pix_workaround_maps
+
+<p> The LMTP-specific version of the smtp_pix_workaround_maps
+configuration parameter. See there for details. </p>
+
+<p> This feature is available in Postfix 2.4 and later. </p>
#define DEF_LMTP_PIX_DELAY "10s"
extern int var_smtp_pix_delay;
+ /*
+ * Courageous people may want to turn off PIX bug workarounds.
+ */
+#define PIX_BUG_DISABLE_ESMTP "disable_esmtp"
+#define PIX_BUG_DELAY_DOTCRLF "delay_dotcrlf"
+#define VAR_SMTP_PIX_BUG_WORDS "smtp_pix_workarounds"
+#define DEF_SMTP_PIX_BUG_WORDS PIX_BUG_DISABLE_ESMTP "," \
+ PIX_BUG_DELAY_DOTCRLF
+#define VAR_LMTP_PIX_BUG_WORDS "lmtp_pix_workarounds"
+#define DEF_LMTP_PIX_BUG_WORDS DEF_SMTP_PIX_BUG_WORDS
+extern char *var_smtp_pix_bug_words;
+
+#define VAR_SMTP_PIX_BUG_MAPS "smtp_pix_workaround_maps"
+#define DEF_SMTP_PIX_BUG_MAPS ""
+#define VAR_LMTP_PIX_BUG_MAPS "lmtp_pix_workaround_maps"
+#define DEF_LMTP_PIX_BUG_MAPS ""
+extern char *var_smtp_pix_bug_maps;
+
#define VAR_SMTP_DEFER_MXADDR "smtp_defer_if_no_mx_address_found"
#define DEF_SMTP_DEFER_MXADDR 0
#define VAR_LMTP_DEFER_MXADDR "lmtp_defer_if_no_mx_address_found"
* Patches change both the patchlevel and the release date. Snapshots have no
* patchlevel; they change the release date only.
*/
-#define MAIL_RELEASE_DATE "20061001"
+#define MAIL_RELEASE_DATE "20061005"
#define MAIL_VERSION_NUMBER "2.4"
#ifdef SNAPSHOT
char *var_empty_addr;
#define STRING_FORMAT "%-10s %8s %-20s %s\n"
-#define SENDER_FORMAT "%-11s%8ld %20.20s %s\n"
-#define DROP_FORMAT "%-10s%c%8ld %20.20s (maildrop queue, sender UID %u)\n"
+#define SENDER_FORMAT "%-11s %7ld %20.20s %s\n"
+#define DROP_FORMAT "%-10s%c %7ld %20.20s (maildrop queue, sender UID %u)\n"
static void showq_reasons(VSTREAM *, BOUNCE_LOG *, RCPT_BUF *, DSN_BUF *,
HTABLE *);
VAR_PROP_EXTENSION, DEF_PROP_EXTENSION, &var_prop_extension, 0, 0,
VAR_LMTP_GENERIC_MAPS, DEF_LMTP_GENERIC_MAPS, &var_smtp_generic_maps, 0, 0,
VAR_LMTP_TCP_PORT, DEF_LMTP_TCP_PORT, &var_lmtp_tcp_port, 0, 0,
+ VAR_LMTP_PIX_BUG_WORDS, DEF_LMTP_PIX_BUG_WORDS, &var_smtp_pix_bug_words, 0, 0,
+ VAR_LMTP_PIX_BUG_MAPS, DEF_LMTP_PIX_BUG_MAPS, &var_smtp_pix_bug_maps, 0, 0,
0,
};
static CONFIG_TIME_TABLE lmtp_time_table[] = {
/* ".<CR><LF>" in order to work around the PIX firewall
/* "<CR><LF>.<CR><LF>" bug.
/* .IP "\fBsmtp_pix_workaround_threshold_time (500s)\fR"
-/* How long a message must be queued before the PIX firewall
-/* "<CR><LF>.<CR><LF>" bug workaround is turned
-/* on for delivery through firewalls with "smtp fixup" mode turned on.
+/* How long a message must be queued before the Postfix SMTP client
+/* turns on the PIX firewall "<CR><LF>.<CR><LF>"
+/* bug workaround for delivery through firewalls with "smtp fixup"
+/* mode turned on.
+/* .IP "\fBsmtp_pix_workarounds (disable_esmtp, delay_dotcrlf)\fR"
+/* A list that specifies zero or more workarounds for CISCO PIX
+/* firewall bugs.
+/* .IP "\fBsmtp_pix_workaround_maps (empty)\fR"
+/* Lookup tables, indexed by the remote SMTP server address, with
+/* per-destination workarounds for CISCO PIX firewall bugs.
/* .IP "\fBsmtp_quote_rfc821_envelope (yes)\fR"
/* Quote addresses in SMTP MAIL FROM and RCPT TO commands as required
/* by RFC 821.
char *var_lmtp_tcp_port;
int var_scache_proto_tmout;
bool var_smtp_cname_overr;
+char *var_smtp_pix_bug_words;
+char *var_smtp_pix_bug_maps;
/*
* Global variables.
MAPS *smtp_ehlo_dis_maps;
MAPS *smtp_generic_maps;
int smtp_ext_prop_mask;
+MAPS *smtp_pix_bug_maps;
#ifdef USE_TLS
* EHLO keyword filter.
*/
if (*var_smtp_ehlo_dis_maps)
- smtp_ehlo_dis_maps = maps_create(VAR_SMTPD_EHLO_DIS_MAPS,
+ smtp_ehlo_dis_maps = maps_create(VAR_SMTP_EHLO_DIS_MAPS,
var_smtp_ehlo_dis_maps,
DICT_FLAG_LOCK);
+ /*
+ * PIX bug workarounds.
+ */
+ if (*var_smtp_pix_bug_maps)
+ smtp_pix_bug_maps = maps_create(VAR_SMTP_PIX_BUG_MAPS,
+ var_smtp_pix_bug_maps,
+ DICT_FLAG_LOCK);
+
/*
* Generic maps.
*/
#define SMTP_FEATURE_SIZE (1<<3)
#define SMTP_FEATURE_STARTTLS (1<<4)
#define SMTP_FEATURE_AUTH (1<<5)
-#define SMTP_FEATURE_MAYBEPIX (1<<6) /* PIX smtp fixup mode */
#define SMTP_FEATURE_XFORWARD_NAME (1<<7)
#define SMTP_FEATURE_XFORWARD_ADDR (1<<8)
#define SMTP_FEATURE_XFORWARD_PROTO (1<<9)
#define SMTP_FEATURE_RSET_REJECTED (1<<13) /* RSET probe rejected */
#define SMTP_FEATURE_FROM_CACHE (1<<14) /* cached connection */
#define SMTP_FEATURE_DSN (1<<15) /* DSN supported */
+#define SMTP_FEATURE_PIX_NO_ESMTP (1<<16) /* PIX smtp fixup mode */
+#define SMTP_FEATURE_PIX_DELAY_DOTCRLF (1<<17) /* PIX smtp fixup mode */
/*
* Features that passivate under the endpoint.
extern MAPS *smtp_ehlo_dis_maps; /* ehlo keyword filter */
+extern MAPS *smtp_pix_bug_maps; /* PIX workarounds */
+
extern MAPS *smtp_generic_maps; /* make internal address valid */
extern int smtp_ext_prop_mask; /* address externsion propagation */
VAR_PROP_EXTENSION, DEF_PROP_EXTENSION, &var_prop_extension, 0, 0,
VAR_SMTP_GENERIC_MAPS, DEF_SMTP_GENERIC_MAPS, &var_smtp_generic_maps, 0, 0,
VAR_LMTP_TCP_PORT, DEF_LMTP_TCP_PORT, &var_lmtp_tcp_port, 0, 0,
+ VAR_SMTP_PIX_BUG_WORDS, DEF_SMTP_PIX_BUG_WORDS, &var_smtp_pix_bug_words, 0, 0,
+ VAR_SMTP_PIX_BUG_MAPS, DEF_SMTP_PIX_BUG_MAPS, &var_smtp_pix_bug_maps, 0, 0,
0,
};
static CONFIG_TIME_TABLE smtp_time_table[] = {
#include <iostuff.h>
#include <split_at.h>
#include <name_code.h>
+#include <name_mask.h>
/* Global library. */
SOCKOPT_SIZE optlen;
const char *ehlo_words;
int discard_mask;
+ static NAME_MASK pix_bug_table[] = {
+ PIX_BUG_DISABLE_ESMTP, SMTP_FEATURE_PIX_NO_ESMTP,
+ PIX_BUG_DELAY_DOTCRLF, SMTP_FEATURE_PIX_DELAY_DOTCRLF,
+ 0,
+ };
+ const char *pix_bug_words;
+ const char *pix_bug_source;
+ int pix_bug_mask;
#ifdef USE_TLS
int saved_features = session->features;
* it does not span a packet boundary. This hurts performance so it
* is not on by default.
*/
- if (resp->str[strspn(resp->str, "20 *\t\n")] == 0)
- session->features |= SMTP_FEATURE_MAYBEPIX;
+ if (resp->str[strspn(resp->str, "20 *\t\n")] == 0) {
+ if (smtp_pix_bug_maps != 0
+ && (pix_bug_words =
+ maps_find(smtp_pix_bug_maps,
+ state->session->addr, 0)) != 0) {
+ pix_bug_source = VAR_SMTP_PIX_BUG_MAPS;
+ } else {
+ pix_bug_words = var_smtp_pix_bug_words;
+ pix_bug_source = VAR_SMTP_PIX_BUG_WORDS;
+ }
+ if (*pix_bug_words) {
+ pix_bug_mask = name_mask_opt(pix_bug_source, pix_bug_table,
+ pix_bug_words, NAME_MASK_ANY_CASE);
+ msg_info("%s: enabling PIX workarounds: %s for %s",
+ request->queue_id,
+ str_name_mask("pix workaround bitmask",
+ pix_bug_table, pix_bug_mask),
+ session->namaddrport);
+ session->features |= pix_bug_mask;
+ }
+ }
/*
* See if we are talking to ourself. This should not be possible with
}
if ((state->misc_flags & SMTP_MISC_FLAG_USE_LMTP) == 0) {
if (var_smtp_always_ehlo
- && (session->features & SMTP_FEATURE_MAYBEPIX) == 0)
+ && (session->features & SMTP_FEATURE_PIX_NO_ESMTP) == 0)
session->features |= SMTP_FEATURE_ESMTP;
if (var_smtp_never_ehlo
- || (session->features & SMTP_FEATURE_MAYBEPIX) != 0)
+ || (session->features & SMTP_FEATURE_PIX_NO_ESMTP) != 0)
session->features &= ~SMTP_FEATURE_ESMTP;
} else {
session->features |= SMTP_FEATURE_ESMTP;
}
} else if (prev_type == REC_TYPE_CONT) /* missing newline */
smtp_fputs("", 0, session->stream);
- if ((session->features & SMTP_FEATURE_MAYBEPIX) != 0
+ if ((session->features & SMTP_FEATURE_PIX_DELAY_DOTCRLF) != 0
&& request->msg_stats.incoming_arrival.tv_sec
<= vstream_ftime(session->stream) - var_smtp_pix_thresh) {
- msg_info("%s: enabling PIX <CRLF>.<CRLF> workaround for %s",
- request->queue_id, session->namaddrport);
smtp_flush(session->stream); /* hurts performance */
sleep(var_smtp_pix_delay); /* not to mention this */
}