OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
PATCH: broken postsuper -r in 20051128

From: Wietse Venema (wietseporcupine.org)
Date: Fri Dec 02 2005 - 10:50:49 CST


Jim Knuth:
> Hello,
>
> below is the error message after postsuper -r ALL
>
> --snip
> warning: A38B2153F: message rejected: malformed attribute:missing
> '=' after attribute name: notify_flags
> warning: maildrop/3B6AD837F: internal protocol error
> --snap

The code move for "smtpd_end_of_data_restrictions" broke DSN
support with "postsuper -r".

This problem exists only in snapshot 20051128 (Postfix 2.2.6
has no DSN support).

        Wietse

*** ./pickup.c- Mon Nov 28 13:40:54 2005
--- ./pickup.c Fri Dec 2 11:44:00 2005
***************
*** 203,208 ****
--- 203,210 ----
      int time_seen = 0;
      char *attr_name;
      char *attr_value;
+ char *saved_attr;
+ int skip_attr;
  
      /*
       * Limit the input record size. All front-end programs should protect the
***************
*** 254,265 ****
              if (type == REC_TYPE_ERTO)
                  /* Discard errors-to record after "postsuper -r". */
                  continue;
! if (type == REC_TYPE_ATTR
! && split_nameval(vstring_str(buf),
! &attr_name, &attr_value) == 0
! && dsn_attr_map(attr_name) == 0)
                  /* Discard other/header/body action after "postsuper -r". */
! continue;
          }
  
          /*
--- 256,271 ----
              if (type == REC_TYPE_ERTO)
                  /* Discard errors-to record after "postsuper -r". */
                  continue;
! if (type == REC_TYPE_ATTR) {
! saved_attr = mystrdup(vstring_str(buf));
! skip_attr = (split_nameval(saved_attr,
! &attr_name, &attr_value) == 0
! && dsn_attr_map(attr_name) == 0);
! myfree(saved_attr);
                  /* Discard other/header/body action after "postsuper -r". */
! if (skip_attr)
! continue;
! }
          }
  
          /*