]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
postfix-3.7.1 v3.7.1
authorWietse Venema <wietse@porcupine.org>
Mon, 18 Apr 2022 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <postfix-users@dukhovni.org>
Mon, 18 Apr 2022 19:12:23 +0000 (15:12 -0400)
15 files changed:
postfix/HISTORY
postfix/README_FILES/PCRE_README
postfix/html/PCRE_README.html
postfix/html/postlogd.8.html
postfix/man/man8/postlogd.8
postfix/proto/PCRE_README.html
postfix/src/cleanup/cleanup.h
postfix/src/cleanup/cleanup_init.c
postfix/src/cleanup/cleanup_milter.c
postfix/src/cleanup/cleanup_state.c
postfix/src/global/dynamicmaps.c
postfix/src/global/mail_params.h
postfix/src/global/mail_version.h
postfix/src/postlogd/postlogd.c
postfix/src/util/inet_connect.c

index 0d900728b678e49ecfaa433bde8b9eb7453c453a..d1efcbdd0ef5a6fdae73e7f005ee7b0b688c8935 100644 (file)
@@ -26280,3 +26280,50 @@ Apologies for any names omitted.
 
        Bitrot: Berkeley DB 18 is like Berkeley DB 6. Yasuhiro
        Kimura. File: util/dict_db.c.
+
+20220217
+
+       Typo (introduced: Postfix.3.7): "pcre2 --libs" should be
+       "pcre2 --libs8". Reported by Carlos Velasco. File
+       proto/PCRE_README.html.
+
+20220322
+
+       Cleanup: added missing _checks, _reply_footer, _reply_filter,
+       _command_filter, and _delivery_status_filter parameter names
+       to the proxy_read_maps default value. Files: global/mail_params.h,
+       mantools/missing-proxy-read-maps.
+
+20220330
+
+       Documentation: updated the postlogd(8) daemon manpage,
+       adding that the Postfix >= 3.7 postlog(1) command can run
+       with setgid permissions. File: postlogd/postlogd.c.
+
+20220404
+
+       Bugfix: in an internal client module, "host or service not
+       found" was a fatal error, causing the milter_default_action
+       setting to be ignored. It is now a non-fatal error. The
+       same client is used by many Postfix clients (smtpd_proxy,
+       dovecot auth, tcp_table, memcache, socketmap, and so on).
+       Problem reported by Christian Degenkolb. File: util/inet_connect.c.
+
+20220415
+
+       Cleanup (problem introduced: Postfix 3.0): with dynamic map
+       loading enabled, an attempt to create a map with "postmap
+       regexp:path" would result in a bogus error message "Is the
+       postfix-regexp package installed?" instead of "unsupported
+       map type for this operation". This happened with all built-in
+       map types (static, cidr, etc.) that have no 'bulk create'
+       support. Problem reported by Greg Klanderman. File:
+       global/dynamicmaps.c.
+
+20220417
+
+       Cleanup (problem introduced: Postfix 2.7): milter_header_checks
+       maps are now opened before the cleanup server enters the
+       chroot jail. Problem reported by Jesper Dybdal. Files:
+       cleanup/cleanup.h, cleanup/cleanup_init.c,
+       cleanup/cleanup_milter.c, cleanup/cleanup_state.c.
index d8bf8d5046fdd954f78d2b2b1bd6e5a07451692e..6dffb4b5c449039d5b5815ef5f92fdae3aa2a771 100644 (file)
@@ -41,7 +41,7 @@ To build Postfix explicitly with a pcre2 library (Postfix 3.7 and later):
 
     $ make -f Makefile.init makefiles \
         "CCARGS=-DHAS_PCRE=2 `pcre2-config --cflags`" \
-        "AUXLIBS_PCRE=`pcre2-config --libs`"
+        "AUXLIBS_PCRE=`pcre2-config --libs8`"
     $ make
 
 To build Postfix explicitly with a legacy pcre library (all Postfix versions):
index 810e3aad070cbf65426db5a605f018f82fdefb40..0a89dfbda4efafae120e7428e39135280184b4da 100644 (file)
@@ -66,7 +66,7 @@ and later): </p>
 <pre>
 $ make -f Makefile.init makefiles \
     "CCARGS=-DHAS_PCRE=2 `pcre2-config --cflags`" \
-    "<a href="PCRE_README.html">AUXLIBS_PCRE</a>=`pcre2-config --libs`"
+    "<a href="PCRE_README.html">AUXLIBS_PCRE</a>=`pcre2-config --libs8`"
 $ make
 </pre>
 </blockquote>
index dbf827ca408877756fd072bcafa6ca8aa35ec5b6..bd26cb85c40f614ba8dd03e1549f9ae78f765ef4 100644 (file)
@@ -31,8 +31,8 @@ POSTLOGD(8)                                                        POSTLOGD(8)
        <b><a href="postconf.5.html#maillog_file">log_file</a></b> (also, logging to stdout would interfere with the operation of
        some of these programs). These programs can log to <a href="postlogd.8.html"><b>postlogd</b>(8)</a> if  they
        are run by the super-user, or if their executable file has set-gid per-
-       mission. Do not set this permission on programs other than  <a href="postdrop.1.html"><b>postdrop</b>(1)</a>
-       and <a href="postqueue.1.html"><b>postqueue</b>(1)</a>.
+       mission. Do not set this permission on programs other than <a href="postdrop.1.html"><b>postdrop</b>(1)</a>,
+       <a href="postqueue.1.html"><b>postqueue</b>(1)</a> and (Postfix &gt;= 3.7) <a href="postlog.1.html"><b>postlog</b>(1)</a>.
 
 <b>CONFIGURATION PARAMETERS</b>
        Changes  to  <a href="postconf.5.html"><b>main.cf</b></a>  are  picked up automatically, as <a href="postlogd.8.html"><b>postlogd</b>(8)</a> pro-
index 19112f2bdd0daa924bc8e48fb99246184432a033..9168a3429dd1306f295e548ac4f828d54ad1495c 100644 (file)
@@ -34,8 +34,8 @@ Other non\-daemon Postfix programs will never write directly to
 with the operation of some of these programs). These programs
 can log to \fBpostlogd\fR(8) if they are run by the super\-user,
 or if their executable file has set\-gid permission. Do not
-set this permission on programs other than \fBpostdrop\fR(1)
-and \fBpostqueue\fR(1).
+set this permission on programs other than \fBpostdrop\fR(1),
+\fBpostqueue\fR(1) and (Postfix >= 3.7) \fBpostlog\fR(1).
 .SH "CONFIGURATION PARAMETERS"
 .na
 .nf
index 896de90971f505e7654d9d3805185dd7d0afda99..1741826a3a814e08aee80f3b5b49c11777e93a0c 100644 (file)
@@ -66,7 +66,7 @@ and later): </p>
 <pre>
 $ make -f Makefile.init makefiles \
     "CCARGS=-DHAS_PCRE=2 `pcre2-config --cflags`" \
-    "AUXLIBS_PCRE=`pcre2-config --libs`"
+    "AUXLIBS_PCRE=`pcre2-config --libs8`"
 $ make
 </pre>
 </blockquote>
index 43de26f373bbc305c9e143995d5a8ccf243be842..baecaadb71acfc25308cfb0fc4b763ddabd7c477 100644 (file)
@@ -117,8 +117,6 @@ typedef struct CLEANUP_STATE {
     VSTRING *milter_ext_from;          /* externalized sender */
     VSTRING *milter_ext_rcpt;          /* externalized recipient */
     VSTRING *milter_err_text;          /* milter call-back reply */
-    HBC_CHECKS *milter_hbc_checks;     /* Milter header checks */
-    VSTRING *milter_hbc_reply;         /* Milter header checks reply */
     VSTRING *milter_dsn_buf;           /* Milter DSN parsing buffer */
 
     /*
@@ -318,6 +316,7 @@ extern int cleanup_bounce(CLEANUP_STATE *);
  /*
   * cleanup_milter.c.
   */
+extern void cleanup_milter_header_checks_init(void);
 extern void cleanup_milter_receive(CLEANUP_STATE *, int);
 extern void cleanup_milter_inspect(CLEANUP_STATE *, MILTERS *);
 extern void cleanup_milter_emul_mail(CLEANUP_STATE *, MILTERS *, const char *);
index 9ae72860720ef37b01e7013da5b898e9650a081c..8c43a021205f09bc8b37713a70daaa1376fefe59 100644 (file)
@@ -427,6 +427,8 @@ void    cleanup_pre_jail(char *unused_name, char **unused_argv)
                                        var_milt_eod_macros,
                                        var_milt_unk_macros,
                                        var_milt_macro_deflts);
+    if (*var_milt_head_checks)
+       cleanup_milter_header_checks_init();
 
     flush_init();
 }
index 05237deb7e497ee916e4276d3908f4da624b84e8..8b5c8fd07bc7147f729ddead42ab443192e34b49 100644 (file)
@@ -6,6 +6,8 @@
 /* SYNOPSIS
 /*     #include <cleanup.h>
 /*
+/*     void    cleanup_milter_header_checks_init(void)
+/*
 /*     void    cleanup_milter_receive(state, count)
 /*     CLEANUP_STATE *state;
 /*     int     count;
@@ -32,6 +34,9 @@
 /*     filter (milter) applications, including in-place queue file
 /*     modification.
 /*
+/*     cleanup_milter_header_checks_init() does pre-jail
+/*     initializations.
+/*
 /*     cleanup_milter_receive() receives mail filter definitions,
 /*     typically from an smtpd(8) server process, and registers
 /*     local call-back functions for macro expansion and for queue
 
 /*#define msg_verbose  2*/
 
+static HBC_CHECKS *cleanup_milter_hbc_checks;
+static VSTRING *cleanup_milter_hbc_reply;
 static void cleanup_milter_set_error(CLEANUP_STATE *, int);
 static const char *cleanup_add_rcpt_par(void *, const char *, const char *);
 
@@ -345,9 +352,9 @@ static char *cleanup_milter_hbc_extend(void *context, const char *command,
            state->errs |= CLEANUP_STAT_CONT;
        state->flags &= ~CLEANUP_FLAG_FILTER_ALL;
        cleanup_milter_hbc_log(context, "reject", where, buf, state->reason);
-       vstring_sprintf(state->milter_hbc_reply, "%d %s",
+       vstring_sprintf(cleanup_milter_hbc_reply, "%d %s",
                        detail->smtp, state->reason);
-       STR(state->milter_hbc_reply)[0] = *state->reason;
+       STR(cleanup_milter_hbc_reply)[0] = *state->reason;
        return ((char *) buf);
     }
     if (STREQUAL(command, "FILTER", cmd_len)) {
@@ -368,7 +375,7 @@ static char *cleanup_milter_hbc_extend(void *context, const char *command,
     }
     if (STREQUAL(command, "DISCARD", cmd_len)) {
        cleanup_milter_hbc_log(context, "discard", where, buf, optional_text);
-       vstring_strcpy(state->milter_hbc_reply, "D");
+       vstring_strcpy(cleanup_milter_hbc_reply, "D");
        state->flags |= CLEANUP_FLAG_DISCARD;
        state->flags &= ~CLEANUP_FLAG_FILTER_ALL;
        return ((char *) buf);
@@ -409,7 +416,7 @@ static int cleanup_milter_header_checks(CLEANUP_STATE *state, VSTRING *buf)
      * end-of-message stage, therefore all the header operations are relative
      * to the primary message header.
      */
-    ret = hbc_header_checks((void *) state, state->milter_hbc_checks,
+    ret = hbc_header_checks((void *) state, cleanup_milter_hbc_checks,
                            MIME_HDR_PRIMARY, (HEADER_OPTS *) 0,
                            buf, (off_t) 0);
     if (ret == 0) {
@@ -504,8 +511,10 @@ static void cleanup_milter_hbc_add_meta_records(CLEANUP_STATE *state)
 
 /* cleanup_milter_header_checks_init - initialize post-Milter header checks */
 
-static void cleanup_milter_header_checks_init(CLEANUP_STATE *state)
+void    cleanup_milter_header_checks_init(void)
 {
+    static const char myname[] = "cleanup_milter_header_checks_init";
+
 #define NO_NESTED_HDR_NAME     ""
 #define NO_NESTED_HDR_VALUE    ""
 #define NO_MIME_HDR_NAME       ""
@@ -517,30 +526,60 @@ static void cleanup_milter_header_checks_init(CLEANUP_STATE *state)
        cleanup_milter_hbc_extend,
     };
 
-    state->milter_hbc_checks =
+    if (*var_milt_head_checks == 0)
+       msg_panic("%s: %s is empty", myname, VAR_MILT_HEAD_CHECKS);
+
+    if (cleanup_milter_hbc_checks)
+       msg_panic("%s: cleanup_milter_hbc_checks is not null");
+    cleanup_milter_hbc_checks =
        hbc_header_checks_create(VAR_MILT_HEAD_CHECKS, var_milt_head_checks,
                                 NO_MIME_HDR_NAME, NO_MIME_HDR_VALUE,
                                 NO_NESTED_HDR_NAME, NO_NESTED_HDR_VALUE,
                                 &call_backs);
-    state->milter_hbc_reply = vstring_alloc(100);
+
+    if (cleanup_milter_hbc_reply)
+       msg_panic("%s: cleanup_milter_hbc_reply is not null");
+    cleanup_milter_hbc_reply = vstring_alloc(100);
+}
+
+#ifdef TEST
+
+/* cleanup_milter_header_checks_deinit - undo cleanup_milter_header_checks_init */
+
+static void cleanup_milter_header_checks_deinit(void)
+{
+    static const char myname[] = "cleanup_milter_header_checks_deinit";
+
+    if (cleanup_milter_hbc_checks == 0)
+       msg_panic("%s: cleanup_milter_hbc_checks is null", myname);
+    hbc_header_checks_free(cleanup_milter_hbc_checks);
+    cleanup_milter_hbc_checks = 0;
+
+    if (cleanup_milter_hbc_reply == 0)
+       msg_panic("%s: cleanup_milter_hbc_reply is null", myname);
+    vstring_free(cleanup_milter_hbc_reply);
+    cleanup_milter_hbc_reply = 0;
+}
+
+#endif
+
+/* cleanup_milter_header_checks_reinit - re-init post-Milter header checks */
+
+static void cleanup_milter_header_checks_reinit(CLEANUP_STATE *state)
+{
     if (state->filter)
        myfree(state->filter);
     state->filter = 0;
     if (state->redirect)
        myfree(state->redirect);
     state->redirect = 0;
+    VSTRING_RESET(cleanup_milter_hbc_reply);
 }
 
 /* cleanup_milter_hbc_finish - finalize post-Milter header checks */
 
 static void cleanup_milter_hbc_finish(CLEANUP_STATE *state)
 {
-    if (state->milter_hbc_checks)
-       hbc_header_checks_free(state->milter_hbc_checks);
-    state->milter_hbc_checks = 0;
-    if (state->milter_hbc_reply)
-       vstring_free(state->milter_hbc_reply);
-    state->milter_hbc_reply = 0;
     if (CLEANUP_OUT_OK(state)
        && !CLEANUP_MILTER_REJECTING_OR_DISCARDING_MESSAGE(state)
        && (state->filter || state->redirect))
@@ -644,7 +683,7 @@ static const char *cleanup_add_header(void *context, const char *name,
      */
     buf = vstring_alloc(100);
     vstring_sprintf(buf, "%s:%s%s", name, space, value);
-    if (state->milter_hbc_checks) {
+    if (cleanup_milter_hbc_checks) {
        if (cleanup_milter_header_checks(state, buf) == 0
            || (state->flags & CLEANUP_FLAG_DISCARD)) {
            vstring_free(buf);
@@ -707,8 +746,8 @@ static const char *cleanup_add_header(void *context, const char *name,
      * In case of error while doing record output.
      */
     return (CLEANUP_OUT_OK(state) == 0 ? cleanup_milter_error(state, 0) :
-           state->milter_hbc_reply && LEN(state->milter_hbc_reply) ?
-           STR(state->milter_hbc_reply) : 0);
+           cleanup_milter_hbc_reply && LEN(cleanup_milter_hbc_reply) ?
+           STR(cleanup_milter_hbc_reply) : 0);
 
     /*
      * Note: state->append_hdr_pt_target never changes.
@@ -1032,7 +1071,7 @@ static const char *cleanup_patch_header(CLEANUP_STATE *state,
      * be dropped.
      */
     vstring_sprintf(buf, "%s:%s%s", new_hdr_name, hdr_space, new_hdr_value);
-    if (state->milter_hbc_checks
+    if (cleanup_milter_hbc_checks
        && cleanup_milter_header_checks(state, buf) == 0)
        CLEANUP_PATCH_HEADER_RETURN(0);
 
@@ -1101,8 +1140,8 @@ static const char *cleanup_patch_header(CLEANUP_STATE *state,
      */
     CLEANUP_PATCH_HEADER_RETURN(
               CLEANUP_OUT_OK(state) == 0 ? cleanup_milter_error(state, 0) :
-                  state->milter_hbc_reply && LEN(state->milter_hbc_reply) ?
-                               STR(state->milter_hbc_reply) : 0);
+                cleanup_milter_hbc_reply && LEN(cleanup_milter_hbc_reply) ?
+                               STR(cleanup_milter_hbc_reply) : 0);
 
     /*
      * Note: state->append_hdr_pt_target never changes.
@@ -1984,8 +2023,8 @@ static const char *cleanup_milter_apply(CLEANUP_STATE *state, const char *event,
      * Don't process our own milter_header/body checks replies. See comments
      * in cleanup_milter_hbc_extend().
      */
-    if (state->milter_hbc_reply &&
-       strcmp(resp, STR(state->milter_hbc_reply)) == 0)
+    if (cleanup_milter_hbc_reply &&
+       strcmp(resp, STR(cleanup_milter_hbc_reply)) == 0)
        return (0);
 
     /*
@@ -2151,7 +2190,7 @@ void    cleanup_milter_inspect(CLEANUP_STATE *state, MILTERS *milters)
      * Prologue: prepare for Milter header/body checks.
      */
     if (*var_milt_head_checks)
-       cleanup_milter_header_checks_init(state);
+       cleanup_milter_header_checks_reinit(state);
 
     /*
      * Process mail filter replies. The reply format is verified by the mail
@@ -2587,9 +2626,10 @@ int     main(int unused_argc, char **argv)
                cleanup_milter_hbc_finish(state);
                myfree(var_milt_head_checks);
                var_milt_head_checks = "";
+               cleanup_milter_header_checks_deinit();
            }
            close_queue_file(state);
-       } else if (state->milter_hbc_reply && LEN(state->milter_hbc_reply)) {
+       } else if (cleanup_milter_hbc_reply && LEN(cleanup_milter_hbc_reply)) {
            /* Postfix libmilter would skip further requests. */
            msg_info("ignoring: %s %s %s", argv->argv[0],
                     argv->argc > 1 ? argv->argv[1] : "",
@@ -2694,7 +2734,7 @@ int     main(int unused_argc, char **argv)
                msg_warn("can't change header checks");
            } else {
                var_milt_head_checks = mystrdup(argv->argv[1]);
-               cleanup_milter_header_checks_init(state);
+               cleanup_milter_header_checks_init();
            }
        } else if (strcmp(argv->argv[0], "sender_bcc_maps") == 0) {
            if (argv->argc != 2) {
index 7790f1b515dcb6eae72dd091b4489d1dc59d9f1d..99adf84b9863f9fd21c4a4a6a55997a8d79ea6a4 100644 (file)
@@ -107,8 +107,6 @@ CLEANUP_STATE *cleanup_state_alloc(VSTREAM *src)
     state->append_hdr_pt_target = -1;
     state->append_meta_pt_offset = -1;
     state->append_meta_pt_target = -1;
-    state->milter_hbc_checks = 0;
-    state->milter_hbc_reply = 0;
     state->rcpt_count = 0;
     state->reason = 0;
     state->smtp_reply = 0;
index 55d622aa2c731eca22c43836e15910bc99e42111..f0213d39d8dbd4bbdf664829db0b4ae541970032 100644 (file)
@@ -168,11 +168,23 @@ static MKMAP_OPEN_FN dymap_mkmap_lookup(const char *dict_type)
      * All errors are fatal. If the postmap(1) or postalias(1) command can't
      * create the requested database, then graceful degradation is not
      * useful.
+     * 
+     * Fix 20220416: if this dictionary type is registered for some non-mkmap
+     * purpose, then don't talk nonsense about a missing package.
      */
-    if ((dp = (DYMAP_INFO *) htable_find(dymap_info, dict_type)) == 0)
+    if ((dp = (DYMAP_INFO *) htable_find(dymap_info, dict_type)) == 0) {
+       ARGV   *types = dict_mapnames();
+       char  **cpp;
+
+       for (cpp = types->argv; *cpp; cpp++) {
+           if (strcmp(dict_type, *cpp) == 0)
+               msg_fatal("unsupported dictionary type: %s does not support "
+                         "bulk-mode creation.", dict_type);
+       }
        msg_fatal("unsupported dictionary type: %s. "
                  "Is the postfix-%s package installed?",
                  dict_type, dict_type);
+    }
     if (!dp->mkmap_name)
        msg_fatal("unsupported dictionary type: %s does not support "
                  "bulk-mode creation.", dict_type);
index 01cce33ce7045ed44572738eba686dc28266fec9..e728006e3948c0c84683fe0465a7a12cd703cca2 100644 (file)
@@ -2502,7 +2502,33 @@ extern int var_local_rcpt_code;
                                " $" VAR_PSC_REJ_FTR_MAPS \
                                " $" VAR_SMTPD_REJ_FTR_MAPS \
                                " $" VAR_TLS_SERVER_SNI_MAPS \
-                               " $" VAR_TLSP_CLNT_POLICY
+                               " $" VAR_TLSP_CLNT_POLICY \
+                               " $" VAR_DSN_FILTER \
+                               " $" VAR_LMTP_DSN_FILTER \
+                               " $" VAR_LMTP_DNS_RE_FILTER \
+                               " $" VAR_LMTP_RESP_FILTER \
+                               " $" VAR_LOCAL_DSN_FILTER \
+                               " $" VAR_PIPE_DSN_FILTER \
+                               " $" VAR_PSC_CMD_FILTER \
+                               " $" VAR_SMTP_DSN_FILTER \
+                               " $" VAR_SMTP_DNS_RE_FILTER \
+                               " $" VAR_SMTP_RESP_FILTER \
+                               " $" VAR_SMTPD_CMD_FILTER \
+                               " $" VAR_SMTPD_DNS_RE_FILTER \
+                               " $" VAR_VIRT_DSN_FILTER \
+                               " $" VAR_BODY_CHECKS \
+                               " $" VAR_HEADER_CHECKS \
+                               " $" VAR_LMTP_BODY_CHKS \
+                               " $" VAR_LMTP_HEAD_CHKS \
+                               " $" VAR_LMTP_MIME_CHKS \
+                               " $" VAR_LMTP_NEST_CHKS \
+                               " $" VAR_MILT_HEAD_CHECKS \
+                               " $" VAR_MIMEHDR_CHECKS \
+                               " $" VAR_NESTHDR_CHECKS \
+                               " $" VAR_SMTP_BODY_CHKS \
+                               " $" VAR_SMTP_HEAD_CHKS \
+                               " $" VAR_SMTP_MIME_CHKS \
+                               " $" VAR_SMTP_NEST_CHKS
 extern char *var_proxy_read_maps;
 
 #define VAR_PROXY_WRITE_MAPS   "proxy_write_maps"
index d882ae875c1e37099b780d185766ed73be842eff..f2a9cace44dec8b0450fd896b31a6c42161af309 100644 (file)
@@ -20,8 +20,8 @@
   * Patches change both the patchlevel and the release date. Snapshots have no
   * patchlevel; they change the release date only.
   */
-#define MAIL_RELEASE_DATE      "20220205"
-#define MAIL_VERSION_NUMBER    "3.7.0"
+#define MAIL_RELEASE_DATE      "20220418"
+#define MAIL_VERSION_NUMBER    "3.7.1"
 
 #ifdef SNAPSHOT
 #define MAIL_VERSION_DATE      "-" MAIL_RELEASE_DATE
index 4c6db6362b047b805d68da9fecea756734f635b4..902cbe5d3fc45555c79b5dec3d202cb82c1b18af 100644 (file)
@@ -26,8 +26,8 @@
 /*     with the operation of some of these programs). These programs
 /*     can log to \fBpostlogd\fR(8) if they are run by the super-user,
 /*     or if their executable file has set-gid permission. Do not
-/*     set this permission on programs other than \fBpostdrop\fR(1)
-/*     and \fBpostqueue\fR(1).
+/*     set this permission on programs other than \fBpostdrop\fR(1),
+/*     \fBpostqueue\fR(1) and (Postfix >= 3.7) \fBpostlog\fR(1).
 /* CONFIGURATION PARAMETERS
 /* .ad
 /* .fi
index 591283ef2d1471f0399a9e634403ed9d70ef6b06..0f5542e947c23687a8dd82a3f722b1caf0b4fc45 100644 (file)
@@ -101,10 +101,13 @@ int     inet_connect(const char *addr, int block_mode, int timeout)
     if ((parse_err = host_port(buf, &host, "localhost", &port, (char *) 0)) != 0)
        msg_fatal("%s: %s", addr, parse_err);
     if ((aierr = hostname_to_sockaddr(host, port, SOCK_STREAM, &res0)) != 0)
-       msg_fatal("host or service %s not found: %s",
-                 addr, MAI_STRERROR(aierr));
+       msg_warn("host or service %s not found: %s",
+                addr, MAI_STRERROR(aierr));
     myfree(buf);
-
+    if (aierr) {
+       errno = EADDRNOTAVAIL;                  /* for up-stream "%m" */
+       return (-1);
+    }
     proto_info = inet_proto_info();
     for (sock = -1, found = 0, res = res0; res != 0; res = res->ai_next) {