sandmant--- via Postfix-users:
> I am updating a system from postfix-2.10.1 to postfix-3.5.9 (and 
> RHEL7->RHEL9), and it seems my forward_path is no longer getting processed 
> correctly.
> 
> postconf shows the correct forward_path:
> 
>   root@rt2:/etc/postfix-auth> postconf -c /etc/postfix-auth/ forward_path
> 
>   forward_path = $home/.forward${recipient_delimiter}${extension}+auth, 
> $home/.forward${recipient_delimiter}${extension}, 
> $home/.forward${recipient_delimiter}auth, $home/.forward
> 
> but the local agent chooses $home/.forward, even though a previous file 
> ($home/.forward${recipient_delimiter}auth) exists:
> 

This is a rare and unexpected compatibility break.

In such a case, it would be reasonable for Postfix to use the
configured recipient_delimiter value, especially if that is the
default value, instead of trying to use the empty recipient_delimiter
value that was derived from the email message.

        Wietse

20231026

        Bugfix: forward_path compatibility break when a recipient
        address has no recipient delimiter. Reported by Tod A.
        Sandman. Files: proto/postconf.proto, local/local_expand.c.

diff '--exclude=man' '--exclude=html' '--exclude=README_FILES' 
'--exclude=INSTALL' '--exclude=.indent.pro' -r -bur 
/var/tmp/postfix-3.9-20231024/proto/postconf.proto ./proto/postconf.proto
--- /var/tmp/postfix-3.9-20231024/proto/postconf.proto  2023-10-08 
15:17:57.000000000 -0400
+++ ./proto/postconf.proto      2023-10-26 15:57:28.860195914 -0400
@@ -1781,7 +1781,9 @@
 <dt><b>$recipient_delimiter</b></dt>
 
 <dd>The address extension delimiter that was found in the recipient
-address (Postfix 2.11 and later), or the system-wide recipient
+address (Postfix 2.11 and later), or the 'first' delimiter specified
+with the system-wide recipient address extension delimiter (Postfix
+3.5.22, 3.5.12, 3.7.8, 3.8.3), or the system-wide recipient
 address extension delimiter (Postfix 2.10 and earlier). </dd>
 
 <dt><b>${name?value}</b></dt>
diff '--exclude=man' '--exclude=html' '--exclude=README_FILES' 
'--exclude=INSTALL' '--exclude=.indent.pro' -r -bur 
/var/tmp/postfix-3.9-20231024/src/local/local_expand.c 
./src/local/local_expand.c
--- /var/tmp/postfix-3.9-20231024/src/local/local_expand.c      2014-12-06 
20:35:33.000000000 -0500
+++ ./src/local/local_expand.c  2023-10-26 15:37:34.361968574 -0400
@@ -138,6 +138,8 @@
     } else if (STREQ(name, "recipient_delimiter")) {
        rcpt_delim[0] =
            local->state->msg_attr.local[strlen(local->state->msg_attr.user)];
+       if (rcpt_delim[0] == 0)
+           rcpt_delim[0] = var_rcpt_delim[0];
        rcpt_delim[1] = 0;
        return (rcpt_delim[0] ? rcpt_delim : 0);
 #if 0
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to