diff --git a/postfix/HISTORY b/postfix/HISTORY index d69c605c4..6834bb57a 100644 --- a/postfix/HISTORY +++ b/postfix/HISTORY @@ -9674,8 +9674,8 @@ Apologies for any names omitted. 20040826 Feature: support for systems with closefrom(), and emulation - for those without. Victor Duchovni, Morgan Stanley. Files: - util/sys_defs.h, util/sys_compat.c. + for those without. Andrew Brown. Files: util/sys_defs.h, + util/sys_compat.c. 20040827 @@ -9693,8 +9693,23 @@ Apologies for any names omitted. on to the SASL library. Victor Duchovni, Morgan Stanley. Files: smtp/smtp.c. smtp/smtp_sasl_glue.c, smtp/smtp_sasl_proto.c. +20040828 + + User interface: when no recipients are specified, the + Postfix sendmail command now terminates with status EX_USAGE + instead of accepting the mail first and bouncing it later. + This gives more direct feedback in case of a common client + configuration error. File: sendmail/sendmail.c. + +20040829 + + Portability: Solaris closefrom() support didn't work for + non-SUN compilers. Victor Duchovni, Morgan Stanley. + Open problems: + Low: scache & anvil should log cache peak sizes. + Low: update events.c so that 1-second timer requests do not suffer from rounding errors. This is needed for 1-second SMTP session caching time limits. diff --git a/postfix/RELEASE_NOTES b/postfix/RELEASE_NOTES index f81147f14..c5df8ee68 100644 --- a/postfix/RELEASE_NOTES +++ b/postfix/RELEASE_NOTES @@ -7,6 +7,15 @@ snapshot release). Patches are issued for the official release and change the patchlevel and the release date. Patches are never issued for snapshot releases. +Incompatible changes with snapshot Postfix-2.2-20040829 +======================================================= + +When no recipients are specified on the command line or via the -t +option, the Postfix sendmail command terminates with status EX_USAGE +and produces an error message instead of accepting the mail first +and bouncing it later. This gives direct more feedback in case of +a common client configuration error. + Major changes with snapshot Postfix-2.2-20040827 ================================================ diff --git a/postfix/makedefs b/postfix/makedefs index 717686ec8..8cedde2c1 100644 --- a/postfix/makedefs +++ b/postfix/makedefs @@ -124,6 +124,10 @@ case "$SYSTEM.$RELEASE" in 5.[0-4]) CCARGS="$CCARGS -DMISSING_USLEEP";; *) CCARGS="$CCARGS -DHAS_POSIX_REGEXP";; esac + # Solaris 9 added closefrom() + case $RELEASE in + 5.9*|5.[1-9][0-9]*) CCARGS="$CCARGS -DHAS_CLOSEFROM";; + esac # Work around broken str*casecmp(). Do it all here instead # of having half the solution in the sys_defs.h file. CCARGS="$CCARGS -Dstrcasecmp=fix_strcasecmp \ diff --git a/postfix/src/global/mail_version.h b/postfix/src/global/mail_version.h index 97a44f35e..9ca267e39 100644 --- a/postfix/src/global/mail_version.h +++ b/postfix/src/global/mail_version.h @@ -20,7 +20,7 @@ * Patches change the patchlevel and the release date. Snapshots change the * release date only. */ -#define MAIL_RELEASE_DATE "20040828" +#define MAIL_RELEASE_DATE "20040829" #define MAIL_VERSION_NUMBER "2.2" #define VAR_MAIL_VERSION "mail_version" diff --git a/postfix/src/sendmail/sendmail.c b/postfix/src/sendmail/sendmail.c index 35417ea6e..3db4f717b 100644 --- a/postfix/src/sendmail/sendmail.c +++ b/postfix/src/sendmail/sendmail.c @@ -506,6 +506,7 @@ static void enqueue(const int flags, const char *encoding, const char *sender, int skip_from_; TOK822 *tree; TOK822 *tp; + int rcpt_count = 0; enum { STRIP_CR_DUNNO, STRIP_CR_DO, STRIP_CR_DONT } strip_cr; @@ -604,6 +605,7 @@ static void enqueue(const int flags, const char *encoding, const char *sender, msg_fatal_status(EX_TEMPFAIL, "%s(%ld): error writing queue file: %m", saved_sender, (long) uid); + ++rcpt_count; } } tok822_free_tree(tree); @@ -723,12 +725,19 @@ static void enqueue(const int flags, const char *encoding, const char *sender, msg_fatal_status(EX_TEMPFAIL, "%s(%ld): error writing queue file: %m", saved_sender, (long) uid); + ++rcpt_count; } argv_free(state.recipients); argv_free(state.resent_recip); vstring_free(state.temp); } + if (rcpt_count == 0) + msg_fatal_status(EX_USAGE, (flags & SM_FLAG_XRCPT) ? + "No recipient addresses found in message header" : + "Recipient addresses must be specified on" + " the command line or via the -t option"); + /* * Identify the end of the queue file. */ diff --git a/postfix/src/util/sys_defs.h b/postfix/src/util/sys_defs.h index 9391e2f9e..e56739801 100644 --- a/postfix/src/util/sys_defs.h +++ b/postfix/src/util/sys_defs.h @@ -311,10 +311,6 @@ extern int opterr; #define HAS_VOLATILE_LOCKS #define BROKEN_READ_SELECT_ON_TCP_SOCKET -#if SOLARIS >= 20900 || (SOLARIS < 10000 && SOLARIS >= 209) -#define HAS_CLOSEFROM -#endif - /* * Allow build environment to override paths. */