]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.4-20061005
authorWietse Venema <wietse@porcupine.org>
Thu, 5 Oct 2006 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:32:37 +0000 (06:32 +0000)
15 files changed:
postfix/HISTORY
postfix/html/postconf.5.html
postfix/html/smtp.8.html
postfix/man/man5/postconf.5
postfix/man/man8/smtp.8
postfix/mantools/postlink
postfix/proto/postconf.proto
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/showq/showq.c
postfix/src/smtp/lmtp_params.c
postfix/src/smtp/smtp.c
postfix/src/smtp/smtp.h
postfix/src/smtp/smtp_params.c
postfix/src/smtp/smtp_proto.c

index a9408bd3abc2a0acf62f2a2523af080dd36ee344..86b25c8056c2265782b87e26516045a3e98d44e3 100644 (file)
@@ -12767,6 +12767,20 @@ Apologies for any names omitted.
        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
index 83636dd82a32eb89131b0f9f87d09df6774b7f28..2c5304b8166281a180bad607c36056abdf6f4210 100644 (file)
@@ -2963,10 +2963,10 @@ by whitespace or comma.  </p>
 
 <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>
@@ -3465,6 +3465,17 @@ configuration parameter.  See there for details. </p>
 <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>
@@ -3476,6 +3487,17 @@ configuration parameter.  See there for details. </p>
 <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>
@@ -4082,13 +4104,13 @@ for details of how domain names are appended to incomplete addresses.
 
 <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
@@ -7454,16 +7476,28 @@ sending large messages over slow network connections.
 </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
-"&lt;CR&gt;&lt;LF&gt;.&lt;CR&gt;&lt;LF&gt;" 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 "&lt;CR&gt;&lt;LF&gt;.&lt;CR&gt;&lt;LF&gt;"
+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
@@ -7478,6 +7512,34 @@ first delivery attempt.
 </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
+".&lt;CR&gt;&lt;LF&gt;" 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>
index fb57a3a860f0051db8336512804d82c829162a25..418e3d1ef78aa349c765543fa763664b5b43c008 100644 (file)
@@ -177,10 +177,19 @@ SMTP(8)                                                                SMTP(8)
               firewall "&lt;CR&gt;&lt;LF&gt;.&lt;CR&gt;&lt;LF&gt;" 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  "&lt;CR&gt;&lt;LF&gt;.&lt;CR&gt;&lt;LF&gt;"  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
+              "&lt;CR&gt;&lt;LF&gt;.&lt;CR&gt;&lt;LF&gt;"  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-
index 3c387c2bf3aced1660ed115c8549f3d54920fad2..15cc3134fd0dd22db71ee612594435b7f6060eaa 100644 (file)
@@ -1607,10 +1607,10 @@ What categories of Postfix-generated mail are subject to
 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
@@ -1864,11 +1864,21 @@ The LMTP-specific version of the smtp_pix_workaround_delay_time
 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.
@@ -2164,11 +2174,11 @@ See the append_at_myorigin and append_dot_mydomain parameters
 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
@@ -4149,10 +4159,18 @@ How long the Postfix SMTP client pauses before sending
 .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
@@ -4161,6 +4179,23 @@ turned off for the first delivery attempt.
 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.
index 1dd18024c1310743ae2770b0a5605caa2b0d7c82..9aebf56636e46b300c326d2c930b9a1431e690d9 100644 (file)
@@ -171,9 +171,16 @@ How long the Postfix SMTP client pauses before sending
 ".<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.
index babcb2f1dc276c2387b21554eb10f60369d63934..4caf4f4c7cd751ecb2d99f1472471c439e56f101 100755 (executable)
@@ -225,6 +225,8 @@ while (<>) {
     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;
@@ -412,6 +414,8 @@ while (<>) {
     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;
index 30d07f1bd4344e984379ed9ad56ca99c73426e86..5dbcfa348838cf3fdabef63e1082c661f801cf54 100644 (file)
@@ -3956,11 +3956,10 @@ smtp_always_send_ehlo parameter.  </p>
 
 %PARAM smtp_pix_workaround_threshold_time 500s
 
-<p>
-How long a message must be queued before the PIX firewall
-"&lt;CR&gt;&lt;LF&gt;.&lt;CR&gt;&lt;LF&gt;" 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 "&lt;CR&gt;&lt;LF&gt;.&lt;CR&gt;&lt;LF&gt;"
+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
@@ -7990,13 +7989,13 @@ for details of how domain names are appended to incomplete addresses.
 
 <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
@@ -10422,10 +10421,10 @@ by whitespace or comma.  </p>
 
 <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>
@@ -10460,3 +10459,50 @@ with other MTAs. </p>
 </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
+".&lt;CR&gt;&lt;LF&gt;" 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>
index a940e1ec70fc101880e6f2a32b363988a50c2439..fb77b7fed3a0dbe69380a53b03f6ca0bf90e6a24 100644 (file)
@@ -1018,6 +1018,24 @@ extern int var_smtp_pix_thresh;
 #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"
index 3241474428c1a3d888b124ff022b959c06f6925c..b845ceda13174abaab4ab6ec5bd90534f1c6445d 100644 (file)
@@ -20,7 +20,7 @@
   * 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
index ef7e2a38f21b3f222b3635267777094c001b647f..8cbb278978e58fc6504624ce82756b63d4bb674d 100644 (file)
@@ -140,8 +140,8 @@ int     var_dup_filter_limit;
 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 *);
index e5f0c119cfbcf81a847bf5fbc4240409740cb834..c2558793521ebba4adb8f63dbd267f460500a9d5 100644 (file)
@@ -44,6 +44,8 @@
        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[] = {
index 21a7aab6b1384f371bbd592e8d847b1272e7d665..bba3b3ba07c9674839bf4983ac0f84b5bdeb44ba 100644 (file)
 /*     ".<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.
@@ -699,6 +706,8 @@ bool    var_smtp_sender_auth;
 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.
@@ -709,6 +718,7 @@ SCACHE *smtp_scache;
 MAPS   *smtp_ehlo_dis_maps;
 MAPS   *smtp_generic_maps;
 int     smtp_ext_prop_mask;
+MAPS   *smtp_pix_bug_maps;
 
 #ifdef USE_TLS
 
@@ -901,10 +911,18 @@ static void pre_init(char *unused_name, char **unused_argv)
      * 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.
      */
index af397d711d12c21429cbb6fac3e31d5c1d61fa30..f55eafe46cbcb63447899d18d4a1dc58b55ef789 100644 (file)
@@ -106,7 +106,6 @@ typedef struct SMTP_STATE {
 #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)
@@ -116,6 +115,8 @@ typedef struct SMTP_STATE {
 #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.
@@ -162,6 +163,8 @@ extern STRING_LIST *smtp_cache_dest;        /* cached destinations */
 
 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 */
 
index 9c73b2d58bdfaf671e749d07b419ac17e4c57f1c..e604298b1e8399231f5384df2cc6dd1252b70d11 100644 (file)
@@ -45,6 +45,8 @@
        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[] = {
index 276db41ce130ac657c1b9838b9654d660d4f46d0..79fe31e1cc44e830a3c4155024261e8f4ae8383d 100644 (file)
 #include <iostuff.h>
 #include <split_at.h>
 #include <name_code.h>
+#include <name_mask.h>
 
 /* Global library. */
 
@@ -262,6 +263,14 @@ int     smtp_helo(SMTP_STATE *state)
     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;
@@ -306,8 +315,27 @@ int     smtp_helo(SMTP_STATE *state)
         * 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
@@ -327,10 +355,10 @@ int     smtp_helo(SMTP_STATE *state)
        }
        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;
@@ -1692,11 +1720,9 @@ static int smtp_loop(SMTP_STATE *state, NOCLOBBER int send_state,
                }
            } 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 */
            }