From what I can tell, ...
While there may not be much call to match against the last-hop received header (unless maybe you want to take different actions depending on the origin of mail from different remote last-hop LMTP mta's), there is interest (at least here) for being able to filter on return-path.
Can't you get what you want using the "envelope" extension?
Here's a fragment from my sieve script; dealing with filing messages from this mailing list into my INBOX.cyrus.imapd mailbox:
# The envelope capability allows comparisons of the envelope addresses require "envelope" ;
# The fileinto capability allows delivery to other mailboxes require "fileinto" ;
# The subaddress capability allows matching on the individual parts # of a [EMAIL PROTECTED] style address. require "subaddress" ;
if envelope :detail "to" "cyrus" { if envelope :localpart :is "from" "owner-info-cyrus" { fileinto "INBOX.cyrus.imapd" ; } elsif envelope :localpart :is "from" "owner-cyrus-sasl" { fileinto "INBOX.cyrus.sasl" ; } else { # INBOX.cyrus isn't a mailbox; so if we can't figure out # which sub-mailbox to file it in, send it to my main inbox # where I'll be annoyed enough to fix the script... fileinto "INBOX.DEBUG" ; } }
-Pat