diff --git a/postfix/HISTORY b/postfix/HISTORY index 5d36a14ab..d6b13adaa 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -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. diff --git a/postfix/INSTALL b/postfix/INSTALL index a54d68f3f..99f3df5b6 100644 --- a/postfix/INSTALL +++ b/postfix/INSTALL @@ -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 diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index a63b72076..e4449762c 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -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 diff --git a/postfix/conf/main.cf b/postfix/conf/main.cf index 57b7f0a62..869b2bbcb 100644 --- a/postfix/conf/main.cf +++ b/postfix/conf/main.cf @@ -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 diff --git a/postfix/conf/sample-smtpd.cf b/postfix/conf/sample-smtpd.cf index b5551e634..db6f35f69 100644 --- a/postfix/conf/sample-smtpd.cf +++ b/postfix/conf/sample-smtpd.cf @@ -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: # diff --git a/postfix/global/mail_version.h b/postfix/global/mail_version.h index 47e35bddf..5c873b645 100644 --- a/postfix/global/mail_version.h +++ b/postfix/global/mail_version.h @@ -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 diff --git a/postfix/html/faq.html b/postfix/html/faq.html index 349a64f22..f938652fd 100644 --- a/postfix/html/faq.html +++ b/postfix/html/faq.html @@ -186,8 +186,9 @@ href="transport.5.html">transport table lookups.

-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 thishost.my.domain +to the local delivery agent, or else mail for the local machine will +go into a loop.

@@ -257,12 +258,6 @@ configuration change. -

- -Unfortunately, the solution cannot use the transport table, because -that table is ignored for destinations that match $mydestination. -That's an implementation error, and it will be removed. -


Running Postfix on a dialup machine

diff --git a/postfix/html/uce.html b/postfix/html/uce.html index 7b74063db..58db0ae5f 100644 --- a/postfix/html/uce.html +++ b/postfix/html/uce.html @@ -537,8 +537,9 @@ reject_unauth_destination
check_relay_domains
Permit the request when the client hostname matches $relay_domains, -or when the resolved destination address matches the the local -machine or $relay_domains, otherwise +or when the resolved destination address matches $mydestination, the machine IP +addresses, or $relay_domains, otherwise reject the request. The relay_domains_reject_code parameter specifies the response code for rejected requests (default: 554). @@ -549,7 +550,8 @@ specifies the response code for rejected requests (default:
permit_auth_destination
Ignore the client hostname. Permit the request when the resolved destination address matches -the local machine or $relay_domains. +the $mydestination, the +machine IP addresses, or $relay_domains.

@@ -557,10 +559,10 @@ the local machine or $relay_domains.

reject_unauth_destination
Ignore the client hostname. Reject the request when the resolved destination address -does not match the local machine or -$relay_domains. The relay_domains_reject_code parameter -specifies the response code for rejected requests (default: -554). +does not match $mydestination, +the machine IP addresses, or $relay_domains. +The relay_domains_reject_code parameter specifies the response +code for rejected requests (default: 554).

diff --git a/postfix/qmgr/qmgr_active.c b/postfix/qmgr/qmgr_active.c index 5fe689029..9ba5a7dab 100644 --- a/postfix/qmgr/qmgr_active.c +++ b/postfix/qmgr/qmgr_active.c @@ -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. /* diff --git a/postfix/qmgr/qmgr_entry.c b/postfix/qmgr/qmgr_entry.c index 4c7c65e21..f471e51fd 100644 --- a/postfix/qmgr/qmgr_entry.c +++ b/postfix/qmgr/qmgr_entry.c @@ -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); diff --git a/postfix/qmgr/qmgr_message.c b/postfix/qmgr/qmgr_message.c index a6a89b430..0703913f9 100644 --- a/postfix/qmgr/qmgr_message.c +++ b/postfix/qmgr/qmgr_message.c @@ -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); diff --git a/postfix/smtpd/smtpd.c b/postfix/smtpd/smtpd.c index be0aa0c13..d3e41b482 100644 --- a/postfix/smtpd/smtpd.c +++ b/postfix/smtpd/smtpd.c @@ -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); } /* diff --git a/postfix/util/dict_ldap.c b/postfix/util/dict_ldap.c index 67f716cfd..e28725ae6 100644 --- a/postfix/util/dict_ldap.c +++ b/postfix/util/dict_ldap.c @@ -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. */