- Missing resets in the SMTP client when it switches to an alternate SMTP server: the error_mask that controls whether an SMTP session transcript is mailed to the postmaster, and the size_limit that controls how large a message Postfix will send. - When mail is delivered to a transport with per-delivery recipient limit of 1, addresses with extensions no longer get extra delivery concurrency slots. - The maildir delivery code now includes the time in microseconds in a file name, to avoid confusion with fragile mail clients that do not expect to see the same file name twice. Prereq: "2.1.3" diff -cr /tmp/postfix-2.1.3/src/global/mail_version.h ./src/global/mail_version.h *** /tmp/postfix-2.1.3/src/global/mail_version.h Wed Jun 16 14:19:03 2004 --- ./src/global/mail_version.h Mon Jun 28 14:26:39 2004 *************** *** 20,27 **** * Patches change the patchlevel and the release date. Snapshots change the * release date only. */ ! #define MAIL_RELEASE_DATE "20040616" ! #define MAIL_VERSION_NUMBER "2.1.3" #define VAR_MAIL_VERSION "mail_version" #ifdef SNAPSHOT --- 20,27 ---- * Patches change the patchlevel and the release date. Snapshots change the * release date only. */ ! #define MAIL_RELEASE_DATE "20040628" ! #define MAIL_VERSION_NUMBER "2.1.4" #define VAR_MAIL_VERSION "mail_version" #ifdef SNAPSHOT diff -cr /tmp/postfix-2.1.3/HISTORY ./HISTORY *** /tmp/postfix-2.1.3/HISTORY Wed Jun 16 16:22:04 2004 --- ./HISTORY Wed Jun 30 09:40:21 2004 *************** *** 9389,9391 **** --- 9389,9408 ---- Bugfix: space in HELO commands could end up in XFORWARD commands. File: smtpd/smtpd.c. + + 20040619 + + Bugfix: more missing resets in the SMTP client when it + switches to an alternate SMTP server. In this case the + error_mask that controls whether an SMTP session transcript + is mailed to the postmaster, and the size_limit that controls + how large a message Postfix will send. Found during code + maintenance. File: smtp/smtp_connect.c. + + 20040622 + + Safety: when mail is delivered to a transport with per-delivery + recipient limit of 1, split the recipient address on the + recipient delimiter if one is defined, so that extended + addresses don't get extra delivery concurrency slots. + Files: *qmgr/qmgr_message.c. diff -cr /tmp/postfix-2.1.3/html/regexp_table.5.html ./html/regexp_table.5.html *** /tmp/postfix-2.1.3/html/regexp_table.5.html Wed Apr 14 10:40:13 2004 --- ./html/regexp_table.5.html Sun Jun 20 10:22:35 2004 *************** *** 68,74 **** Each pattern is a POSIX regular expression enclosed by a pair of delimiters. The regular expression syntax is docu- ! mented in re_format(7) with 4.4BSD, in regcomp(3C) with Solaris, and in regex(7) with Linux. Other systems may use other document names. --- 68,74 ---- Each pattern is a POSIX regular expression enclosed by a pair of delimiters. The regular expression syntax is docu- ! mented in re_format(7) with 4.4BSD, in regex(5) with Solaris, and in regex(7) with Linux. Other systems may use other document names. diff -cr /tmp/postfix-2.1.3/man/man5/regexp_table.5 ./man/man5/regexp_table.5 *** /tmp/postfix-2.1.3/man/man5/regexp_table.5 Wed Apr 14 10:27:48 2004 --- ./man/man5/regexp_table.5 Sun Jun 20 10:22:34 2004 *************** *** 62,68 **** .PP Each pattern is a POSIX regular expression enclosed by a pair of delimiters. The regular expression syntax is documented in ! re_format(7) with 4.4BSD, in regcomp(3C) with Solaris, and in regex(7) with Linux. Other systems may use other document names. The expression delimiter can be any character, except whitespace --- 62,68 ---- .PP Each pattern is a POSIX regular expression enclosed by a pair of delimiters. The regular expression syntax is documented in ! re_format(7) with 4.4BSD, in regex(5) with Solaris, and in regex(7) with Linux. Other systems may use other document names. The expression delimiter can be any character, except whitespace diff -cr /tmp/postfix-2.1.3/proto/regexp_table ./proto/regexp_table *** /tmp/postfix-2.1.3/proto/regexp_table Wed Apr 14 10:25:43 2004 --- ./proto/regexp_table Sun Jun 20 10:22:21 2004 *************** *** 54,60 **** # .PP # Each pattern is a POSIX regular expression enclosed by a pair of # delimiters. The regular expression syntax is documented in ! # re_format(7) with 4.4BSD, in regcomp(3C) with Solaris, and in # regex(7) with Linux. Other systems may use other document names. # # The expression delimiter can be any character, except whitespace --- 54,60 ---- # .PP # Each pattern is a POSIX regular expression enclosed by a pair of # delimiters. The regular expression syntax is documented in ! # re_format(7) with 4.4BSD, in regex(5) with Solaris, and in # regex(7) with Linux. Other systems may use other document names. # # The expression delimiter can be any character, except whitespace diff -cr /tmp/postfix-2.1.3/src/oqmgr/qmgr_message.c ./src/oqmgr/qmgr_message.c *** /tmp/postfix-2.1.3/src/oqmgr/qmgr_message.c Wed Feb 4 21:48:04 2004 --- ./src/oqmgr/qmgr_message.c Wed Jun 23 13:28:44 2004 *************** *** 936,945 **** * agent resources. We use recipient@nexthop as queue name rather * than the actual recipient domain name, so that one recipient in * multiple equivalent domains cannot evade the per-recipient ! * concurrency limit. XXX Should split the address on the recipient ! * delimiter if one is defined, but doing a proper job requires ! * knowledge of local aliases. Yuck! I don't want to duplicate ! * delivery-agent specific knowledge in the queue manager. * * Fold the result to lower case so that we don't have multiple queues * for the same name. --- 936,944 ---- * agent resources. We use recipient@nexthop as queue name rather * than the actual recipient domain name, so that one recipient in * multiple equivalent domains cannot evade the per-recipient ! * concurrency limit. Split the address on the recipient delimiter if ! * one is defined, so that extended addresses don't get extra ! * delivery slots. * * Fold the result to lower case so that we don't have multiple queues * for the same name. *************** *** 947,964 **** * Important! All recipients in a queue must have the same nexthop * value. It is OK to have multiple queues with the same nexthop * value, but only when those queues are named after recipients. */ vstring_strcpy(queue_name, STR(reply.nexthop)); if (strcmp(transport->name, MAIL_SERVICE_ERROR) != 0 && transport->recipient_limit == 1) { at = strrchr(STR(reply.recipient), '@'); len = (at ? (at - STR(reply.recipient)) : strlen(STR(reply.recipient))); ! VSTRING_SPACE(queue_name, len + 2); ! memmove(STR(queue_name) + len + 1, STR(queue_name), ! LEN(queue_name) + 1); ! memcpy(STR(queue_name), STR(reply.recipient), len); ! STR(queue_name)[len] = '@'; } lowercase(STR(queue_name)); --- 946,977 ---- * Important! All recipients in a queue must have the same nexthop * value. It is OK to have multiple queues with the same nexthop * value, but only when those queues are named after recipients. + * + * The single-recipient code below was written for local(8) like + * delivery agents, and assumes that all domains that deliver to the + * same (transport + nexthop) are aliases for $nexthop. Delivery + * concurrency is changed from per-domain into per-recipient, by + * changing the queue name from nexthop into localpart@nexthop. + * + * XXX This assumption is incorrect when different destinations share + * the same (transport + nexthop). In reality, such transports are + * rarely configured to use single-recipient deliveries. The fix is + * to decouple the per-destination recipient limit from the + * per-destination concurrency. */ vstring_strcpy(queue_name, STR(reply.nexthop)); if (strcmp(transport->name, MAIL_SERVICE_ERROR) != 0 && transport->recipient_limit == 1) { + /* Copy the recipient localpart. */ at = strrchr(STR(reply.recipient), '@'); len = (at ? (at - STR(reply.recipient)) : strlen(STR(reply.recipient))); ! vstring_strncpy(queue_name, STR(reply.recipient), len); ! /* Remove the address extension from the recipient localpart. */ ! if (*var_rcpt_delim && split_addr(STR(queue_name), *var_rcpt_delim)) ! vstring_truncate(queue_name, strlen(STR(queue_name))); ! /* Assume the recipient domain is equivalent to nexthop. */ ! vstring_sprintf_append(queue_name, "@%s", STR(reply.nexthop)); } lowercase(STR(queue_name)); diff -cr /tmp/postfix-2.1.3/src/qmgr/qmgr_message.c ./src/qmgr/qmgr_message.c *** /tmp/postfix-2.1.3/src/qmgr/qmgr_message.c Wed Feb 4 21:43:12 2004 --- ./src/qmgr/qmgr_message.c Wed Jun 23 13:28:58 2004 *************** *** 980,989 **** * agent resources. We use recipient@nexthop as queue name rather * than the actual recipient domain name, so that one recipient in * multiple equivalent domains cannot evade the per-recipient ! * concurrency limit. XXX Should split the address on the recipient ! * delimiter if one is defined, but doing a proper job requires ! * knowledge of local aliases. Yuck! I don't want to duplicate ! * delivery-agent specific knowledge in the queue manager. * * Fold the result to lower case so that we don't have multiple queues * for the same name. --- 980,988 ---- * agent resources. We use recipient@nexthop as queue name rather * than the actual recipient domain name, so that one recipient in * multiple equivalent domains cannot evade the per-recipient ! * concurrency limit. Split the address on the recipient delimiter if ! * one is defined, so that extended addresses don't get extra ! * delivery slots. * * Fold the result to lower case so that we don't have multiple queues * for the same name. *************** *** 991,1008 **** * Important! All recipients in a queue must have the same nexthop * value. It is OK to have multiple queues with the same nexthop * value, but only when those queues are named after recipients. */ vstring_strcpy(queue_name, STR(reply.nexthop)); if (strcmp(transport->name, MAIL_SERVICE_ERROR) != 0 && transport->recipient_limit == 1) { at = strrchr(STR(reply.recipient), '@'); len = (at ? (at - STR(reply.recipient)) : strlen(STR(reply.recipient))); ! VSTRING_SPACE(queue_name, len + 2); ! memmove(STR(queue_name) + len + 1, STR(queue_name), ! LEN(queue_name) + 1); ! memcpy(STR(queue_name), STR(reply.recipient), len); ! STR(queue_name)[len] = '@'; } lowercase(STR(queue_name)); --- 990,1021 ---- * Important! All recipients in a queue must have the same nexthop * value. It is OK to have multiple queues with the same nexthop * value, but only when those queues are named after recipients. + * + * The single-recipient code below was written for local(8) like + * delivery agents, and assumes that all domains that deliver to the + * same (transport + nexthop) are aliases for $nexthop. Delivery + * concurrency is changed from per-domain into per-recipient, by + * changing the queue name from nexthop into localpart@nexthop. + * + * XXX This assumption is incorrect when different destinations share + * the same (transport + nexthop). In reality, such transports are + * rarely configured to use single-recipient deliveries. The fix is + * to decouple the per-destination recipient limit from the + * per-destination concurrency. */ vstring_strcpy(queue_name, STR(reply.nexthop)); if (strcmp(transport->name, MAIL_SERVICE_ERROR) != 0 && transport->recipient_limit == 1) { + /* Copy the recipient localpart. */ at = strrchr(STR(reply.recipient), '@'); len = (at ? (at - STR(reply.recipient)) : strlen(STR(reply.recipient))); ! vstring_strncpy(queue_name, STR(reply.recipient), len); ! /* Remove the address extension from the recipient localpart. */ ! if (*var_rcpt_delim && split_addr(STR(queue_name), *var_rcpt_delim)) ! vstring_truncate(queue_name, strlen(STR(queue_name))); ! /* Assume the recipient domain is equivalent to nexthop. */ ! vstring_sprintf_append(queue_name, "@%s", STR(reply.nexthop)); } lowercase(STR(queue_name)); diff -cr /tmp/postfix-2.1.3/src/smtp/smtp_connect.c ./src/smtp/smtp_connect.c *** /tmp/postfix-2.1.3/src/smtp/smtp_connect.c Mon Jun 14 16:14:40 2004 --- ./src/smtp/smtp_connect.c Sat Jun 19 12:23:33 2004 *************** *** 363,368 **** --- 363,370 ---- smtp_chat_notify(state); smtp_chat_reset(state); } + state->error_mask = 0; + state->size_limit = 0; /* XXX smtp_xfer() may abort in the middle of DATA. */ smtp_session_free(state->session); state->session = 0;