On Sun, Jan 16, 2011 at 07:41:22PM -0500, Joan Moreau wrote:

> I have the following error using postfix 2.8.0-RC1
>
> Jan 17 01:38:36 server postfix/smtp[5807]: warning: unexpected attribute 
> rewrite_context from smtp socket (expecting: log_ident)
> Jan 17 01:38:36 server postfix/smtp[5807]: warning: deliver_request_get: 
> error receiving common attributes
> Jan 17 01:38:36 server postfix/smtp[5805]: warning: unexpected attribute 
> rewrite_context from smtp socket (expecting: log_ident)
> Jan 17 01:38:36 server postfix/smtp[5805]: warning: deliver_request_get: 
> error receiving common attributes

Did you stop the server before upgrading? The qmgr<-->delivery agent
protocol has changed...

--- 2.7.2/src/postfix/src/global/deliver_request.c      2010-06-02 
02:20:44.183800285 -0400
+++ 2.8.0/src/global/deliver_request.c  2011-01-16 16:38:39.250251332 -0500
@@ -28,9 +28,10 @@
 /*             char    *sasl_method;
 /*             char    *sasl_username;
 /*             char    *sasl_sender;
+/*             char    *log_ident;
 /*             char    *rewrite_context;
-/*             char   *dsn_envid;
-/*             int     dsn_ret;
+/*             char    *dsn_envid;
+/*             int     dsn_ret;
 /* .in -5
 /*     } DELIVER_REQUEST;
 /*
@@ -202,6 +203,7 @@
     static VSTRING *sasl_method;
     static VSTRING *sasl_username;
     static VSTRING *sasl_sender;
+    static VSTRING *log_ident;
     static VSTRING *rewrite_context;
     static VSTRING *dsn_envid;
     static RCPT_BUF *rcpt_buf;
@@ -227,6 +229,7 @@
        sasl_method = vstring_alloc(10);
        sasl_username = vstring_alloc(10);
        sasl_sender = vstring_alloc(10);
+       log_ident = vstring_alloc(10);
        rewrite_context = vstring_alloc(10);
        dsn_envid = vstring_alloc(10);
        rcpt_buf = rcpb_create();
@@ -259,9 +262,10 @@
                  ATTR_TYPE_STR, MAIL_ATTR_SASL_USERNAME, sasl_username,
                  ATTR_TYPE_STR, MAIL_ATTR_SASL_SENDER, sasl_sender,
     /* XXX Ditto if we want to pass TLS certificate info. */
+                 ATTR_TYPE_STR, MAIL_ATTR_LOG_IDENT, log_ident,
                  ATTR_TYPE_STR, MAIL_ATTR_RWR_CONTEXT, rewrite_context,
                  ATTR_TYPE_INT, MAIL_ATTR_RCPT_COUNT, &rcpt_count,
-                 ATTR_TYPE_END) != 21) {
+                 ATTR_TYPE_END) != 22) {
        msg_warn("%s: error receiving common attributes", myname);
        return (-1);
     }
@@ -286,6 +290,7 @@
     request->sasl_method = mystrdup(vstring_str(sasl_method));
     request->sasl_username = mystrdup(vstring_str(sasl_username));
     request->sasl_sender = mystrdup(vstring_str(sasl_sender));
+    request->log_ident = mystrdup(vstring_str(log_ident));
     request->rewrite_context = mystrdup(vstring_str(rewrite_context));
     request->dsn_envid = mystrdup(vstring_str(dsn_envid));
     request->dsn_ret = dsn_ret;
@@ -322,9 +327,9 @@
      * queue, and releases the lock before starting deliveries from that
      * file. The queue manager does not lock the file again when reading more
      * recipients into memory. When the queue manager is restarted, the new
-     * process moves files from the active queue to the incoming queue to cool
-     * off for a while. Delivery agents should therefore never try to open a
-     * file that is locked by a queue manager process.
+     * process moves files from the active queue to the incoming queue to
+     * cool off for a while. Delivery agents should therefore never try to
+     * open a file that is locked by a queue manager process.
      * 
      * Opening the queue file can fail for a variety of reasons, such as the
      * system running out of resources. Instead of throwing away mail, we're
@@ -375,6 +380,7 @@
     request->sasl_method = 0;
     request->sasl_username = 0;
     request->sasl_sender = 0;
+    request->log_ident = 0;
     request->rewrite_context = 0;
     request->dsn_envid = 0;
     return (request);
@@ -415,6 +421,8 @@
        myfree(request->sasl_username);
     if (request->sasl_sender)
        myfree(request->sasl_sender);
+    if (request->log_ident)
+       myfree(request->log_ident);
     if (request->rewrite_context)
        myfree(request->rewrite_context);
     if (request->dsn_envid)

-- 
        Viktor.

Reply via email to