[Dovecot] PATCH missing Return-Path in message (was Re: SEGV with Dovecot v1.0.0 Deliver and cmusieve v1.0.1 and vacation)
Steffen Kaiser
skdovecot at smail.inf.fh-bonn-rhein-sieg.de
Fri Jun 1 17:01:10 EEST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, 26 Apr 2007, Steffen Kaiser wrote:
Hello,
after digging in the CMU Sieve lib sources, I found where the problem
stems from.
Somehow (I don't know why) in
dovecot-sieve-1.0.1/src/libsieve/script.c:671
/* first, let's figure out if we should respond to this */
ret = makehash(hash, a->u.vac.send.addr,
a->u.vac.send.msg);
u.vac.send.addr is NULL.
Although, in dovecot-sieve-1.0.1/src/libsieve/bc_eval.c:256
I get the impression that this error handled by silently skipping
vacation, if no return-path is available. It didn't happened for me. BTW:
I want to have those replys ;-)
The reason is that by default sendmail does not pass forth Return-Path to
the MDA and Dovecot deliver does not use the -f option for this reason.
The attached patch changes this by leting deliver_get_return_address()
return any information available:
str = mail_get_first_header(mail, "Return-Path");
if(!str)
str = envelope_sender != DEFAULT_ENVELOPE_SENDER
? envelope_sender /* -f option */
: mail_get_first_header(mail, "From"); /* That's not the
most correct one, but alas */
The problem still exists, if neither of the three information is
available, but, well ... .
Now, vacation is working.
Bye,
- --
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBRmAmqC9SORjhbDpvAQKR9gf/W3rEkHaJwAfyMU4aMFyHy7i9W/zQQhQE
s9fNfnyk+SDUbjkeDn+XmBSItVZf4PCY0DrdINzSiN6HVCBvekyWDyYN4dag9PB5
SGY1GEriApZYWloZXt6BMDjxHVu0mw74Zq1OhlwURHIWxUF2Fw2ryxEIIfgrsOgg
pOC97nItWkN2zG7xFPDymZZ+n4q2CPV5U4Qslwp/XawDShk9v4j7oZPf9jbwZdjB
w1n3t0t9VTanX16hpT27u7sdyO7Z5U3a1SovLGYmAK1nCk1ApfTNSLdtEErS+qQu
BdVluHsL1AWUs8966UajBHBiHN1Nqq5KctNbYvOXM97WiqceVm/8gA==
=JhgQ
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deliver_returnpathFromFOption.patch.gz
Type: application/octet-stream
Size: 656 bytes
Desc:
Url : http://dovecot.org/pipermail/dovecot/attachments/20070601/d368c9fd/attachment.obj
More information about the dovecot
mailing list