]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
snapshot-20010426
authorWietse Venema <wietse@porcupine.org>
Thu, 26 Apr 2001 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:27:14 +0000 (06:27 +0000)
13 files changed:
postfix/HISTORY
postfix/INSTALL
postfix/INSTALL.sh
postfix/conf/main.cf
postfix/conf/master.cf
postfix/conf/sample-local.cf
postfix/html/faq.html
postfix/makedefs
postfix/src/global/mail_version.h
postfix/src/local/alias.c
postfix/src/master/master.c
postfix/src/master/master_ent.c
postfix/src/smtpd/smtpd.c

index b9fd3d3e96dfeaf488594b47759ada92467c5fe4..b0630872e3805908768e7833ba2c6160c4500a6b 100644 (file)
@@ -5074,6 +5074,12 @@ Apologies for any names omitted.
        postalias/postalias.c.
 
        Bugfix: with a non-default inet_interfaces setting, the
-       master daemon ignored host information in explicit host:port
-       settings in master.cf.  Fix by Jun-ichiro itojun Hagino @
-       iijlab.net.  Files: master/master.h, master/master_ent.c.
+       master ignored host information in master.cf host:port
+       settings.  Fix by Jun-ichiro itojun Hagino @ iijlab.net.
+       Files: master/master.h, master/master_ent.c.
+
+20010426
+
+       Workaround: the SMTP server did not really parse invalid
+       addresses such as <first last <user@domain>> well.  I
+       thought this was taken care of years ago. File:  smtpd/smtpd.c.
index f75095ad6a9920e3ff46940c4c57264fe9d746ef..4cf914fe865838b72e178bb402358b2877aed0a1 100644 (file)
@@ -208,6 +208,10 @@ In order to install or upgrade Postfix:
     # make install              (interactive version, first time install)
     # make install </dev/null   (non-interactive version, for upgrades)
 
+  The non-interactive version needs the /etc/postfix/install.cf
+  file from a previous installation. If the file does not exist,
+  use interactive installation instead.
+
   The INSTALL.sh script offers suggestions for pathnames that you
   can override, either by editing INSTALL.sh or by specifying your
   preferences interactively. INSTALL.sh stores your preferences in
index 1ad76e988fb9c234c512ca38ff2e7eb65a47f949..88a60495d9b0d170532d70ef15c82f7599dabcac 100644 (file)
@@ -166,7 +166,15 @@ test -f $CONFIG_DIRECTORY/main.cf && {
     done
 }
 
-test -f $CONFIG_DIRECTORY/install.cf && . $CONFIG_DIRECTORY/install.cf
+test -f $CONFIG_DIRECTORY/install.cf && . $CONFIG_DIRECTORY/install.cf || {
+    test -t 0 || {
+       echo Non-interactive install needs the $CONFIG_DIRECTORY/install.cf 1>&2
+       echo file from a previous Postfix installation. 1>&2
+       echo 1>&2
+       echo Use interactive installation instead. 1>&2
+       exit 1
+    }
+}
 
 # Override default settings.
 
index fb75a55a289fa15194436a41ad301e1d3d9ff83b..03406031852d1d46955fd7b5bac2b33c1b6fa58e 100644 (file)
@@ -374,6 +374,8 @@ mail_owner = postfix
 # localpart), $recipient_delimiter. Specify ${name?value} or
 # ${name:value} to expand value only when $name does (does not) exist.
 #
+# luser_relay works only for the default Postfix local delivery agent.
+#
 # luser_relay = $user@other.host
 # luser_relay = $local@other.host
 # luser_relay = admin+$local
index e00d7c6834977b459a9a35e0d79b10223a68e326..7f3f3038ab8232a8912582b633f31be64397ee00 100644 (file)
@@ -37,6 +37,7 @@
 # Max procs: the maximum number of processes that may execute this
 # service simultaneously. Default is to use a globally configurable
 # limit (the default_process_limit configuration parameter in main.cf).
+# Specify 0 for no process count limit.
 #
 # Command + args: the command to be executed. The command name is
 # relative to the Postfix program directory (pathname is controlled by
index 285ac244816d298fa2631f1c06f10b623da460eb..eab49fd8776ecda6309204a9109f75c9c398062d 100644 (file)
@@ -125,6 +125,8 @@ home_mailbox =
 # localpart), $recipient_delimiter. Specify ${name?value} or
 # ${name:value} to expand value only when $name does (does not) exist.
 #
+# luser_relay works only for the default Postfix local delivery agent.
+#
 # luser_relay = $user@other.host
 # luser_relay = $local@other.host
 # luser_relay = admin+$local
index 6c0b216b042b45157a399e67b0738f4c5453fa80..892e997fe3e71a15ea5f35f03e25559a87876b55 100644 (file)
@@ -90,6 +90,10 @@ virtual domains fails with "mail loops back to myself"</a>
 
 <li><a href="#virtual_relay">Postfix refuses mail for virtual
 domains with "relay access denied"</a>
+
+<li><a href="#broken_transport">Mail delivery fails with: "unknown
+mail transport error"</a>
+
 </ul>
 
 <p>
@@ -205,6 +209,9 @@ domains with "relay access denied"</a>
 
 <li><a href="#noservice">What does "fatal: unknown service: smtp/tcp" mean?</a>
 
+<li><a href="#broken_transport">Mail delivery fails with: "unknown
+mail transport error"</a>
+
 </ul>
 
 <a name="local_delivery"><h3>Local (non-virtual) delivery</h3>
@@ -237,6 +244,9 @@ distribution list</a>
 
 <li><a href="#noalias">What does "fatal: open database /etc/aliases.db" mean?</a>
 
+<li><a href="#broken_transport">Mail delivery fails with: "unknown
+mail transport error"</a>
+
 </ul>
 
 <a name="mailing_lists"><h3>Mailing lists</h3>
@@ -946,14 +956,74 @@ delivery agent deals with undeliverable mail.
 
 <a name="noalias"><h3>What does "fatal: open database /etc/aliases.db" mean?</h3></a>
 
-Your aliases database is corrupt or it is missing. Execute the 
-following command as root:
+DB files are maintained by the Berkeley DB library. The above
+message means one of the following things:
+
+<p>
+
+<ul>
+
+<li> The existing file does not have the expected file format.
+The cause is one of the following:
+
+<p>
+
+<ul>
+
+<li>The file was created by Berkeley DB version 1 and you are using
+version 2 or 3 (or vice versa).
 
 <p>
 
+<li> The file was written in "btree" format and Postfix expects
+    "hash" format (or vice versa).
+
+</ul>
+
+<p>
+
+To fix the problem for Postfix execute the following command as root:
+
+<blockquote>
 <pre>
-    newaliases
+    newaliases
 </pre>
+</blockquote>
+
+This creates the aliases.db in the format that Postfix expects.
+
+<p>
+
+<li>Or the problem could be something completely different. If the
+result of running <tt>newaliases</tt> is a zero-length aliases.db
+file, then you probably suffer from the following problem.
+
+<p>
+
+<ul>
+
+<li>Postfix was compiled with #include files for Berkeley DB version
+<i>X</i> and was linked against object library files for Berkeley DB
+version <i>Y</i>, where <i>X</i> and <i>Y</i> are different versions
+of the Berkeley DB library.
+
+</ul>
+
+<p>
+
+The fix for this is to properly install the Berkeley DB library.
+For example, RedHat version 7.0 uses the Berkeley DB version 3
+object library by default, but no /usr/include/db.h file is
+installed by default. In order to correctly build Postfix you
+must install the db3-devel package.
+
+<p>
+
+On a properly installed system, including the file <b>&lt;db.h&gt;</b>
+and linking with <b>-ldb</b> should access files from the same
+Berkeley DB library version.
+
+</ul>
 
 <hr>
 
@@ -1881,6 +1951,35 @@ Instructions are given in the source code distribution, in the
 <b>examples/chroot-setup</b> directory.
 
 </ul>
+
+<hr>
+
+<a name="broken_transport"><h3>Mail delivery fails with: "unknown
+mail transport error"</h3>
+
+This is an opportunity to meet your friends <b>egrep</b> and
+<b>less</b>.  Postfix activity, including progres and failure, is
+logged to a logfile, typically named <b>/var/log/maillog</b>.  To
+find out where Postfix activity is logged on your machine, examine
+the <b>/etc/syslog.conf</b> file.
+
+<p> 
+
+To find out the cause for the "unknown mail transport error", type
+the following command:
+
+<blockquote>
+
+<tt>egrep '(warning|fatal|panic):' /var/log/maillog | less</tt> 
+
+</blockquote>
+
+Pay particular attention to messages that are labeled as <b>fatal</b>
+and <b>panic</b>. These describe catastrophic failures that need
+to be addressed before Postfix is happy.  Problems labeled as
+<b>fatal</b> as fixed by adjusting configurations. Problems labeled
+as <b>panic</b> are fixed by changing Postfix source code.
+
 <hr>
 
 <a name="root"> <h3>Root's mail is delivered to nobody</h3>
index 2f110f03fdb0eb7f4b95c5b70d0575d52a183dfe..9623d0410bc37e7f50d82c5123f8e5e859471285 100644 (file)
@@ -175,6 +175,15 @@ case "$SYSTEM.$RELEASE" in
                    echo "See the RELEASE_NOTES file for more information." 1>&2
                    exit 1
                fi
+               # See where GDBM's ndbm.h include file sits. XXX verify that
+               # gdbm links in by default (i.e. NO -lgdbm is needed).
+               if [ -f /usr/include/gdbm-ndbm.h ]
+               then
+                   CCARGS="$CCARGS -DHAS_DBM -DPATH_NDBM_H=\\\"<gdbm-ndbm.h>\\\""
+               elif [ -f /usr/include/gdbm/ndbm.h ]
+               then
+                   CCARGS="$CCARGS -DHAS_DBM -DPATH_NDBM_H=\\\"<gdbm/ndbm.h>\\\""
+               fi
                SYSLIBS="-ldb"
                for name in nsl resolv
                do
index 00d9089389f00d020bccc7b7f2cc4676ff0bcead..0c82392ce3d260dd1a0c65b18095b605efceb439 100644 (file)
@@ -15,7 +15,7 @@
   * Version of this program.
   */
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "Snapshot-20010414"
+#define DEF_MAIL_VERSION       "Snapshot-20010426"
 extern char *var_mail_version;
 
 /* LICENSE
index 69e0b4e7991a246a95c0fdb7e832c36cc280f21f..2fc36e91d89d53de1ac01fee4da73a5794beb844 100644 (file)
@@ -135,7 +135,8 @@ int     deliver_alias(LOCAL_STATE state, USER_ATTR usr_attr,
     struct mypasswd *alias_pwd;
     VSTRING *canon_owner;
     DICT   *dict;
-    const char *owner_rhs;                     /* owner alias, RHS */
+    const char *owner_rhs;             /* owner alias, RHS */
+    int     alias_count;
 
     /*
      * Make verbose logging easier to understand.
@@ -171,7 +172,7 @@ int     deliver_alias(LOCAL_STATE state, USER_ATTR usr_attr,
     if (state.level > 100) {
        msg_warn("possible alias database loop for %s", name);
        *statusp = bounce_append(BOUNCE_FLAG_KEEP, BOUNCE_ATTR(state.msg_attr),
-              "possible alias database loop for %s", name);
+                              "possible alias database loop for %s", name);
        return (YES);
     }
     state.msg_attr.exp_from = name;
@@ -271,11 +272,17 @@ int     deliver_alias(LOCAL_STATE state, USER_ATTR usr_attr,
            /*
             * Deliver.
             */
+           alias_count = 0;
            *statusp =
                (dict_errno ?
                 defer_append(BOUNCE_FLAG_KEEP, BOUNCE_ATTR(state.msg_attr),
                              "alias database unavailable") :
-              deliver_token_string(state, usr_attr, expansion, (int *) 0));
+           deliver_token_string(state, usr_attr, expansion, &alias_count));
+#if 0
+           if (state.msg_attr.owner == 0 && alias_count > 10)
+               msg_warn("mailing list \"%s\" needs an \"owner-%s\" alias",
+                        name, name);
+#endif
            myfree(expansion);
            if (owner)
                myfree(owner);
index c7dead391fb93e6c1133846fecdc8ac42c4cf2d0..4299424f1cec6717ec756389520f68f372931036 100644 (file)
@@ -5,7 +5,8 @@
 /*     Postfix master process
 /* SYNOPSIS
 /* .fi
-/*     \fBmaster\fR [\fB-c \fIconfig_dir\fR] [\fB-D\fR] [\fB-t\fR] [\fB-v\fR]
+/*     \fBmaster\fR [\fB-c \fIconfig_dir\fR] [\fB-e \fIexit_time\fR]
+/*             [\fB-D\fR] [\fB-t\fR] [\fB-v\fR]
 /* DESCRIPTION
 /*     The \fBmaster\fR daemon is the resident process that runs Postfix
 /*     daemons on demand: daemons to send or receive messages via the
@@ -28,6 +29,9 @@
 /* .IP "\fB-c \fIconfig_dir\fR"
 /*     Read the \fBmain.cf\fR and \fBmaster.cf\fR configuration files in
 /*     the named directory instead of the default configuration directory.
+/* .IP "\fB-e \fIexit_time\fR"
+/*     Terminate the master process after \fIexit_time\fR seconds. Child
+/*     processes terminate at their convenience.
 /* .IP \fB-D\fR
 /*     After initialization, run a debugger on the master process. The
 /*     debugging command is specified with the \fBdebugger_command\fR in
 
 #include "master.h"
 
+/* master_exit_event - exit for memory leak testing purposes */
+
+static void master_exit_event(int unused_event, char *unused_context)
+{
+    msg_info("master exit time has arrived");
+    exit(0);
+}
+
+/* main - main program */
+
 int     main(int argc, char **argv)
 {
     static VSTREAM *lock_fp;
@@ -251,12 +265,15 @@ int     main(int argc, char **argv)
     /*
      * Process JCL.
      */
-    while ((ch = GETOPT(argc, argv, "c:Dtv")) > 0) {
+    while ((ch = GETOPT(argc, argv, "c:e:Dtv")) > 0) {
        switch (ch) {
        case 'c':
            if (setenv(CONF_ENV_PATH, optarg, 1) < 0)
                msg_fatal("out of memory");
            break;
+       case 'e':
+           event_request_timer(master_exit_event, (char *) 0, atoi(optarg));
+           break;
        case 'D':
            debug_me = 1;
            break;
@@ -267,7 +284,7 @@ int     main(int argc, char **argv)
            msg_verbose++;
            break;
        default:
-           msg_fatal("usage: %s [-D] [-t] [-v]", argv[0]);
+           msg_fatal("usage: %s [-c config_dir] [-e exit_time] [-D (debug)] [-t (test)] [-v]", argv[0]);
            /* NOTREACHED */
        }
     }
@@ -282,8 +299,7 @@ int     main(int argc, char **argv)
 
     /*
      * Environment import filter, to enforce consistent behavior whether
-     * Postfix is started by hand, or at system boot time. The argument list
-     * specifies what environment parameters to preserve.
+     * Postfix is started by hand, or at system boot time.
      */
     import_env = argv_split(var_import_environ, ", \t\r\n");
     clean_env(import_env->argv);
index fd05bc2b6e39a95fd00b8565b8be58621aa74c12..6a6e976f3d77b9847f7115655712bd6b2482cb20 100644 (file)
@@ -277,9 +277,9 @@ MASTER_SERV *get_master_ent()
        serv->type = MASTER_SERV_TYPE_INET;
        atmp = inet_parse(name, &host, &port);
        if (host && *host) {
-           serv->flags |= MASTER_FLAG_INETHOST;
+           serv->flags |= MASTER_FLAG_INETHOST;/* host:port */
            serv->addr_list.inet =
-               (INET_ADDR_LIST *) mymalloc(sizeof(*serv->addr_list_buf.inet));
+               (INET_ADDR_LIST *) mymalloc(sizeof(*serv->addr_list.inet));
            inet_addr_list_init(serv->addr_list.inet);
            inet_addr_host(serv->addr_list.inet, host);
            serv->listen_fd_count = serv->addr_list.inet->used;
index 6822cd1a47a68a3cda29c1932c5dfa7cdf5b8cc8..5dc4b13d800dad0ec89ae3d970ea58dc673e42a6 100644 (file)
@@ -523,6 +523,7 @@ static char *extract_addr(SMTPD_STATE *state, SMTPD_TOKEN *arg,
     int     naddr;
     int     non_addr;
     char   *err = 0;
+    char   *junk;
 
     /*
      * Special case.
@@ -544,7 +545,13 @@ static char *extract_addr(SMTPD_STATE *state, SMTPD_TOKEN *arg,
      */
     if (msg_verbose)
        msg_info("%s: input: %s", myname, STR(arg->vstrval));
-    tree = tok822_parse(STR(arg->vstrval));
+    if (STR(arg->vstrval)[0] == '<'
+       && STR(arg->vstrval)[LEN(arg->vstrval) - 1] == '>') {
+       junk = mystrndup(STR(arg->vstrval) + 1, LEN(arg->vstrval) - 2);
+       tree = tok822_parse(junk);
+       myfree(junk);
+    } else
+       tree = tok822_parse(STR(arg->vstrval));
 
     /*
      * Find trouble.