]> git.ipfire.org Git - thirdparty/postfix.git/commitdiff
snapshot-20011007
authorWietse Venema <wietse@porcupine.org>
Sun, 7 Oct 2001 05:00:00 +0000 (00:00 -0500)
committerViktor Dukhovni <viktor@dukhovni.org>
Tue, 5 Feb 2013 06:27:27 +0000 (06:27 +0000)
postfix/conf/main.cf
postfix/src/global/flush_clnt.c
postfix/src/global/mail_addr_map.c
postfix/src/global/mail_version.h
postfix/src/sendmail/sendmail.c
postfix/src/smtpd/smtpd_check.c
postfix/src/smtpstone/smtp-sink.c
postfix/src/smtpstone/smtp-source.c

index a517fc830c635f7b29506194604fcbd53a7bf31e..752db3c00a86f7bb3e3cb079eaaa6749ef884282 100644 (file)
@@ -237,9 +237,13 @@ mail_owner = postfix
 # Beware: if the Postfix SMTP server runs chrooted, you may have to
 # copy the passwd (not shadow) database into the jail. This is
 # system dependent.
-#
+# 
 #local_recipient_maps = $alias_maps unix:passwd.byname
 
+# If you use both the Postfix local and virtual delivery agents, specify:
+#
+#local_recipient_maps = $alias_maps unix:passwd.byname $virtual_mailbox_maps
+
 # INPUT RATE CONTROL
 #
 # The in_flow_delay configuration parameter implements mail input
index b8f92dd69e89ac586a38c010a51e5957446674e2..09e92fe8cb7de8368c3a9698fea66142388df8f2 100644 (file)
@@ -47,7 +47,8 @@
 /*     The "fast flush" server rejected the request (invalid request
 /*     parameter).
 /* .IP MAIL_FLUSH_DENY
-/*     The specified domain is not eligible for "fast flush" service.
+/*     The specified domain is not eligible for "fast flush" service,
+/*     or the "fast flush" service is disabled.
 /* SEE ALSO
 /*     flush(8) Postfix fast flush cache manager
 /* LICENSE
index 258ea8740c3c15ca64970038124c3951f9bd6809..6496ac99c59c9987409adeb268d547adcb26c5c3 100644 (file)
@@ -161,6 +161,8 @@ int     main(int argc, char **argv)
     /*
      * Initialize.
      */
+#define UPDATE(dst, src) { myfree(dst); dst = mystrdup(src); }
+
     mail_conf_read();
     msg_verbose = 1;
     if (chdir(var_queue_dir) < 0)
@@ -168,14 +170,14 @@ int     main(int argc, char **argv)
     path = maps_create(argv[0], argv[1], DICT_FLAG_LOCK);
     while (vstring_fgets_nonl(buffer, VSTREAM_IN)) {
        msg_info("=== Address extension on, extension propagation on ===");
-       var_rcpt_delim = "+";
+       UPDATE(var_rcpt_delim, "+");
        if ((result = mail_addr_map(path, STR(buffer), 1)) != 0)
            argv_free(result);
        msg_info("=== Address extension on, extension propagation off ===");
        if ((result = mail_addr_map(path, STR(buffer), 0)) != 0)
            argv_free(result);
        msg_info("=== Address extension off ===");
-       var_rcpt_delim = "";
+       UPDATE(var_rcpt_delim, "");
        if ((result = mail_addr_map(path, STR(buffer), 1)) != 0)
            argv_free(result);
     }
index 6ecf22dbea8afa78752ab41ccc5eb96bdaf8c8be..93a957b2ad56b9eefad65269f6e131d272966243 100644 (file)
@@ -15,7 +15,7 @@
   * Version of this program.
   */
 #define VAR_MAIL_VERSION       "mail_version"
-#define DEF_MAIL_VERSION       "Snapshot-20011006"
+#define DEF_MAIL_VERSION       "Snapshot-20011007"
 extern char *var_mail_version;
 
 /* LICENSE
index 8de3e4c5001d73e74c24219f470cfd4d23bda40d..1c7984f4054e9040deb145d8b941458ab5d9f7b9 100644 (file)
@@ -921,6 +921,8 @@ int     main(int argc, char **argv)
                }
            } else if (optarg[0] == 'R') {
                site_to_flush = optarg + 1;
+               if (*site_to_flush == 0)
+                   msg_fatal("specify: -qRsitename");
            } else {
                msg_fatal("-q%c is not implemented", optarg[0]);
            }
index 15d0e10e6ed33582b19eddef7ca3580d646023db..a781fd320dec0444be2ede98d6bae73f503d4cd5 100644 (file)
 /*     without being told that the server implements SMTP command pipelining.
 /* .IP permit_mx_backup
 /*     Allow the request when all primary MX hosts for the recipient
-/*     are in the networks specified with the $auth_mx_backup_networks
+/*     are in the networks specified with the $permit_mx_backup_networks
 /*     configuration parameter, or when the local system is the final
 /*     destination.
 /* .IP restriction_classes
@@ -1022,7 +1022,7 @@ static int reject_unauth_pipelining(SMTPD_STATE *state)
     return (SMTPD_CHECK_DUNNO);
 }
 
-/* all_auth_mx_addr - match host addresses against auth_mx_backup_networks */
+/* all_auth_mx_addr - match host addresses against permit_mx_backup_networks */
 
 static int all_auth_mx_addr(char *host)
 {
@@ -1043,7 +1043,7 @@ static int all_auth_mx_addr(char *host)
 #define TRYAGAIN       2
 
     /*
-     * Verify that all host addresses are within auth_mx_backup_networks.
+     * Verify that all host addresses are within permit_mx_backup_networks.
      */
     dns_status = dns_lookup(host, T_A, 0, &addr_list, (VSTRING *) 0, (VSTRING *) 0);
     if (dns_status != DNS_OK)
@@ -1051,7 +1051,8 @@ static int all_auth_mx_addr(char *host)
 
     for (rr = addr_list; rr != 0; rr = rr->next) {
        if (rr->data_len > sizeof(addr)) {
-           msg_warn("skipping address length %d", rr->data_len);
+           msg_warn("skipping address length %d for host %s",
+                    rr->data_len, host);
            continue;
        }
        memcpy((char *) &addr, rr->data, sizeof(addr));
@@ -1062,11 +1063,11 @@ static int all_auth_mx_addr(char *host)
 
            /*
             * Reject: at least one IP address is not listed in
-            * auth_mx_backup_networks.
+            * permit_mx_backup_networks.
             */
            if (msg_verbose)
-               msg_info("%s: address %s does not match %s",
-                        myname, inet_ntoa(addr), VAR_PERM_MX_NETWORKS);
+               msg_info("%s: address %s for %s does not match %s",
+                      myname, inet_ntoa(addr), host, VAR_PERM_MX_NETWORKS);
            dns_rr_free(addr_list);
            return (NOPE);
        }
@@ -1183,7 +1184,7 @@ static int permit_mx_primary(DNS_RR *mx_list)
 
     /*
      * All IP addresses of the best MX hosts are within
-     * auth_mx_backup_networks.
+     * permit_mx_backup_networks.
      */
     return (YUP);
 }
index 67c9d9f12fa35d135dcfbe02328fc95fdec44d5a..f94594cda3a43a480dd97e81f5295e5d2578e911 100644 (file)
@@ -5,10 +5,10 @@
 /*     multi-threaded SMTP/LMTP test server
 /* SYNOPSIS
 /* .fi
-/*     \fBsmtp-sink\fR [\fB-cLpv\fR] [\fB-w \fIdelay\fR]
+/*     \fBsmtp-sink\fR [\fB-cLpv\fR] [\fB-n \fIcount\fR] [\fB-w \fIdelay\fR]
 /*     [\fBinet:\fR][\fIhost\fR]:\fIport\fR \fIbacklog\fR
 /*
-/*     \fBsmtp-sink\fR [\fB-cLpv\fR] [\fB-w \fIdelay\fR]
+/*     \fBsmtp-sink\fR [\fB-cLpv\fR] [\fB-n \fIcount\fR] [\fB-w \fIdelay\fR]
 /*     \fBunix:\fR\fIpathname\fR \fIbacklog\fR
 /* DESCRIPTION
 /*     \fIsmtp-sink\fR listens on the named host (or address) and port.
 /*     Connections can be accepted on IPV4 endpoints or UNIX-domain sockets.
 /*     IPV4 is the default.
 /*     This program is the complement of the \fIsmtp-source\fR program.
-/* .IP -c
+/*
+/*     Arguments:
+/* .IP \fB-c\fR
 /*     Display a running counter that is updated whenever an SMTP
 /*     QUIT command is executed.
-/* .IP -L
+/* .IP \fB-L\fR
 /*     Speak LMTP rather than SMTP.
-/* .IP -p
+/* .IP "\fB-n \fIcount\fR"
+/*     Terminate after \fIcount\fR sessions. This is for memory leak
+/*     testing purposes.
+/* .IP \fB-p\fR
 /*     Disable ESMTP command pipelining.
-/* .IP -v
+/* .IP \fB-v\fR
 /*     Show the SMTP conversations.
-/* .IP "-w delay"
+/* .IP "\fB-w \fIdelay\fR"
 /*     Wait \fIdelay\fR seconds before responding to a DATA command.
+/* .IP [\fBinet:\fR][\fIhost\fR]:\fIport\fR
+/*     Listen on network interface \fIhost\fR (default: any interface)
+/*     TCP port \fIport\fR.
+/* .IP \fBunix:\fR\fIpathname\fR
+/*     Listen on the UNIX-domain socket at \fIpathname\fR.
+/* .IP \fIbacklog\fR
+/*     The maximum length the queue of pending connections.
 /* SEE ALSO
 /*     smtp-source, SMTP/LMTP test message generator
 /* LICENSE
@@ -98,6 +110,7 @@ static int data_read(SINK_STATE *);
 static void disconnect(SINK_STATE *);
 static int count;
 static int counter;
+static int max_count;
 static int disable_pipelining;
 static int fixed_delay;
 static int enable_lmtp;
@@ -396,6 +409,8 @@ static void disconnect(SINK_STATE *state)
     vstream_fclose(state->stream);
     vstring_free(state->buffer);
     myfree((char *) state);
+    if (counter >= max_count)
+       exit(0);
 }
 
 /* connect_event - handle connection events */
@@ -437,7 +452,7 @@ static void connect_event(int unused_event, char *context)
 
 static void usage(char *myname)
 {
-    msg_fatal("usage: %s [-cLpv] [host]:port backlog", myname);
+    msg_fatal("usage: %s [-cLpv] [-n count] [-w delay] [host]:port backlog", myname);
 }
 
 int     main(int argc, char **argv)
@@ -454,7 +469,7 @@ int     main(int argc, char **argv)
     /*
      * Parse JCL.
      */
-    while ((ch = GETOPT(argc, argv, "cLpvw:")) > 0) {
+    while ((ch = GETOPT(argc, argv, "cLn:pvw:")) > 0) {
        switch (ch) {
        case 'c':
            count++;
@@ -462,6 +477,9 @@ int     main(int argc, char **argv)
        case 'L':
            enable_lmtp = 1;
            break;
+       case 'n':
+           max_count = atoi(optarg);
+           break;
        case 'p':
            disable_pipelining = 1;
            break;
index be0dff0faa751df44237342d604e6535987d51d0..c12b0f4304c5a92f3c8616c603c2e4a972b20b03 100644 (file)
 /*     LMTP. Connections can be made to UNIX-domain and IPV4 servers.
 /*     IPV4 is the default.
 /*
-/*     Options:
-/* .IP -c
+/*     Arguments:
+/* .IP \fB-c\fR
 /*     Display a running counter that is incremented each time
 /*     an SMTP DATA command completes.
-/* .IP "-C count"
+/* .IP "\fB-C \fIcount\fR"
 /*     When a host sends RESET instead of SYN|ACK, try \fIcount\fR times
 /*     before giving up. The default count is 1. Specify a larger count in
 /*     order to work around a problem with TCP/IP stacks that send RESET
 /*     when the listen queue is full.
-/* .IP -d
+/* .IP \fB-d\fR
 /*     Don't disconnect after sending a message; send the next
 /*     message over the same connection.
-/* .IP "-f from"
+/* .IP "\fB-f \fIfrom\fR"
 /*     Use the specified sender address (default: <foo@myhostname>).
-/* .IP -o
+/* .IP \fB-o\fR
 /*     Old mode: don't send HELO, and don't send message headers.
-/* .IP "-l length"
+/* .IP "\fB-l \fIlength\fR"
 /*     Send \fIlength\fR bytes as message payload. The length does not
 /*     include message headers.
-/* .IP -L
+/* .IP \fB-L\fR
 /*     Speak LMTP rather than SMTP.
-/* .IP "-m message_count"
+/* .IP "\fB-m \fImessage_count\fR"
 /*     Send the specified number of messages (default: 1).
-/* .IP "-r recipient_count"
+/* .IP "\fB-r \fIrecipient_count\fR"
 /*     Send the specified number of recipients per transaction (default: 1).
 /*     Recipient names are generated by prepending a number to the
 /*     recipient address.
-/* .IP "-s session_count"
+/* .IP "\fB-s \fIsession_count\fR"
 /*     Run the specified number of SMTP sessions in parallel (default: 1).
-/* .IP "-t to"
+/* .IP "\fB-t \fIto\fR"
 /*     Use the specified recipient address (default: <foo@myhostname>).
-/* .IP "-R interval"
+/* .IP "\fB-R \fIinterval\fR"
 /*     Wait for a random period of time 0 <= n <= interval between messages.
 /*     Suspending one thread does not affect other delivery threads.
-/* .IP "-w interval"
+/* .IP "\fB-w \fIinterval\fR"
 /*     Wait a fixed time between messages.
 /*     Suspending one thread does not affect other delivery threads.
+/* .IP [\fBinet:\fR]\fIhost\fR[:\fIport\fR]
+/*     Connect via TCP to \fIhost\fR port \fIport\fR. The default
+/*     port is \fBsmtp\fR.
+/* .IP \fBunix:\fIpathname\fR
+/*     Connect to the UNIX-domain socket at \fIpathname\fR.
 /* BUGS
 /*     No SMTP command pipelining support.
 /* LICENSE