Patrick Nagel
2008-May-27 04:07 UTC
[Dovecot] Sieve plugin changes 'To' header on redirect
Hi, I'm a bit confused by the fact that the 'To' header is being modified by sieve when a message is being redirected. RFC3028 states in chapter 4.3:> The "redirect" action is used to send the message to another user at > a supplied address, as a mail forwarding feature does. The > "redirect" action makes no changes to the message body or existing > headers, but it may add new headers. The "redirect" modifies the > envelope recipient.(see http://www.ietf.org/rfc/rfc3028.txt) The situation here is as follows: I'm sending a mail to "city at company.net" (To: ...), which is being delivered to "city at city.company.net" (Delivered-To: ...). User city has the following sieve script: redirect "other at company.net"; keep; One would expect, that the 'To:' header is identical in both mails, but instead I get something like this: Mail in 'city' mailbox:> Delivered-To: city at city.company.net > To: city at company.net > Subject: test mail(Redirected) Mail in 'other' mailbox:> Delivered-To: other at city.company.net > To: city at city.company.net > Subject: test mailIt seems as if sieve uses the 'Delivered-To' header as the 'To' header in the redirected mail - which is not what I need. Am I misunderstanding something here, or does dovecot's sieve plugin not act according to the RFC? Patrick. -- STAR Software (Shanghai) Co., Ltd. http://www.star-group.net/ Phone: +86 (21) 5427 7799 x 826 Fax: +86 (21) 6485 0071 PGP key: https://stshacom1.star-china.net/keys/patrick_nagel.asc Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. URL: <http://dovecot.org/pipermail/dovecot/attachments/20080527/b602a658/attachment-0002.bin>
Steffen Kaiser
2008-May-27 07:17 UTC
[Dovecot] Sieve plugin changes 'To' header on redirect
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tue, 27 May 2008, Patrick Nagel wrote:> One would expect, that the 'To:' header is identical in both mails, but > instead I get something like this: > > Mail in 'city' mailbox: >> Delivered-To: city at city.company.net >> To: city at company.net >> Subject: test mail > > (Redirected) Mail in 'other' mailbox: >> Delivered-To: other at city.company.net >> To: city at city.company.net >> Subject: test mail > > It seems as if sieve uses the 'Delivered-To' header as the 'To' header in the > redirected mail - which is not what I need.Sieve does not mangle the message, I suspect that you have configured the MTA to mangle / update / correct the headers. Sieve sents the mail using the sendmail binary (or its emulation of your MTA). In Dovecot v1.0: sendmail -i -f <<return-path>> -- <<forward_to_address>> - -i lets the binary ignore single-line-dots - -f sets the sender address Bye, - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFIO7WYVJMDrex4hCIRAmE3AJ4wxOJNq0BlctzaoppqHOymk3fyJwCfTZw6 p3Mjrbx/39zocMyl4ZIKokw=UVng -----END PGP SIGNATURE-----