]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-2.9-20110219
authorWietse Venema <wietse@porcupine.org>
Sat, 19 Feb 2011 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:37:13 +0000 (06:37 +0000)
22 files changed:
postfix/HISTORY
postfix/RELEASE_NOTES
postfix/WISHLIST
postfix/html/mysql_table.5.html
postfix/man/man5/mysql_table.5
postfix/proto/mysql_table
postfix/src/global/mail_params.c
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/local/local.c
postfix/src/master/event_server.c
postfix/src/master/mail_server.h
postfix/src/master/multi_server.c
postfix/src/master/single_server.c
postfix/src/master/trigger_server.c
postfix/src/postconf/Makefile.in
postfix/src/postconf/extract.awk
postfix/src/postconf/postconf.c
postfix/src/postscreen/postscreen_send.c
postfix/src/qmqpd/qmqpd_peer.c
postfix/src/smtpd/smtpd_peer.c
postfix/src/virtual/virtual.c

index 6833bcadc97464e33a82b149aa5690f1e00cb2cc..a48b22ce5af8b81f60c279b59b17e076e1b53f15 100644 (file)
@@ -16004,7 +16004,7 @@ Apologies for any names omitted.
 
        Workaround: better handling of pregreeting spambots. The
        postscreen built-in SMTP engine no longer sends a 220 banner
-       to a client that falls into the pregeet trap.  This eliminates
+       to a client that falls into the pregreet trap.  This eliminates
        many "NON-SMTP COMMAND" records in postscreen logging, as
        the SMTP client and server no longer get out of sync.  It
        also results in better logging of sender/recipient information.
@@ -16594,10 +16594,34 @@ Apologies for any names omitted.
 
 20110213
 
-       Workaround (problem introduced with Postfix TLS patch): the
-       TLS library passes the same information via different
-       function arguments, and this same information is maintained
-       by different functions, so things get out of step when code
-       is updated. As of 20110212, tls_client_start() needs to set
-       the VSTREAM property of the TLS session object. File:
-       tls/tls_client.c.
+       Workaround: the TLS library passes the same information via
+       different function arguments, and this same information is
+       maintained by different functions, so things get out of
+       step when code is updated. As of 20110212, tls_client_start()
+       needs to set the VSTREAM property of the TLS session object.
+       File: tls/tls_client.c.
+
+20110215
+
+       Human factors: the FCRDNS (forward-confirmed reverse DNS)
+       checking code now logs "hostname X does not resolve to
+       address Y", when a "reverse hostname" lookup result does
+       not resolve to the client IP address.  Files: smtpd/smtpd_peer.c,
+       qmqpr/qmqpd_peer.c.
+
+20110216
+
+       Cleanup: don't log a "connection reset by peer" error when
+       postscreen(8) tries to send a server response.  File:
+       postscreen/postscreen_send.c.
+
+20110218
+
+       Cleanup: Postfix now uses long integers for message_size_limit,
+       mailbox_size_limit and virtual_mailbox_limit. On LP64 (64-bit
+       long and pointer, but 32-bit integer) systems, these message
+       and mailbox limits can now exceed 2GB. Files: global/mail_params.c
+       global/mail_params.h local/local.c master/event_server.c
+       master/mail_server.h master/multi_server.c master/single_server.c
+       master/trigger_server.c virtual/virtual.c postconf/extract.awk
+       postconf/postconf.c.
index 930f85f19c02de2e68dcd21147e0cfd351b5e410..a09f1519b9c573f3ec963af0873af58b4d8834fc 100644 (file)
@@ -14,7 +14,23 @@ specifies the release date of a stable release or snapshot release.
 If you upgrade from Postfix 2.7 or earlier, read RELEASE_NOTES-2.8
 before proceeding.
 
-Major changes with snapshot 20110130
+Incompatible changes with snapshot 20110219
+===========================================
+
+The Postfix SMTP and QMQP servers now log "hostname X does not
+resolve to address Y", when a "reverse hostname" lookup result does
+not resolve to the client IP address. Until now these servers logged
+"Y: hostname X verification failed" or "Y: address not listed for
+hostname X" depending on the details of the error.
+
+Major changes with snapshot 20110219
+====================================
+
+Postfix now uses long integers for message_size_limit, mailbox_size_limit
+and virtual_mailbox_limit. On LP64 systems (64-bit long and pointer,
+but 32-bit integer), these limits can now exceed 2GB.
+
+Major changes with snapshot 20110212
 ====================================
 
 Support for per-record deadlines.  These change the behavior of
index 7e39f54da5da28ef8a8b64a7017a151ab6af6563..1098f419086fd14dd99c47f6c39928c02e7a7048 100644 (file)
@@ -6,11 +6,11 @@ Wish list:
 
        Things to do after the stable release:
 
+       Make the rules for how to use close-on-exec more explicit.
+
        Don't forget Apple's code donation for fetching mail from
        IMAP server.
 
-       Update MILTER_README with pointer to OpenDKIM.
-
        postconf command-line option to show the compile-time
        settings (CCARGS, AUXLIBS) in case binary packages
        don't install the makedefs.out file.
@@ -19,6 +19,8 @@ Wish list:
        etc. databases, i.e. set the owner property at open time;
        it can't be looked up at run-time with fstat(dict->stat_fd)
        because there is no open file. What about *SQL, LDAP, etc.?
+       Maybe use the source of the configuration file? We can reuse
+       that to enforce root ownership of main/master.cf files.
 
        events.c: cache the side effects of file descriptor event
        enable/disable operations in user space, and do bulk kernel
index 0093226cb8df18699322faf061072f000f01de36..52d4c46da0f9e683bec9dc2e6725d4f64282a223 100644 (file)
@@ -82,7 +82,7 @@ MYSQL_TABLE(5)                                                  MYSQL_TABLE(5)
        <b>hosts</b>  The  hosts  that Postfix will try to connect to and
               query from.  Specify <i>unix:</i> for UNIX domain sockets,
               <i>inet:</i> for TCP connections (default).  Example:
-                  hosts = host1.some.domain host2.some.domain
+                  hosts = host1.some.domain host2.some.domain:port
                   hosts = unix:/file/name
 
               The  hosts are tried in random order, with all con-
index b6f6caf7dd6a70b4a80d69e09e0119bb67ee464e..d79aa2330bc1db598b5686e572ce746349e2e18d 100644 (file)
@@ -95,7 +95,7 @@ The hosts that Postfix will try to connect to and query from.
 Specify \fIunix:\fR for UNIX domain sockets, \fIinet:\fR for TCP
 connections (default).  Example:
 .nf
-    hosts = host1.some.domain host2.some.domain
+    hosts = host1.some.domain host2.some.domain:port
     hosts = unix:/file/name
 .fi
 
index 23bdbb953af486aef4a19d100b0c8d93e7af4737..4e84316f67383415b6cfbd461e2a29d8868f1f2c 100644 (file)
@@ -83,7 +83,7 @@
 #      Specify \fIunix:\fR for UNIX domain sockets, \fIinet:\fR for TCP
 #      connections (default).  Example:
 # .nf
-#          hosts = host1.some.domain host2.some.domain
+#          hosts = host1.some.domain host2.some.domain:port
 #          hosts = unix:/file/name
 # .fi
 #
index f5350a1acdabb0580b1613708dee6b9c46e236a3..dc744cf7a6cfa51aadb0bbea9336b5fc9ac6684b 100644 (file)
@@ -45,7 +45,7 @@
 /*     char    *var_double_bounce_sender;
 /*     int     var_line_limit;
 /*     char    *var_alias_db_map;
-/*     int     var_message_limit;
+/*     long    var_message_limit;
 /*     char    *var_mail_release;
 /*     char    *var_mail_version;
 /*     int     var_ipc_idle_limit;
@@ -230,7 +230,7 @@ char   *var_mynetworks;
 char   *var_double_bounce_sender;
 int     var_line_limit;
 char   *var_alias_db_map;
-int     var_message_limit;
+long    var_message_limit;
 char   *var_mail_release;
 char   *var_mail_version;
 int     var_ipc_idle_limit;
@@ -579,7 +579,6 @@ void    mail_params_init()
        VAR_MAX_USE, DEF_MAX_USE, &var_use_limit, 1, 0,
        VAR_DONT_REMOVE, DEF_DONT_REMOVE, &var_dont_remove, 0, 0,
        VAR_LINE_LIMIT, DEF_LINE_LIMIT, &var_line_limit, 512, 0,
-       VAR_MESSAGE_LIMIT, DEF_MESSAGE_LIMIT, &var_message_limit, 0, 0,
        VAR_HASH_QUEUE_DEPTH, DEF_HASH_QUEUE_DEPTH, &var_hash_queue_depth, 1, 0,
        VAR_FORK_TRIES, DEF_FORK_TRIES, &var_fork_tries, 1, 0,
        VAR_FLOCK_TRIES, DEF_FLOCK_TRIES, &var_flock_tries, 1, 0,
@@ -595,6 +594,10 @@ void    mail_params_init()
        VAR_INET_WINDOW, DEF_INET_WINDOW, &var_inet_windowsize, 0, 0,
        0,
     };
+    static const CONFIG_LONG_TABLE long_defaults[] = {
+       VAR_MESSAGE_LIMIT, DEF_MESSAGE_LIMIT, &var_message_limit, 0, 0,
+       0,
+    };
     static const CONFIG_TIME_TABLE time_defaults[] = {
        VAR_EVENT_DRAIN, DEF_EVENT_DRAIN, &var_event_drain, 1, 0,
        VAR_MAX_IDLE, DEF_MAX_IDLE, &var_idle_limit, 1, 0,
@@ -681,6 +684,7 @@ void    mail_params_init()
     }
 #endif
     get_mail_conf_int_table(other_int_defaults);
+    get_mail_conf_long_table(long_defaults);
     get_mail_conf_bool_table(bool_defaults);
     get_mail_conf_time_table(time_defaults);
     check_default_privs();
index 305358c1c6a4c45141be16fb5039cd3998208b14..2403c437bba782cbf298ec88c72dc1ebdf5e4d5f 100644 (file)
@@ -577,7 +577,7 @@ extern char *var_mailbox_lock;
   */
 #define VAR_MAILBOX_LIMIT      "mailbox_size_limit"
 #define DEF_MAILBOX_LIMIT      (DEF_MESSAGE_LIMIT * 5)
-extern int var_mailbox_limit;
+extern long var_mailbox_limit;
 
  /*
   * Miscellaneous.
@@ -1787,7 +1787,7 @@ extern int var_virt_expan_limit;
   */
 #define VAR_MESSAGE_LIMIT      "message_size_limit"
 #define DEF_MESSAGE_LIMIT      10240000
-extern int var_message_limit;
+extern long var_message_limit;
 
 #define VAR_QUEUE_MINFREE      "queue_minfree"
 #define DEF_QUEUE_MINFREE      0
@@ -2343,7 +2343,7 @@ extern char *var_virt_mailbox_base;
 
 #define VAR_VIRT_MAILBOX_LIMIT         "virtual_mailbox_limit"
 #define DEF_VIRT_MAILBOX_LIMIT         (5 * DEF_MESSAGE_LIMIT)
-extern int var_virt_mailbox_limit;
+extern long var_virt_mailbox_limit;
 
 #define VAR_VIRT_MAILBOX_LOCK          "virtual_mailbox_lock"
 #define DEF_VIRT_MAILBOX_LOCK          "fcntl, dotlock"
@@ -3008,10 +3008,10 @@ extern bool var_tls_preempt_clist;
 #define TLS_BUG_TWEAK_B        " "
 #endif
 
-#else /* USE_TLS */
+#else                                  /* USE_TLS */
 #define TLS_BUG_TWEAK_A        ""
 #define TLS_BUG_TWEAK_B        " "
-#endif /* USE_TLS */
+#endif                                 /* USE_TLS */
 
 #define VAR_TLS_BUG_TWEAKS     "tls_disable_workarounds"
 #define DEF_TLS_BUG_TWEAKS     ((TLS_BUG_TWEAK_A TLS_BUG_TWEAK_B)+1)
index 4e568e835218475cf8c5513833b5a13a0d8494b6..467671c23c4300832aeb7098531835c7f03fa831 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      "20110213"
+#define MAIL_RELEASE_DATE      "20110219"
 #define MAIL_VERSION_NUMBER    "2.9"
 
 #ifdef SNAPSHOT
index 92ccca8988ec4bd8e9629bba4fb0523247c5c234..cec2312637e0814a1ed2862e6a8111446447e4ad 100644 (file)
@@ -650,7 +650,7 @@ char   *var_deliver_hdr;
 int     var_stat_home_dir;
 int     var_mailtool_compat;
 char   *var_mailbox_lock;
-int     var_mailbox_limit;
+long    var_mailbox_limit;
 bool    var_frozen_delivered;
 bool    var_reset_owner_attr;
 bool    var_strict_mbox_owner;
@@ -872,6 +872,9 @@ int     main(int argc, char **argv)
     };
     static const CONFIG_INT_TABLE int_table[] = {
        VAR_DUP_FILTER_LIMIT, DEF_DUP_FILTER_LIMIT, &var_dup_filter_limit, 0, 0,
+       0,
+    };
+    static const CONFIG_LONG_TABLE long_table[] = {
        VAR_MAILBOX_LIMIT, DEF_MAILBOX_LIMIT, &var_mailbox_limit, 0, 0,
        0,
     };
@@ -922,6 +925,7 @@ int     main(int argc, char **argv)
 
     single_server_main(argc, argv, local_service,
                       MAIL_SERVER_INT_TABLE, int_table,
+                      MAIL_SERVER_LONG_TABLE, long_table,
                       MAIL_SERVER_STR_TABLE, str_table,
                       MAIL_SERVER_RAW_TABLE, raw_table,
                       MAIL_SERVER_BOOL_TABLE, bool_table,
index 3f80cf0822695ab12bb972ef9447ae6d8b30f70b..21ff0d5a946d3f1bff0c3919a5dc942c33ef90e6 100644 (file)
 /*     global Postfix configuration file. Tables are loaded in the
 /*     order as specified, and multiple instances of the same type
 /*     are allowed.
+/* .IP "MAIL_SERVER_LONG_TABLE (CONFIG_LONG_TABLE *)"
+/*     A table with configurable parameters, to be loaded from the
+/*     global Postfix configuration file. Tables are loaded in the
+/*     order as specified, and multiple instances of the same type
+/*     are allowed.
 /* .IP "MAIL_SERVER_STR_TABLE (CONFIG_STR_TABLE *)"
 /*     A table with configurable parameters, to be loaded from the
 /*     global Postfix configuration file. Tables are loaded in the
@@ -673,6 +678,9 @@ NORETURN event_server_main(int argc, char **argv, MULTI_SERVER_FN service,...)
        case MAIL_SERVER_INT_TABLE:
            get_mail_conf_int_table(va_arg(ap, CONFIG_INT_TABLE *));
            break;
+       case MAIL_SERVER_LONG_TABLE:
+           get_mail_conf_long_table(va_arg(ap, CONFIG_LONG_TABLE *));
+           break;
        case MAIL_SERVER_STR_TABLE:
            get_mail_conf_str_table(va_arg(ap, CONFIG_STR_TABLE *));
            break;
index 793b64e02d5da1eabdc58d4d4ebefa6bc9462aca..267bdaf03b99fa9511cf6f1c4f73af0009f21423 100644 (file)
@@ -23,6 +23,7 @@
 #define MAIL_SERVER_RAW_TABLE  5
 #define MAIL_SERVER_NINT_TABLE 6
 #define MAIL_SERVER_NBOOL_TABLE        7
+#define MAIL_SERVER_LONG_TABLE 8
 
 #define        MAIL_SERVER_PRE_INIT    10
 #define MAIL_SERVER_POST_INIT  11
@@ -49,7 +50,7 @@ typedef void (*MAIL_SERVER_SLOW_EXIT_FN) (char *, char **);
   * single_server.c
   */
 typedef void (*SINGLE_SERVER_FN) (VSTREAM *, char *, char **);
-extern NORETURN single_server_main(int, char **, SINGLE_SERVER_FN, ...);
+extern NORETURN single_server_main(int, char **, SINGLE_SERVER_FN,...);
 
  /*
   * multi_server.c
@@ -71,7 +72,7 @@ extern int event_server_drain(void);
   * trigger_server.c
   */
 typedef void (*TRIGGER_SERVER_FN) (char *, int, char *, char **);
-extern NORETURN trigger_server_main(int, char **, TRIGGER_SERVER_FN, ...);
+extern NORETURN trigger_server_main(int, char **, TRIGGER_SERVER_FN,...);
 
 #define TRIGGER_BUF_SIZE       1024
 
index 5a93c4c763731427ba112852e82ad40b32edf32a..6477894f57a7a77ece39bbc30ef8e5504ac7b8bc 100644 (file)
 /*     global Postfix configuration file. Tables are loaded in the
 /*     order as specified, and multiple instances of the same type
 /*     are allowed.
+/* .IP "MAIL_SERVER_LONG_TABLE (CONFIG_LONG_TABLE *)"
+/*     A table with configurable parameters, to be loaded from the
+/*     global Postfix configuration file. Tables are loaded in the
+/*     order as specified, and multiple instances of the same type
+/*     are allowed.
 /* .IP "MAIL_SERVER_STR_TABLE (CONFIG_STR_TABLE *)"
 /*     A table with configurable parameters, to be loaded from the
 /*     global Postfix configuration file. Tables are loaded in the
@@ -669,6 +674,9 @@ NORETURN multi_server_main(int argc, char **argv, MULTI_SERVER_FN service,...)
        case MAIL_SERVER_INT_TABLE:
            get_mail_conf_int_table(va_arg(ap, CONFIG_INT_TABLE *));
            break;
+       case MAIL_SERVER_LONG_TABLE:
+           get_mail_conf_long_table(va_arg(ap, CONFIG_LONG_TABLE *));
+           break;
        case MAIL_SERVER_STR_TABLE:
            get_mail_conf_str_table(va_arg(ap, CONFIG_STR_TABLE *));
            break;
index e2a9e72256685dacf1c5790af1628dd3cdb8415a..94937eb978bb284b6cc412c7b17f4aa27a51b490 100644 (file)
 /*     global Postfix configuration file. Tables are loaded in the
 /*     order as specified, and multiple instances of the same type
 /*     are allowed.
+/* .IP "MAIL_SERVER_LONG_TABLE (CONFIG_LONG_TABLE *)"
+/*     A table with configurable parameters, to be loaded from the
+/*     global Postfix configuration file. Tables are loaded in the
+/*     order as specified, and multiple instances of the same type
+/*     are allowed.
 /* .IP "MAIL_SERVER_STR_TABLE (CONFIG_STR_TABLE *)"
 /*     A table with configurable parameters, to be loaded from the
 /*     global Postfix configuration file. Tables are loaded in the
@@ -552,6 +557,9 @@ NORETURN single_server_main(int argc, char **argv, SINGLE_SERVER_FN service,...)
        case MAIL_SERVER_INT_TABLE:
            get_mail_conf_int_table(va_arg(ap, CONFIG_INT_TABLE *));
            break;
+       case MAIL_SERVER_LONG_TABLE:
+           get_mail_conf_long_table(va_arg(ap, CONFIG_LONG_TABLE *));
+           break;
        case MAIL_SERVER_STR_TABLE:
            get_mail_conf_str_table(va_arg(ap, CONFIG_STR_TABLE *));
            break;
index 5d9127362ffac0dda398891b72e262c942f26368..10d6621a21d4f35b07939aa25a130882659f77a5 100644 (file)
 /*     global Postfix configuration file. Tables are loaded in the
 /*     order as specified, and multiple instances of the same type
 /*     are allowed.
+/* .IP "MAIL_SERVER_LONG_TABLE (CONFIG_LONG_TABLE *)"
+/*     A table with configurable parameters, to be loaded from the
+/*     global Postfix configuration file. Tables are loaded in the
+/*     order as specified, and multiple instances of the same type
+/*     are allowed.
 /* .IP "MAIL_SERVER_STR_TABLE (CONFIG_STR_TABLE *)"
 /*     A table with configurable parameters, to be loaded from the
 /*     global Postfix configuration file. Tables are loaded in the
@@ -563,6 +568,9 @@ NORETURN trigger_server_main(int argc, char **argv, TRIGGER_SERVER_FN service,..
        case MAIL_SERVER_INT_TABLE:
            get_mail_conf_int_table(va_arg(ap, CONFIG_INT_TABLE *));
            break;
+       case MAIL_SERVER_LONG_TABLE:
+           get_mail_conf_long_table(va_arg(ap, CONFIG_LONG_TABLE *));
+           break;
        case MAIL_SERVER_STR_TABLE:
            get_mail_conf_str_table(va_arg(ap, CONFIG_STR_TABLE *));
            break;
index bce82c0c96e42f7973ba5f2ad27dce8429723337..220c089e0273585a77f0bf37ba5f0dbb83f39bb9 100644 (file)
@@ -8,7 +8,8 @@ CFLAGS  = $(DEBUG) $(OPT) $(DEFS)
 TESTPROG= 
 MAKES  = bool_table.h bool_vars.h int_table.h int_vars.h str_table.h \
        str_vars.h time_table.h time_vars.h raw_table.h raw_vars.h \
-       nint_table.h nint_vars.h nbool_table.h nbool_vars.h
+       nint_table.h nint_vars.h nbool_table.h nbool_vars.h long_table.h \
+       long_vars.h
 AUTOS  = auto_table.h auto_vars.h
 DUMMIES        = makes_dummy autos_dummy # for "make -j"
 PROG   = postconf
@@ -121,6 +122,8 @@ postconf.o: install_table.h
 postconf.o: install_vars.h
 postconf.o: int_table.h
 postconf.o: int_vars.h
+postconf.o: long_table.h
+postconf.o: long_vars.h
 postconf.o: nbool_table.h
 postconf.o: nbool_vars.h
 postconf.o: nint_table.h
index 399c0248ea1466fe48b9534a78fe8dee5bb359fe..3b7a189ffdeaf591ba7ad4b8c763e1b459a66867 100644 (file)
        }
     }
 }
+/^(static| )*(const +)?CONFIG_LONG_TABLE .*\{/,/\};/ { 
+    if ($1 ~ /VAR/) {
+       long_vars["long " substr($3,2,length($3)-2) ";"] = 1
+       if (++itab[$1 $2 $4 $5 $6 $7 $8 $9] == 1) {
+           long_table[$0] = 1
+       }
+    }
+}
 
 END { 
     # Print parameter declarations without busting old AWK's file limit.
@@ -112,6 +120,11 @@ END {
        print key
     print "EOF"
 
+    print "cat >long_vars.h <<'EOF'"
+    for (key in long_vars)
+       print key
+    print "EOF"
+
     # Print parameter initializations without busting old AWK's file limit.
     print "sed 's/[    ][      ]*/ /g' >int_table.h <<'EOF'"
     for (key in int_table)
@@ -148,6 +161,11 @@ END {
        print key
     print "EOF"
 
+    print "sed 's/[    ][      ]*/ /g' >long_table.h <<'EOF'"
+    for (key in long_table)
+       print key
+    print "EOF"
+
     # Flush output nicely.
     exit(0);
 }
index 82d8be07c6bd3a8d8ff58b92d9b84651916376f6..403add01fbfd1534bd7d489a9d5aee9235db987b 100644 (file)
@@ -330,6 +330,7 @@ DICT   *text_table;
 #include "raw_vars.h"
 #include "nint_vars.h"
 #include "nbool_vars.h"
+#include "long_vars.h"
 
  /*
   * Manually extracted.
@@ -377,6 +378,11 @@ static const CONFIG_NBOOL_TABLE nbool_table[] = {
     0,
 };
 
+static const CONFIG_LONG_TABLE long_table[] = {
+#include "long_table.h"
+    0,
+};
+
  /*
   * Parameters with default values obtained via function calls.
   */
@@ -698,6 +704,7 @@ static void hash_parameters(void)
     const CONFIG_RAW_TABLE *rst;
     const CONFIG_NINT_TABLE *nst;
     const CONFIG_NBOOL_TABLE *bst;
+    const CONFIG_LONG_TABLE *lst;
 
     param_table = htable_create(100);
 
@@ -719,6 +726,8 @@ static void hash_parameters(void)
        htable_enter(param_table, nst->name, (char *) nst);
     for (bst = nbool_table; bst->name; bst++)
        htable_enter(param_table, bst->name, (char *) bst);
+    for (lst = long_table; lst->name; lst++)
+       htable_enter(param_table, lst->name, (char *) lst);
 }
 
 /* show_strval - show string-valued parameter */
@@ -746,6 +755,17 @@ static void show_intval(int mode, const char *name, int value)
     }
 }
 
+/* show_longval - show long-valued parameter */
+
+static void show_longval(int mode, const char *name, long value)
+{
+    if (mode & SHOW_NAME) {
+       vstream_printf("%s = %ld\n", name, value);
+    } else {
+       vstream_printf("%ld\n", value);
+    }
+}
+
 /* print_bool - print boolean parameter */
 
 static void print_bool(int mode, CONFIG_BOOL_TABLE *cbt)
@@ -965,6 +985,29 @@ static void print_nbool(int mode, CONFIG_NBOOL_TABLE * bst)
     }
 }
 
+/* print_long - print long parameter */
+
+static void print_long(int mode, CONFIG_LONG_TABLE *clt)
+{
+    const char *value;
+
+    if (mode & SHOW_DEFS) {
+       show_longval(mode, clt->name, clt->defval);
+    } else {
+       value = dict_lookup(CONFIG_DICT, clt->name);
+       if ((mode & SHOW_NONDEF) == 0) {
+           if (value == 0) {
+               show_longval(mode, clt->name, clt->defval);
+           } else {
+               show_strval(mode, clt->name, value);
+           }
+       } else {
+           if (value != 0)
+               show_strval(mode, clt->name, value);
+       }
+    }
+}
+
 /* print_parameter - show specific parameter */
 
 static void print_parameter(int mode, char *ptr)
@@ -993,6 +1036,8 @@ static void print_parameter(int mode, char *ptr)
        print_nint(mode, (CONFIG_NINT_TABLE *) ptr);
     if (INSIDE(ptr, nbool_table))
        print_nbool(mode, (CONFIG_NBOOL_TABLE *) ptr);
+    if (INSIDE(ptr, long_table))
+       print_long(mode, (CONFIG_LONG_TABLE *) ptr);
     if (msg_verbose)
        vstream_fflush(VSTREAM_OUT);
 }
index dfb61cf9998e69d1d900d1bcaf03dd768c6cf1e4..f68a255d7154f613fca90a3ba2456b9f8677d0ae 100644 (file)
@@ -121,7 +121,7 @@ int     psc_send_reply(PSC_STATE *state, const char *text)
                STR(state->send_buf), LEN(state->send_buf));
     if (ret > 0)
        vstring_truncate(state->send_buf, ret - LEN(state->send_buf));
-    if (ret < 0 && errno != EAGAIN && errno != EPIPE)
+    if (ret < 0 && errno != EAGAIN && errno != EPIPE && errno != ECONNRESET)
        msg_warn("write [%s]:%s: %m", state->smtp_client_addr,
                 state->smtp_client_port);
     return (ret < 0 && errno != EAGAIN);
index ba297117a3e6364c8ffba66b52e04b4740c906e3..07c38c1e77bb76f78935b193ec5ccdee6f72d77b 100644 (file)
@@ -246,13 +246,13 @@ void    qmqpd_peer_init(QMQPD_STATE *state)
            aierr = hostname_to_sockaddr_pf(state->name, state->addr_family,
                                            (char *) 0, 0, &res0);
            if (aierr) {
-               msg_warn("%s: hostname %s verification failed: %s",
-                        state->addr, state->name, MAI_STRERROR(aierr));
+               msg_warn("hostname %s does not resolve to address %s: %s",
+                        state->name, state->addr, MAI_STRERROR(aierr));
                REJECT_PEER_NAME(state);
            } else {
                for (res = res0; /* void */ ; res = res->ai_next) {
                    if (res == 0) {
-                       msg_warn("%s: address not listed for hostname %s",
+                       msg_warn("hostname %s does not resolve to address %s",
                                 state->addr, state->name);
                        REJECT_PEER_NAME(state);
                        break;
index af678b6806ca991e0ea66c921347ae536b12e558..3ea89946b470473ead3b5661726e8a391ae84027 100644 (file)
@@ -340,15 +340,15 @@ void    smtpd_peer_init(SMTPD_STATE *state)
            aierr = hostname_to_sockaddr_pf(state->name, state->addr_family,
                                            (char *) 0, 0, &res0);
            if (aierr) {
-               msg_warn("%s: hostname %s verification failed: %s",
-                        state->addr, state->name, MAI_STRERROR(aierr));
+               msg_warn("hostname %s does not resolve to address %s: %s",
+                        state->name, state->addr, MAI_STRERROR(aierr));
                REJECT_PEER_NAME(state, (TEMP_AI_ERROR(aierr) ?
                            SMTPD_PEER_CODE_TEMP : SMTPD_PEER_CODE_FORGED));
            } else {
                for (res = res0; /* void */ ; res = res->ai_next) {
                    if (res == 0) {
-                       msg_warn("%s: address not listed for hostname %s",
-                                state->addr, state->name);
+                       msg_warn("hostname %s does not resolve to address %s",
+                                state->name, state->addr);
                        REJECT_PEER_NAME(state, SMTPD_PEER_CODE_FORGED);
                        break;
                    }
index 599be61c98040039f015e375b27d682f53e297a6..95eab25089ffbee21c0e197b1eed32157939d628 100644 (file)
@@ -331,7 +331,7 @@ char   *var_virt_gid_maps;
 int     var_virt_minimum_uid;
 char   *var_virt_mailbox_base;
 char   *var_virt_mailbox_lock;
-int     var_virt_mailbox_limit;
+long    var_virt_mailbox_limit;
 char   *var_mail_spool_dir;            /* XXX dependency fix */
 bool    var_strict_mbox_owner;
 
@@ -497,6 +497,9 @@ int     main(int argc, char **argv)
 {
     static const CONFIG_INT_TABLE int_table[] = {
        VAR_VIRT_MINUID, DEF_VIRT_MINUID, &var_virt_minimum_uid, 1, 0,
+       0,
+    };
+    static const CONFIG_LONG_TABLE long_table[] = {
        VAR_VIRT_MAILBOX_LIMIT, DEF_VIRT_MAILBOX_LIMIT, &var_virt_mailbox_limit, 0, 0,
        0,
     };
@@ -521,6 +524,7 @@ int     main(int argc, char **argv)
 
     single_server_main(argc, argv, local_service,
                       MAIL_SERVER_INT_TABLE, int_table,
+                      MAIL_SERVER_LONG_TABLE, long_table,
                       MAIL_SERVER_STR_TABLE, str_table,
                       MAIL_SERVER_BOOL_TABLE, bool_table,
                       MAIL_SERVER_PRE_INIT, pre_init,