mirror of
https://github.com/vdukhovni/postfix
synced 2025-08-30 21:55:20 +00:00
snapshot-20011007
This commit is contained in:
committed by
Viktor Dukhovni
parent
6654683f18
commit
3d5513e695
@@ -240,6 +240,10 @@ mail_owner = postfix
|
||||
#
|
||||
#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
|
||||
|
@@ -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
|
||||
|
@@ -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);
|
||||
}
|
||||
|
@@ -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
|
||||
|
@@ -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]);
|
||||
}
|
||||
|
@@ -146,7 +146,7 @@
|
||||
/* 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);
|
||||
}
|
||||
|
@@ -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.
|
||||
@@ -18,17 +18,29 @@
|
||||
/* 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;
|
||||
|
@@ -15,43 +15,48 @@
|
||||
/* 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
|
||||
|
Reference in New Issue
Block a user