Prereq: "2.2.1" diff -cr --new-file /var/tmp/postfix-2.2.1/src/global/mail_version.h ./src/global/mail_version.h *** /var/tmp/postfix-2.2.1/src/global/mail_version.h Tue Mar 15 09:17:23 2005 --- ./src/global/mail_version.h Fri Apr 1 10:13:57 2005 *************** *** 20,27 **** * Patches change the patchlevel and the release date. Snapshots change the * release date only. */ ! #define MAIL_RELEASE_DATE "20050315" ! #define MAIL_VERSION_NUMBER "2.2.1" #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 "20050401" ! #define MAIL_VERSION_NUMBER "2.2.2" #define VAR_MAIL_VERSION "mail_version" #ifdef SNAPSHOT diff -cr --new-file /var/tmp/postfix-2.2.1/HISTORY ./HISTORY *** /var/tmp/postfix-2.2.1/HISTORY Tue Mar 15 09:19:04 2005 --- ./HISTORY Wed Mar 30 09:23:51 2005 *************** *** 10485,10487 **** --- 10485,10514 ---- Bugfix: when is included, read is a reserved identifier. File: smtpstone/smtp-source.c. + 20050317 + + Cleanup: change wording of error message when an IPv6 address + is mistaken for maptype:mapname. File: util/dict_open.c. + + 20050321 + + Robustness: don't look for SMTP status code when there was + none. File: smtp/smtp_chat.c, lmtp/lmtp_chat.c. + + Portability: missing netinet/in.h include, so that ntohs() + was not defined on HP-UX. File: smtp/smtp_proto.c. + + 20050327 + + Bugfix: the SMTP and LMTP clients did not ask the queue + manager to reduce destination concurrency when "lost + connection" or "connection timed out" happened AFTER Postfix + received the server greeting. Files: smtp/smtp_trouble.c, + lmtp/lmtp-trouble.c. + + 20050328 + + Cleanup: the REPLACE action is no longer implemented as + PREPEND+IGNORE. The result remains in the input stream, and + is subject to address rewriting and other processing where + applicable. File: cleanup/cleanup_message.c. diff -cr --new-file /var/tmp/postfix-2.2.1/conf/header_checks ./conf/header_checks *** /var/tmp/postfix-2.2.1/conf/header_checks Sat Feb 5 19:56:11 2005 --- ./conf/header_checks Fri Apr 1 10:16:20 2005 *************** *** 1,4 **** ! # HEADER_CHECKS(5) HEADER_CHECKS(5) # # NAME # header_checks - Postfix built-in header/body inspection --- 1,4 ---- ! # HEADER_CHECKS(5) HEADER_CHECKS(5) # # NAME # header_checks - Postfix built-in header/body inspection *************** *** 202,207 **** --- 202,213 ---- # line, immediately before the input that # triggered the PREPEND action. # + # o The prepended text is not considered part of + # the input stream: it is not subject to + # header/body checks or address rewriting, and + # it does not affect the way that Postfix adds + # missing message headers. + # # o When prepending text before a message header # line, the prepended text must begin with a # valid message header label. *************** *** 228,238 **** # Replace the current line with the specified text # and inspect the next input line. # - # Note: when replacing a message header line, the - # replacement text must begin with a valid header - # label. - # # This feature is available in Postfix 2.2 and later. # # REJECT optional text... # Reject the entire message. Reply with optional --- 234,255 ---- # Replace the current line with the specified text # and inspect the next input line. # # This feature is available in Postfix 2.2 and later. + # The description below applies to Postfix 2.2.2 and + # later. + # + # Notes: + # + # o When replacing a message header line, the + # replacement text must begin with a valid + # header label. + # + # o The replaced text remains part of the input + # stream. Unlike the result from the PREPEND + # action, a replaced message header may be + # subject to address rewriting and may affect + # the way that Postfix adds missing message + # headers. # # REJECT optional text... # Reject the entire message. Reply with optional *************** *** 359,362 **** # P.O. Box 704 # Yorktown Heights, NY 10598, USA # ! # HEADER_CHECKS(5) --- 376,379 ---- # P.O. Box 704 # Yorktown Heights, NY 10598, USA # ! # HEADER_CHECKS(5) diff -cr --new-file /var/tmp/postfix-2.2.1/conf/virtual ./conf/virtual *** /var/tmp/postfix-2.2.1/conf/virtual Fri Feb 11 18:53:50 2005 --- ./conf/virtual Wed Mar 30 10:51:32 2005 *************** *** 1,4 **** ! # VIRTUAL(5) VIRTUAL(5) # # NAME # virtual - Postfix virtual alias table format --- 1,4 ---- ! # VIRTUAL(5) VIRTUAL(5) # # NAME # virtual - Postfix virtual alias table format *************** *** 11,20 **** # postmap -q - /etc/postfix/virtual PREPEND action. + o The prepended text is not considered part of + the input stream: it is not subject to + header/body checks or address rewriting, and + it does not affect the way that Postfix adds + missing message headers. + o When prepending text before a message header line, the prepended text must begin with a valid message header label. *************** *** 234,244 **** Replace the current line with the specified text and inspect the next input line. - Note: when replacing a message header line, the - replacement text must begin with a valid header - label. - This feature is available in Postfix 2.2 and later. REJECT optional text... Reject the entire message. Reply with optional --- 240,261 ---- Replace the current line with the specified text and inspect the next input line. This feature is available in Postfix 2.2 and later. + The description below applies to Postfix 2.2.2 and + later. + + Notes: + + o When replacing a message header line, the + replacement text must begin with a valid + header label. + + o The replaced text remains part of the input + stream. Unlike the result from the PREPEND + action, a replaced message header may be + subject to address rewriting and may affect + the way that Postfix adds missing message + headers. REJECT optional text... Reject the entire message. Reply with optional diff -cr --new-file /var/tmp/postfix-2.2.1/html/virtual.5.html ./html/virtual.5.html *** /var/tmp/postfix-2.2.1/html/virtual.5.html Tue Feb 22 09:05:47 2005 --- ./html/virtual.5.html Wed Mar 30 10:51:33 2005 *************** *** 17,26 **** postmap -q - /etc/postfix/virtual <inputfile DESCRIPTION ! The optional virtual(5) alias table specifies address ! aliasing for arbitrary local or non-local recipient ! addresses. Virtual aliasing is recursive, and is done by ! the Postfix cleanup(8) daemon. The main applications of virtual aliasing are: --- 17,28 ---- postmap -q - /etc/postfix/virtual <inputfile DESCRIPTION ! The optional virtual(5) alias table rewrites recipient ! addresses for all local, virtual and remote mail destina- ! tions. This is unlike the aliases(5) table which is used ! only for local(8) delivery. Virtual aliasing is recur- ! sive, and is implemented by the Postfix cleanup(8) daemon ! before mail is queued. The main applications of virtual aliasing are: diff -cr --new-file /var/tmp/postfix-2.2.1/man/man5/header_checks.5 ./man/man5/header_checks.5 *** /var/tmp/postfix-2.2.1/man/man5/header_checks.5 Sat Feb 5 19:56:11 2005 --- ./man/man5/header_checks.5 Fri Apr 1 10:16:20 2005 *************** *** 194,199 **** --- 194,204 ---- The prepended text is output on a separate line, immediately before the input that triggered the \fBPREPEND\fR action. .IP \(bu + The prepended text is not considered part of the input + stream: it is not subject to header/body checks or address + rewriting, and it does not affect the way that Postfix adds + missing message headers. + .IP \(bu When prepending text before a message header line, the prepended text must begin with a valid message header label. .IP \(bu *************** *** 216,225 **** Replace the current line with the specified text and inspect the next input line. .sp ! Note: when replacing a message header line, the replacement text ! must begin with a valid header label. .sp ! This feature is available in Postfix 2.2 and later. .IP "\fBREJECT \fIoptional text...\fR Reject the entire message. Reply with \fIoptional text...\fR when the optional text is specified, otherwise reply with a generic error --- 221,240 ---- Replace the current line with the specified text and inspect the next input line. .sp ! This feature is available in Postfix 2.2 and later. The ! description below applies to Postfix 2.2.2 and later. .sp ! Notes: ! .RS ! .IP \(bu ! When replacing a message header line, the replacement text ! must begin with a valid header label. ! .IP \(bu ! The replaced text remains part of the input stream. Unlike ! the result from the \fBPREPEND\fR action, a replaced message ! header may be subject to address rewriting and may affect ! the way that Postfix adds missing message headers. ! .RE .IP "\fBREJECT \fIoptional text...\fR Reject the entire message. Reply with \fIoptional text...\fR when the optional text is specified, otherwise reply with a generic error diff -cr --new-file /var/tmp/postfix-2.2.1/man/man5/virtual.5 ./man/man5/virtual.5 *** /var/tmp/postfix-2.2.1/man/man5/virtual.5 Fri Feb 11 18:54:00 2005 --- ./man/man5/virtual.5 Wed Mar 30 10:51:33 2005 *************** *** 16,24 **** .SH DESCRIPTION .ad .fi ! The optional \fBvirtual\fR(5) alias table specifies address aliasing ! for arbitrary local or non-local recipient addresses. Virtual aliasing ! is recursive, and is done by the Postfix \fBcleanup\fR(8) daemon. The main applications of virtual aliasing are: .IP \(bu --- 16,27 ---- .SH DESCRIPTION .ad .fi ! The optional \fBvirtual\fR(5) alias table rewrites recipient ! addresses for all local, virtual and remote mail destinations. ! This is unlike the \fBaliases\fR(5) table which is used ! only for \fBlocal\fR(8) delivery. Virtual aliasing is ! recursive, and is implemented by the Postfix \fBcleanup\fR(8) ! daemon before mail is queued. The main applications of virtual aliasing are: .IP \(bu diff -cr --new-file /var/tmp/postfix-2.2.1/proto/header_checks ./proto/header_checks *** /var/tmp/postfix-2.2.1/proto/header_checks Sat Feb 5 19:56:02 2005 --- ./proto/header_checks Fri Apr 1 10:16:12 2005 *************** *** 180,185 **** --- 180,190 ---- # The prepended text is output on a separate line, immediately # before the input that triggered the \fBPREPEND\fR action. # .IP \(bu + # The prepended text is not considered part of the input + # stream: it is not subject to header/body checks or address + # rewriting, and it does not affect the way that Postfix adds + # missing message headers. + # .IP \(bu # When prepending text before a message header line, the prepended # text must begin with a valid message header label. # .IP \(bu *************** *** 202,211 **** # Replace the current line with the specified text and inspect the next # input line. # .sp ! # Note: when replacing a message header line, the replacement text ! # must begin with a valid header label. # .sp ! # This feature is available in Postfix 2.2 and later. # .IP "\fBREJECT \fIoptional text...\fR # Reject the entire message. Reply with \fIoptional text...\fR when # the optional text is specified, otherwise reply with a generic error --- 207,226 ---- # Replace the current line with the specified text and inspect the next # input line. # .sp ! # This feature is available in Postfix 2.2 and later. The ! # description below applies to Postfix 2.2.2 and later. # .sp ! # Notes: ! # .RS ! # .IP \(bu ! # When replacing a message header line, the replacement text ! # must begin with a valid header label. ! # .IP \(bu ! # The replaced text remains part of the input stream. Unlike ! # the result from the \fBPREPEND\fR action, a replaced message ! # header may be subject to address rewriting and may affect ! # the way that Postfix adds missing message headers. ! # .RE # .IP "\fBREJECT \fIoptional text...\fR # Reject the entire message. Reply with \fIoptional text...\fR when # the optional text is specified, otherwise reply with a generic error diff -cr --new-file /var/tmp/postfix-2.2.1/proto/virtual ./proto/virtual *** /var/tmp/postfix-2.2.1/proto/virtual Fri Feb 11 18:53:21 2005 --- ./proto/virtual Wed Mar 30 10:50:35 2005 *************** *** 10,18 **** # # \fBpostmap -q - /etc/postfix/virtual <\fIinputfile\fR # DESCRIPTION ! # The optional \fBvirtual\fR(5) alias table specifies address aliasing ! # for arbitrary local or non-local recipient addresses. Virtual aliasing ! # is recursive, and is done by the Postfix \fBcleanup\fR(8) daemon. # # The main applications of virtual aliasing are: # .IP \(bu --- 10,21 ---- # # \fBpostmap -q - /etc/postfix/virtual <\fIinputfile\fR # DESCRIPTION ! # The optional \fBvirtual\fR(5) alias table rewrites recipient ! # addresses for all local, virtual and remote mail destinations. ! # This is unlike the \fBaliases\fR(5) table which is used ! # only for \fBlocal\fR(8) delivery. Virtual aliasing is ! # recursive, and is implemented by the Postfix \fBcleanup\fR(8) ! # daemon before mail is queued. # # The main applications of virtual aliasing are: # .IP \(bu diff -cr --new-file /var/tmp/postfix-2.2.1/src/cleanup/cleanup_message.c ./src/cleanup/cleanup_message.c *** /var/tmp/postfix-2.2.1/src/cleanup/cleanup_message.c Sun Feb 27 17:55:09 2005 --- ./src/cleanup/cleanup_message.c Wed Mar 30 09:21:31 2005 *************** *** 295,312 **** /* cleanup_act - act upon a header/body match */ ! static int cleanup_act(CLEANUP_STATE *state, char *context, const char *buf, ! const char *value, const char *map_class) { const char *optional_text = value + strcspn(value, " \t"); int command_len = optional_text - value; - VSTRING *bp; while (*optional_text && ISSPACE(*optional_text)) optional_text++; #define STREQUAL(x,y,l) (strncasecmp((x), (y), (l)) == 0 && (y)[l] == 0) - #define CLEANUP_ACT_KEEP 1 #define CLEANUP_ACT_DROP 0 if (STREQUAL(value, "REJECT", command_len)) { --- 295,311 ---- /* cleanup_act - act upon a header/body match */ ! static const char *cleanup_act(CLEANUP_STATE *state, char *context, ! const char *buf, const char *value, ! const char *map_class) { const char *optional_text = value + strcspn(value, " \t"); int command_len = optional_text - value; while (*optional_text && ISSPACE(*optional_text)) optional_text++; #define STREQUAL(x,y,l) (strncasecmp((x), (y), (l)) == 0 && (y)[l] == 0) #define CLEANUP_ACT_DROP 0 if (STREQUAL(value, "REJECT", command_len)) { *************** *** 316,332 **** state->errs |= CLEANUP_STAT_CONT; state->flags &= ~CLEANUP_FLAG_FILTER; cleanup_act_log(state, "reject", context, buf, state->reason); ! return (CLEANUP_ACT_KEEP); } if (STREQUAL(value, "WARN", command_len)) { cleanup_act_log(state, "warning", context, buf, optional_text); ! return (CLEANUP_ACT_KEEP); } if (STREQUAL(value, "FILTER", command_len)) { if (*optional_text == 0) { msg_warn("missing FILTER command argument in %s map", map_class); } else if (strchr(optional_text, ':') == 0) { ! msg_warn("bad FILTER command %s in %s, need transport:destination", optional_text, map_class); } else { if (state->filter) --- 315,332 ---- state->errs |= CLEANUP_STAT_CONT; state->flags &= ~CLEANUP_FLAG_FILTER; cleanup_act_log(state, "reject", context, buf, state->reason); ! return (buf); } if (STREQUAL(value, "WARN", command_len)) { cleanup_act_log(state, "warning", context, buf, optional_text); ! return (buf); } if (STREQUAL(value, "FILTER", command_len)) { if (*optional_text == 0) { msg_warn("missing FILTER command argument in %s map", map_class); } else if (strchr(optional_text, ':') == 0) { ! msg_warn("bad FILTER command %s in %s -- " ! "need transport:destination", optional_text, map_class); } else { if (state->filter) *************** *** 334,390 **** state->filter = mystrdup(optional_text); cleanup_act_log(state, "filter", context, buf, optional_text); } ! return (CLEANUP_ACT_KEEP); } if (STREQUAL(value, "DISCARD", command_len)) { cleanup_act_log(state, "discard", context, buf, optional_text); state->flags |= CLEANUP_FLAG_DISCARD; state->flags &= ~CLEANUP_FLAG_FILTER; ! return (CLEANUP_ACT_KEEP); } if (STREQUAL(value, "HOLD", command_len)) { cleanup_act_log(state, "hold", context, buf, optional_text); state->flags |= CLEANUP_FLAG_HOLD; ! return (CLEANUP_ACT_KEEP); } if (STREQUAL(value, "PREPEND", command_len)) { if (*optional_text == 0) { msg_warn("PREPEND action without text in %s map", map_class); } else if (strcmp(context, CLEANUP_ACT_CTXT_HEADER) == 0 && !is_header(optional_text)) { ! msg_warn("bad PREPEND header text \"%s\" in %s map, " "need \"headername: headervalue\"", optional_text, map_class); } else { cleanup_act_log(state, "prepend", context, buf, optional_text); cleanup_out_string(state, REC_TYPE_NORM, optional_text); } ! return (CLEANUP_ACT_KEEP); } if (STREQUAL(value, "REPLACE", command_len)) { if (*optional_text == 0) { msg_warn("REPLACE action without text in %s map", map_class); ! return (CLEANUP_ACT_KEEP); ! } else if (strcmp(context, CLEANUP_ACT_CTXT_HEADER) == 0) { ! if (!is_header(optional_text)) { ! msg_warn("bad REPLACE header text \"%s\" in %s map, " ! "need \"headername: headervalue\"", ! optional_text, map_class); ! return (CLEANUP_ACT_KEEP); ! } ! /* XXX Impedance mismatch. */ ! bp = vstring_strcpy(vstring_alloc(100), optional_text); ! cleanup_out_header(state, bp); ! vstring_free(bp); } else { ! cleanup_out_string(state, REC_TYPE_NORM, optional_text); } - cleanup_act_log(state, "replace", context, buf, optional_text); - return (CLEANUP_ACT_DROP); } if (STREQUAL(value, "REDIRECT", command_len)) { if (strchr(optional_text, '@') == 0) { ! msg_warn("bad REDIRECT target \"%s\" in %s map, need user@domain", optional_text, map_class); } else { if (state->redirect) --- 334,385 ---- state->filter = mystrdup(optional_text); cleanup_act_log(state, "filter", context, buf, optional_text); } ! return (buf); } if (STREQUAL(value, "DISCARD", command_len)) { cleanup_act_log(state, "discard", context, buf, optional_text); state->flags |= CLEANUP_FLAG_DISCARD; state->flags &= ~CLEANUP_FLAG_FILTER; ! return (buf); } if (STREQUAL(value, "HOLD", command_len)) { cleanup_act_log(state, "hold", context, buf, optional_text); state->flags |= CLEANUP_FLAG_HOLD; ! return (buf); } if (STREQUAL(value, "PREPEND", command_len)) { if (*optional_text == 0) { msg_warn("PREPEND action without text in %s map", map_class); } else if (strcmp(context, CLEANUP_ACT_CTXT_HEADER) == 0 && !is_header(optional_text)) { ! msg_warn("bad PREPEND header text \"%s\" in %s map -- " "need \"headername: headervalue\"", optional_text, map_class); } else { cleanup_act_log(state, "prepend", context, buf, optional_text); cleanup_out_string(state, REC_TYPE_NORM, optional_text); } ! return (buf); } if (STREQUAL(value, "REPLACE", command_len)) { if (*optional_text == 0) { msg_warn("REPLACE action without text in %s map", map_class); ! return (buf); ! } else if (strcmp(context, CLEANUP_ACT_CTXT_HEADER) == 0 ! && !is_header(optional_text)) { ! msg_warn("bad REPLACE header text \"%s\" in %s map -- " ! "need \"headername: headervalue\"", ! optional_text, map_class); ! return (buf); } else { ! cleanup_act_log(state, "replace", context, buf, optional_text); ! return (mystrdup(optional_text)); } } if (STREQUAL(value, "REDIRECT", command_len)) { if (strchr(optional_text, '@') == 0) { ! msg_warn("bad REDIRECT target \"%s\" in %s map -- " ! "need user@domain", optional_text, map_class); } else { if (state->redirect) *************** *** 393,399 **** cleanup_act_log(state, "redirect", context, buf, optional_text); state->flags &= ~CLEANUP_FLAG_FILTER; } ! return (CLEANUP_ACT_KEEP); } /* Allow and ignore optional text after the action. */ --- 388,394 ---- cleanup_act_log(state, "redirect", context, buf, optional_text); state->flags &= ~CLEANUP_FLAG_FILTER; } ! return (buf); } /* Allow and ignore optional text after the action. */ *************** *** 401,413 **** return (CLEANUP_ACT_DROP); if (STREQUAL(value, "DUNNO", command_len)) /* preferred */ ! return (CLEANUP_ACT_KEEP); if (STREQUAL(value, "OK", command_len)) /* compat */ ! return (CLEANUP_ACT_KEEP); msg_warn("unknown command in %s map: %s", map_class, value); ! return (CLEANUP_ACT_KEEP); } /* cleanup_header_callback - process one complete header line */ --- 396,408 ---- return (CLEANUP_ACT_DROP); if (STREQUAL(value, "DUNNO", command_len)) /* preferred */ ! return (buf); if (STREQUAL(value, "OK", command_len)) /* compat */ ! return (buf); msg_warn("unknown command in %s map: %s", map_class, value); ! return (buf); } /* cleanup_header_callback - process one complete header line */ *************** *** 456,465 **** const char *value; if ((value = maps_find(checks, header, 0)) != 0) { ! if (cleanup_act(state, CLEANUP_ACT_CTXT_HEADER, ! header, value, map_class) ! == CLEANUP_ACT_DROP) return; } } --- 451,467 ---- const char *value; if ((value = maps_find(checks, header, 0)) != 0) { ! const char *result; ! ! if ((result = cleanup_act(state, CLEANUP_ACT_CTXT_HEADER, ! header, value, map_class)) ! == CLEANUP_ACT_DROP) { return; + } else if (result != header) { + vstring_strcpy(header_buf, result); + hdr_opts = header_opts_find(result); + myfree((char *) result); + } } } *************** *** 665,674 **** const char *value; if ((value = maps_find(cleanup_body_checks, buf, 0)) != 0) { ! if (cleanup_act(state, CLEANUP_ACT_CTXT_BODY, ! buf, value, VAR_BODY_CHECKS) ! == CLEANUP_ACT_DROP) return; } } cleanup_out(state, type, buf, len); --- 667,683 ---- const char *value; if ((value = maps_find(cleanup_body_checks, buf, 0)) != 0) { ! const char *result; ! ! if ((result = cleanup_act(state, CLEANUP_ACT_CTXT_BODY, ! buf, value, VAR_BODY_CHECKS)) ! == CLEANUP_ACT_DROP) { return; + } else if (result != buf) { + cleanup_out(state, type, result, strlen(result)); + myfree((char *) result); + return; + } } } cleanup_out(state, type, buf, len); diff -cr --new-file /var/tmp/postfix-2.2.1/src/lmtp/lmtp_chat.c ./src/lmtp/lmtp_chat.c *** /var/tmp/postfix-2.2.1/src/lmtp/lmtp_chat.c Sat Jul 5 16:28:32 2003 --- ./src/lmtp/lmtp_chat.c Tue Mar 22 14:16:08 2005 *************** *** 175,180 **** --- 175,181 ---- static LMTP_RESP rdata; char *cp; int last_char; + int three_digs = 0; /* * Initialize the response data buffer. *************** *** 215,221 **** */ for (cp = STR(state->buffer); *cp && ISDIGIT(*cp); cp++) /* void */ ; ! if (cp - STR(state->buffer) == 3) { if (*cp == '-') continue; if (*cp == ' ' || *cp == 0) --- 216,222 ---- */ for (cp = STR(state->buffer); *cp && ISDIGIT(*cp); cp++) /* void */ ; ! if ((three_digs = (cp - STR(state->buffer) == 3)) != 0) { if (*cp == '-') continue; if (*cp == ' ' || *cp == 0) *************** *** 223,229 **** } state->error_mask |= MAIL_ERROR_PROTOCOL; } ! rdata.code = atoi(STR(state->buffer)); VSTRING_TERMINATE(rdata.buf); rdata.str = STR(rdata.buf); return (&rdata); --- 224,233 ---- } state->error_mask |= MAIL_ERROR_PROTOCOL; } ! if (three_digs != 0) ! rdata.code = atoi(STR(state->buffer)); ! else ! rdata.code = 0; VSTRING_TERMINATE(rdata.buf); rdata.str = STR(rdata.buf); return (&rdata); diff -cr --new-file /var/tmp/postfix-2.2.1/src/lmtp/lmtp_trouble.c ./src/lmtp/lmtp_trouble.c *** /var/tmp/postfix-2.2.1/src/lmtp/lmtp_trouble.c Mon Jan 19 21:49:39 2004 --- ./src/lmtp/lmtp_trouble.c Mon Mar 28 11:13:32 2005 *************** *** 313,318 **** --- 313,320 ---- request->arrival_time, "%s", vstring_str(why)); } + if (request->hop_status == 0) + request->hop_status = mystrdup(vstring_str(why)); /* * Cleanup. diff -cr --new-file /var/tmp/postfix-2.2.1/src/smtp/smtp_addr.c ./src/smtp/smtp_addr.c *** /var/tmp/postfix-2.2.1/src/smtp/smtp_addr.c Sat Mar 5 13:04:39 2005 --- ./src/smtp/smtp_addr.c Wed Mar 30 07:45:36 2005 *************** *** 209,215 **** freeaddrinfo(res0); if (found == 0) { vstring_sprintf(why, "%s: host not found", host); ! smtp_errno = SMTP_ERR_FAIL; } return (addr_list); } --- 209,216 ---- freeaddrinfo(res0); if (found == 0) { vstring_sprintf(why, "%s: host not found", host); ! if (smtp_errno != SMTP_ERR_RETRY) ! smtp_errno = SMTP_ERR_FAIL; } return (addr_list); } diff -cr --new-file /var/tmp/postfix-2.2.1/src/smtp/smtp_chat.c ./src/smtp/smtp_chat.c *** /var/tmp/postfix-2.2.1/src/smtp/smtp_chat.c Tue Aug 17 16:20:50 2004 --- ./src/smtp/smtp_chat.c Tue Mar 22 14:13:59 2005 *************** *** 198,203 **** --- 198,204 ---- static SMTP_RESP rdata; char *cp; int last_char; + int three_digs = 0; /* * Initialize the response data buffer. *************** *** 238,244 **** */ for (cp = STR(session->buffer); *cp && ISDIGIT(*cp); cp++) /* void */ ; ! if (cp - STR(session->buffer) == 3) { if (*cp == '-') continue; if (*cp == ' ' || *cp == 0) --- 239,245 ---- */ for (cp = STR(session->buffer); *cp && ISDIGIT(*cp); cp++) /* void */ ; ! if ((three_digs = (cp - STR(session->buffer) == 3)) != 0) { if (*cp == '-') continue; if (*cp == ' ' || *cp == 0) *************** *** 246,252 **** } session->error_mask |= MAIL_ERROR_PROTOCOL; } ! rdata.code = atoi(STR(session->buffer)); VSTRING_TERMINATE(rdata.buf); rdata.str = STR(rdata.buf); return (&rdata); --- 247,256 ---- } session->error_mask |= MAIL_ERROR_PROTOCOL; } ! if (three_digs != 0) ! rdata.code = atoi(STR(session->buffer)); ! else ! rdata.code = 0; VSTRING_TERMINATE(rdata.buf); rdata.str = STR(rdata.buf); return (&rdata); diff -cr --new-file /var/tmp/postfix-2.2.1/src/smtp/smtp_proto.c ./src/smtp/smtp_proto.c *** /var/tmp/postfix-2.2.1/src/smtp/smtp_proto.c Fri Mar 4 11:01:21 2005 --- ./src/smtp/smtp_proto.c Tue Mar 22 13:47:18 2005 *************** *** 91,96 **** --- 91,97 ---- #include #include #include /* shutdown(2) */ + #include /* ntohs() */ #include #include #include /* 44BSD stdarg.h uses abort() */ diff -cr --new-file /var/tmp/postfix-2.2.1/src/smtp/smtp_session.c ./src/smtp/smtp_session.c *** /var/tmp/postfix-2.2.1/src/smtp/smtp_session.c Wed Mar 2 13:41:08 2005 --- ./src/smtp/smtp_session.c Sun Mar 20 11:25:22 2005 *************** *** 129,141 **** /* * Per-site policies can override main.cf settings. - * - * XXX 200412 This does not work as some people may expect. A policy that - * specifies "use TLS" in a policy file while TLS is turned off in main.cf - * cannot work, because there is no OpenSSL context for creating sessions - * (that context exists only if TLS is enabled via main.cf settings; the - * OpenSSL context is created at process initialization time and cannot be - * created on the fly). */ typedef struct { int dont_use; /* don't use TLS */ --- 129,134 ---- diff -cr --new-file /var/tmp/postfix-2.2.1/src/smtp/smtp_trouble.c ./src/smtp/smtp_trouble.c *** /var/tmp/postfix-2.2.1/src/smtp/smtp_trouble.c Sat Jul 3 19:53:20 2004 --- ./src/smtp/smtp_trouble.c Mon Mar 28 10:59:01 2005 *************** *** 420,425 **** --- 420,428 ---- "%s", vstring_str(why)); SMTP_RCPT_DROP(state, rcpt); } + /* XXX This assumes no fall-back relay. */ + if (request->hop_status == 0) + request->hop_status = mystrdup(vstring_str(why)); } /* diff -cr --new-file /var/tmp/postfix-2.2.1/src/util/dict_open.c ./src/util/dict_open.c *** /var/tmp/postfix-2.2.1/src/util/dict_open.c Thu Feb 10 16:41:35 2005 --- ./src/util/dict_open.c Thu Mar 17 11:33:02 2005 *************** *** 266,272 **** DICT *dict; if ((dict_name = split_at(saved_dict_spec, ':')) == 0) ! msg_fatal("open dictionary: need \"type:name\" form instead of: \"%s\"", dict_spec); dict = dict_open3(saved_dict_spec, dict_name, open_flags, dict_flags); --- 266,272 ---- DICT *dict; if ((dict_name = split_at(saved_dict_spec, ':')) == 0) ! msg_fatal("open dictionary: expecting \"type:name\" form instead of \"%s\"", dict_spec); dict = dict_open3(saved_dict_spec, dict_name, open_flags, dict_flags); *************** *** 284,289 **** --- 284,292 ---- DICT_OPEN_INFO *dp; DICT *dict; + if (*dict_type == 0 || *dict_name == 0) + msg_fatal("open dictionary: expecting \"type:name\" form instead of \"%s:%s\"", + dict_type, dict_name); if (dict_open_hash == 0) dict_open_init(); if ((dp = (DICT_OPEN_INFO *) htable_find(dict_open_hash, dict_type)) == 0)