cyrus-imapd 2.1.15, sieve, lmtpd, and return-path header

Chris Stromsoe cbs at cts.ucla.edu
Tue Sep 23 04:02:35 EDT 2003


On Tue, 23 Sep 2003, Andrew Morgan wrote:

> I can't believe I'm wading into this discussion...  :)

:)

> It sounds to me like the return-path header should be added when the
> message is delivered to its final resting place.  When sieve is looking
> at the message, it hasn't been delivered yet.  A sieve script may decide
> to redirect the message or generate a bounce.  In that case, the
> return-path should not be added to the message because it has not
> reached its final destination.
>
> When lmtpd writes the message to disk, it is *delivered*.

Every message in the "stage." directory has a Return-Path header generated
by lmtpd.  When sieve rejects a message, it sends the file in the stage.
directory back to the user with the Return-Path header (and the other
generated headers) intact.  Redirecting looks like it does the same thing
(look at send_reject() and send_redirect() in lmtpd.c) -- it opens up
sendmail and sends the body of message in the stage. directory.

If the message on disk is the "delivered" message, the header cache should
contain all of the same headers.

> But where does return-path come from?  Somehow lmtpd knows how to
> generate that header, but it's not clear to me how it does it.
>
> What I'm getting at is, maybe it is possible to filter on some other
> header that is equivalent to return-path.

return-path is being built from the envelope from passed through in the
lmtp dialogue.



-Chris

> 	Andy
>
>




More information about the Info-cyrus mailing list