Postfix 2.0 Patch 12 available (urgent)

[email protected] (Wietse Venema) Wed, 11 Jun 2003 12:23:31 -0400 (EDT)
Newsgroups gmane.mail.postfix.announce
Message-ID <20030611162331.37A02BC072__43385.2667025805$1055349034@spike.porcupine.org>
Patch 12 fixes things that broke with Patch 11:

- Stricter smtpd input checks rejected invalid addresses starting with @.

- Stricter postdrop input checks broke "sendmail -bs".

The patch is small enough for email distribution and is enclosed below.
A fully patched version of Postfix source code is available via 

    ftp://ftp.porcupine.org/mirrors/postfix-release/index.html

Soon to appear on the mirror sites listed at http://www.postfix.org/

	Wietse

Prereq: "2.0.11"
diff -cr /tmp/postfix-2.0.11/src/global/mail_version.h ./src/global/mail_version.h
*** /tmp/postfix-2.0.11/src/global/mail_version.h	Mon Jun  9 20:14:36 2003
--- ./src/global/mail_version.h	Wed Jun 11 11:48:45 2003
***************
*** 20,29 ****
    * Patches change the patchlevel and the release date. Snapshots change the
    * release date only, unless they include the same bugfix as a patch release.
    */
! #define MAIL_RELEASE_DATE	"20030609"
  
  #define VAR_MAIL_VERSION	"mail_version"
! #define DEF_MAIL_VERSION	"2.0.11"
  extern char *var_mail_version;
  
   /*
--- 20,29 ----
    * Patches change the patchlevel and the release date. Snapshots change the
    * release date only, unless they include the same bugfix as a patch release.
    */
! #define MAIL_RELEASE_DATE	"20030611"
  
  #define VAR_MAIL_VERSION	"mail_version"
! #define DEF_MAIL_VERSION	"2.0.12"
  extern char *var_mail_version;
  
   /*
diff -cr /tmp/postfix-2.0.11/HISTORY ./HISTORY
*** /tmp/postfix-2.0.11/HISTORY	Mon Jun  9 20:10:52 2003
--- ./HISTORY	Wed Jun 11 11:54:25 2003
***************
*** 7811,7818 ****
  
  20030609
  
! 	Workaround: Solaris non-blocking socket read() may hang.
! 	Leandro Santi. File: smtpd/smtpd.c.
  
  Open problems:
  
--- 7811,7823 ----
  
  20030609
  
! 	Workaround: Solaris blocking socket read() may hang.  Hernan
! 	Perez Masci and Leandro Santi. File: smtpd/smtpd.c.
! 
! 20030612
! 
! 	Bugfix: the stricter postdrop input filter broke "sendmail
! 	-bs". Found by Lutz Jaenicke. File: smtpd/smtpd.c.
  
  Open problems:
  
diff -cr /tmp/postfix-2.0.11/src/smtpd/smtpd.c ./src/smtpd/smtpd.c
*** /tmp/postfix-2.0.11/src/smtpd/smtpd.c	Mon Jun  9 20:09:18 2003
--- ./src/smtpd/smtpd.c	Wed Jun 11 11:51:34 2003
***************
*** 710,716 ****
       * Report trouble. Log a warning only if we are going to sleep+reject so
       * that attackers can't flood our logfiles.
       */
!     if ((arg->strval[0] == 0 && !allow_empty_addr) || arg->strval[0] == '@') {
  	msg_warn("Illegal address syntax from %s in %s command: %s",
  		 state->namaddr, state->where, STR(arg->vstrval));
  	err = "501 Bad address syntax";
--- 710,716 ----
       * Report trouble. Log a warning only if we are going to sleep+reject so
       * that attackers can't flood our logfiles.
       */
!     if (arg->strval[0] == 0 && !allow_empty_addr) {
  	msg_warn("Illegal address syntax from %s in %s command: %s",
  		 state->namaddr, state->where, STR(arg->vstrval));
  	err = "501 Bad address syntax";
***************
*** 848,857 ****
      /*
       * Record the time of arrival and the sender envelope address.
       */
!     rec_fprintf(state->cleanup, REC_TYPE_TIME, "%ld",
! 		(long) time((time_t *) 0));
!     if (*var_filter_xport)
! 	rec_fprintf(state->cleanup, REC_TYPE_FILT, "%s", var_filter_xport);
      rec_fputs(state->cleanup, REC_TYPE_FROM, argv[2].strval);
      if (encoding != 0)
  	rec_fprintf(state->cleanup, REC_TYPE_ATTR, "%s=%s",
--- 848,859 ----
      /*
       * Record the time of arrival and the sender envelope address.
       */
!     if (SMTPD_STAND_ALONE(state) == 0) {
! 	rec_fprintf(state->cleanup, REC_TYPE_TIME, "%ld",
! 		    (long) time((time_t *) 0));
! 	if (*var_filter_xport)
! 	    rec_fprintf(state->cleanup, REC_TYPE_FILT, "%s", var_filter_xport);
!     }
      rec_fputs(state->cleanup, REC_TYPE_FROM, argv[2].strval);
      if (encoding != 0)
  	rec_fprintf(state->cleanup, REC_TYPE_ATTR, "%s=%s",