Subject: | [PATCH] Handle multi-line responses from plugins (Re: smtp-forward plugin) (fwd) |
Date: | Thu, 16 Mar 2006 10:28:16 -0500 (EST) |
To: | bugs-qpsmtpd [...] rt.perl.org |
From: | Charlie Brady <charlieb [...] budge.apana.org.au> |
Show quoted text
---------- Forwarded message ----------
Date: Wed, 15 Mar 2006 12:01:54 -0500 (EST)
From: Charlie Brady <charlieb-qpsmtpd@budge.apana.org.au>
To: qpsmtpd@perl.org
Subject: [PATCH] Handle multi-line responses from plugins (Re: smtp-forward
plugin)
On Thu, 2 Mar 2006, Charlie Brady wrote:
> The second problem is that Qpsmtpd::SMTP doesn't do the right thing with
> multiline responses from plugins. If a response has any embedded newlines,
> it should do a split on newlines before calling response().
>
> run_hooks() allows plugins to return an array, but Qpsmtpd::SMTP discards
> all but the first item on the list, and therefore doesn't pass the array to
> response().
Both issues dealt with in the attached patch (against 0.32).
These changes are required for a fully working smtp-forward plugin, as we wish
to faithfully relay responses from the backend SMTP server. The also allow
plugins to be more verbose in replies.
---
Charlie
Message body is not shown because sender requested not to inline it.