On 2014-01-29 Patrick Domack wrote:
Been working with postfix 2.11 that added support for multi
recipient-delimiters. I also messed around with dovecot to make it
function there also, and figured, I shouldn't leave amavis out of the
loop. Here is a patch that I believe is fully functional to update
it's support.

@@ -4807,10 +4807,10 @@
   my $extension; local($1,$2);
   if ($localpart =~ /^(postmaster|mailer-daemon|double-bounce)\z/i) {
     # do not split these, regardless of what the delimiter is
-  } elsif ($delimiter eq '-' && $owner_request_special &&
+  } elsif (index($delimiter,'-')>=0 && $owner_request_special &&
            $localpart =~ /^owner-.|.-request\z/si) {
     # don't split owner-foo or foo-request
-  } elsif ($localpart =~ /^(.+?)(\Q$delimiter\E.*)\z/s) {
+  } elsif ($localpart =~ /^(.+?)([\Q$delimiter\E].*)\z/s) {
($localpart, $extension) = ($1, $2); # extension includes a delimiter # do not split the address if the result would have a null localpart
   }
@@ -15112,7 +15112,7 @@
-        $ext = $delim . $ext;
+        $ext = substr($delim,0,1) . $ext;

Thank you, makes sense, adding this to the final 2.9.0.

  Mark

Reply via email to