The sieve-extprograms extension strips Return-Path headers before passing mail off to the external program. The patch to remove this behavious is trivial (and attached), but since it appears to be deliberate I felt I should investigate further.
I believe this is basically a cut-and-paste error. The code to strip Return-Path has been there since the sieve-pipe plugin for Dovecot 1.x, and I believe it was copied from the equivalent code in the 'redirect' action for passing mail off to sendmail(8). In that case, stripping Return-Path is correct, since the message is being resubmitted for delivery (by SMTP or otherwise), and the last step of the new delivery will (should) add a new Return-Path header with the new envelope information. In the case of sieve-extprograms, though, the filtering is happening post-delivery, so a stripped Return-Path will never be replaced.
Ben