2
0
mirror of https://github.com/vdukhovni/postfix synced 2025-08-30 05:38:06 +00:00

snapshot-19991207

This commit is contained in:
Wietse Venema 1999-12-07 00:00:00 -05:00
parent f0b626fd99
commit 5b4600231a
13 changed files with 79 additions and 47 deletions

View File

@ -3307,5 +3307,25 @@ Apologies for any names omitted.
19991126
Bugfix: TXT records now have string lengths before text
Bugfix: DNS TXT records now have string lengths before text
(Mark Martinec @ nsc.ijs.si).
19991127
Update: the LDAP client code now supports escapes as per
RFC2254 (John Hensley).
19991207
Performance: the queue manager now frees in-memory recipients
as soon as a message is delivered to one destination, rather
than waiting until all in-memory recipients of that message
have been tried. This means that one message with many
recipients no longer stops other mail from being delivered.
Patch by Patrik Rak @ ein.cz. Files: qmgr/qmgr_entry.c,
qmgr/qmgr_message.c.
Performance: when delivering a huge list of recipients,
the queue manager now reads new recipients from queue file
before delivery concurrency starts dropping. Files:
qmgr/qmgr_entry.c, qmgr/qmgr_message.c.

View File

@ -66,6 +66,8 @@ If your system is supported, it is one of
Linux RedHat 5.x
Linux RedHat 6.x
Linux Slackware 3.5
Linux Slackware 4.0
Linux Slackware 7.0
Linux SuSE 5.x
Linux SuSE 6.x
Mac OS X server

View File

@ -1,4 +1,4 @@
Incompatible changes with snapshot 19991123
Incompatible changes with snapshot 19991127
===========================================
- In an SMTPD access map, an all-numeric right-hand side now means
@ -18,7 +18,7 @@ $mydestination domains matches a transport specification, you also
need to add a "domain.name local:" entry in your transport_maps.
See the html/faq.html sections for firewalls and intranets.
Major changes with snapshot 19991123
Major changes with snapshot 19991127
====================================
- It is now relatively safe to configure 550 status codes for the

View File

@ -108,8 +108,8 @@ mail_owner = postfix
# a name matches a lookup key. Continue long lines by starting the
# next line with whitespace.
#
# DO NOT LIST VIRTUAL DOMAINS HERE. INSTEAD LIST $VIRTUAL_MAPS AS AN
# AUTHORIZED DESTINATION IN RELAY_DOMAINS.
# DO NOT LIST VIRTUAL DOMAINS HERE. LIST THEM IN THE VIRTUAL FILE
# INSTEAD. BE SURE TO READ THE ENTIRE VIRTUAL MANUAL PAGE.
#
#mydestination = $myhostname, localhost.$mydomain
#mydestination = $myhostname, localhost.$mydomain $mydomain

View File

@ -180,8 +180,8 @@ smtpd_sender_restrictions =
# recipient addresses that SMTP clients can send in RCPT TO commands.
#
# The default is to permit any destination from clients that match
# $mynetworks, and to otherwise permit only mail from or to domains
# listed in $relay_domains.
# $mynetworks, and to otherwise permit only mail from clients or to
# domains that match $relay_domains or a subdomain thereof.
#
# The following restrictions are available:
#

View File

@ -15,7 +15,7 @@
* Version of this program.
*/
#define VAR_MAIL_VERSION "mail_version"
#define DEF_MAIL_VERSION "Snapshot-19991123"
#define DEF_MAIL_VERSION "Snapshot-19991207"
extern char *var_mail_version;
/* LICENSE

View File

@ -186,8 +186,9 @@ href="transport.5.html">transport</a> table lookups.
<p>
Do not omit the entry that routes mail for the local machine to
the local delivery agent.
Do not omit the entry that routes mail for <i>thishost.my.domain</i>
to the local delivery agent, or else mail for the local machine will
go into a loop.
<p>
@ -257,12 +258,6 @@ configuration change.
</ul>
<p>
Unfortunately, the solution cannot use the transport table, because
that table is ignored for destinations that match <b>$mydestination</b>.
That's an implementation error, and it will be removed.
<hr>
<a name="dialup"><h2>Running Postfix on a dialup machine</h2></a>

View File

@ -537,8 +537,9 @@ reject_unauth_destination</b>
<dt> <b>check_relay_domains</b> <dd> Permit the request when the
client hostname matches <a href="#relay_domains">$relay_domains</a>,
or when the resolved destination address matches the the local
machine or <a href="#relay_domains"> $relay_domains</a>, otherwise
or when the resolved destination address matches <a
href="basic.html#mydestination">$mydestination</a>, the machine IP
addresses, or <a href="#relay_domains"> $relay_domains</a>, otherwise
reject the request. The <b>relay_domains_reject_code</b> parameter
specifies the response code for rejected requests (default:
<b>554</b>).
@ -549,7 +550,8 @@ specifies the response code for rejected requests (default:
<dt> <b>permit_auth_destination</b> <dd> Ignore the client hostname.
Permit the request when the resolved destination address matches
the local machine or <a href="#relay_domains"> $relay_domains</a>.
the <a href="basic.html#mydestination">$mydestination</a>, the
machine IP addresses, or <a href="#relay_domains"> $relay_domains</a>.
<p>
@ -557,10 +559,10 @@ the local machine or <a href="#relay_domains"> $relay_domains</a>.
<dt> <b>reject_unauth_destination</b> <dd> Ignore the client
hostname. Reject the request when the resolved destination address
does not match the local machine or <a href="#relay_domains">
$relay_domains</a>. The <b>relay_domains_reject_code</b> parameter
specifies the response code for rejected requests (default:
<b>554</b>).
does not match <a href="basic.html#mydestination">$mydestination</a>,
the machine IP addresses, or <a href="#relay_domains"> $relay_domains</a>.
The <b>relay_domains_reject_code</b> parameter specifies the response
code for rejected requests (default: <b>554</b>).
<p>

View File

@ -19,7 +19,7 @@
/* of messages that the queue manager is actually working on.
/* The active queue is limited in size. Messages are drained
/* from the active queue by allocating a delivery process and
/* by delivering mail via that process. Message leak into the
/* by delivering mail via that process. Messages leak into the
/* active queue only when the active queue is small enough.
/* Damaged message files are saved to the "corrupt" directory.
/*

View File

@ -135,6 +135,14 @@ void qmgr_entry_done(QMGR_ENTRY *entry, int which)
} else {
msg_panic("qmgr_entry_done: bad queue spec: %d", which);
}
/*
* Free the recipient list and decrease in-core recipient count
* accordingly.
*/
qmgr_recipient_count -= entry->rcpt_list.len;
qmgr_rcpt_list_free(&entry->rcpt_list);
myfree((char *) entry);
/*
@ -152,11 +160,17 @@ void qmgr_entry_done(QMGR_ENTRY *entry, int which)
/*
* Update the in-core message reference count. When the in-core message
* structure has no more references, dispose of the message.
* structure has no more references, dispose of the message. When the
* in-core recipient count falls below some threshold and this message
* has more recipients, read them from disk before concurrency starts to
* drop.
*/
message->refcount--;
if (message->refcount == 0)
qmgr_active_done(message);
else if (message->rcpt_offset > 0
&& qmgr_recipient_count < var_qmgr_rcpt_limit / 2)
qmgr_message_realloc(message);
}
/* qmgr_entry_create - create queue todo entry */
@ -174,8 +188,7 @@ QMGR_ENTRY *qmgr_entry_create(QMGR_QUEUE *queue, QMGR_MESSAGE *message)
entry = (QMGR_ENTRY *) mymalloc(sizeof(QMGR_ENTRY));
entry->stream = 0;
entry->message = message;
entry->rcpt_list.len = 0;
entry->rcpt_list.info = 0;
qmgr_rcpt_list_init(&entry->rcpt_list);
message->refcount++;
entry->queue = queue;
QMGR_LIST_APPEND(queue->todo, entry);

View File

@ -194,6 +194,7 @@ static int qmgr_message_read(QMGR_MESSAGE *message)
long extra_offset;
int rec_type;
long curr_offset;
long save_offset = message->rcpt_offset; /* save a flag */
char *start;
struct stat st;
@ -207,12 +208,11 @@ static int qmgr_message_read(QMGR_MESSAGE *message)
* already looked at, and reset the in-core recipient address list.
*/
if (message->rcpt_offset) {
if (message->rcpt_list.len)
msg_panic("%s: recipient list not empty on recipient reload", message->queue_id);
if (vstream_fseek(message->fp, message->rcpt_offset, SEEK_SET) < 0)
msg_fatal("seek file %s: %m", VSTREAM_PATH(message->fp));
message->rcpt_offset = 0;
qmgr_recipient_count -= message->rcpt_list.len;
qmgr_rcpt_list_free(&message->rcpt_list);
qmgr_rcpt_list_init(&message->rcpt_list);
}
/*
@ -282,8 +282,6 @@ static int qmgr_message_read(QMGR_MESSAGE *message)
}
} while (rec_type > 0 && rec_type != REC_TYPE_END);
qmgr_recipient_count += message->rcpt_list.len;
/*
* If there is no size record, use the queue file size instead.
*/
@ -319,6 +317,7 @@ static int qmgr_message_read(QMGR_MESSAGE *message)
msg_warn("%s: envelope records out of order", message->queue_id);
return (-1);
} else {
message->rcpt_offset = save_offset; /* restore flag */
return (0);
}
}
@ -620,10 +619,11 @@ static void qmgr_message_assign(QMGR_MESSAGE *message)
/*
* Try to bundle as many recipients in a delivery request as we can. When
* the recipient resolves to the same site and transport as the previous
* recipient, do not create a new queue entry, just bump the count of
* recipients for the existing queue entry. All this provided that we do
* not exceed the transport-specific limit on the number of recipients
* per transaction. Skip recipients with a dead transport or destination.
* recipient, do not create a new queue entry, just move that recipient
* to the recipient list of the existing queue entry. All this provided
* that we do not exceed the transport-specific limit on the number of
* recipients per transaction. Skip recipients with a dead transport or
* destination.
*/
#define LIMIT_OK(limit, count) ((limit) == 0 || ((count) < (limit)))
@ -633,13 +633,13 @@ static void qmgr_message_assign(QMGR_MESSAGE *message)
|| !LIMIT_OK(entry->queue->transport->recipient_limit,
entry->rcpt_list.len)) {
entry = qmgr_entry_create(queue, message);
entry->rcpt_list.info = recipient;
entry->rcpt_list.len = 1;
} else {
entry->rcpt_list.len++;
}
qmgr_rcpt_list_add(&entry->rcpt_list, recipient->offset, recipient->address);
qmgr_recipient_count++;
}
}
qmgr_rcpt_list_free(&message->rcpt_list);
qmgr_rcpt_list_init(&message->rcpt_list);
}
/* qmgr_message_free - release memory for in-core message structure */
@ -658,7 +658,6 @@ void qmgr_message_free(QMGR_MESSAGE *message)
myfree(message->errors_to);
if (message->return_receipt)
myfree(message->return_receipt);
qmgr_recipient_count -= message->rcpt_list.len;
qmgr_rcpt_list_free(&message->rcpt_list);
qmgr_message_count--;
myfree((char *) message);

View File

@ -498,16 +498,13 @@ static char *extract_addr(SMTPD_STATE *state, SMTPD_TOKEN *arg,
}
/*
* Report trouble.
* Report trouble. Log a warning only if we are going to sleep+reject.
*/
if (naddr != 1) { /* sorry, no can do */
if (naddr != 1
|| (var_strict_rfc821_env && (non_addr || *STR(arg->vstrval) != '<'))) {
msg_warn("Illegal address syntax from %s in %s command: %s",
state->namaddr, state->where, STR(arg->vstrval));
err = "501 Bad address syntax";
} else if (non_addr > 0) { /* it works with Sendmail... */
msg_warn("Illegal address syntax from %s in %s command: %s",
state->namaddr, state->where, STR(arg->vstrval));
err = (var_strict_rfc821_env ? "501 Bad address syntax" : 0);
}
/*

View File

@ -215,6 +215,7 @@ static const char *dict_ldap_lookup(DICT *dict, const char *name)
myname, dict_ldap->ldapsource);
}
}
/*
* Prepare the query.
*/
@ -277,6 +278,7 @@ static const char *dict_ldap_lookup(DICT *dict, const char *name)
LDAP_SCOPE_SUBTREE,
vstring_str(filter_buf),
0, 0, &tv, &res)) == LDAP_SUCCESS) {
/*
* Search worked; extract the requested result_attribute.
*/
@ -294,6 +296,7 @@ static const char *dict_ldap_lookup(DICT *dict, const char *name)
msg_warn("%s: entry doesn't have any values for %s", myname, dict_ldap->result_attribute);
continue;
}
/*
* Append each returned address to the result list.
*/
@ -488,6 +491,7 @@ DICT *dict_ldap_open(const char *ldapsource, int dummy, int dict_flags)
if (msg_verbose)
msg_info("%s: after ldap_open", myname);
/*
* If this server requires a bind, do so.
*/