cyrus-imapd 2.1.15, sieve, lmtpd, and return-path header
    Pat Lashley 
    patl+cyrus at volant.org
       
    Mon Sep 22 21:30:51 EDT 2003
    
    
  
--On Monday, September 22, 2003 18:08:23 -0700 Chris Stromsoe 
<cbs at cts.ucla.edu> wrote:
> 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 user+detail at domain 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
    
    
More information about the Info-cyrus
mailing list