David Berard
2010-Apr-09 01:05 UTC
[Dovecot] Dovecot-sieve vacation proposal, use address in addresses as recipient
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Dovecot list, In my setup I have several email addresses that uses same account. When I set a vacation the answer is not necessarily send from the destination address. I propose to use the addresses found in addresses (if one match) as From address in vacation reply. I've made a little patch who do that [1]. Best regards. [1] http://polymorf.fr/files/nfrance/cmd-vacation.patch - -- David BERARD - ------------------------------------------------- contact(at)davidberard.fr GPG|PGP KeyId 0xC8533354 GPG|PGP Key http://davidberard.fr/C8533354.gpgkey - ------------------------------------------------- * No electrons were harmed in * * the transmission of this email * -----BEGIN PGP SIGNATURE----- iEYEARECAAYFAku+fUoACgkQOL7fhchTM1TJmACfdQcfgrSqNbjvWTEXrTc7Twly M70An2Nzb2MFby9ARHM1Ys93wGzuRYHy =yaLh -----END PGP SIGNATURE-----
Timo Sirainen
2010-Apr-19 14:59 UTC
[Dovecot] Dovecot-sieve vacation proposal, use address in addresses as recipient
On Fri, 2010-04-09 at 03:05 +0200, David Berard wrote:> I propose to use the addresses found in addresses (if one match) > as From address in vacation reply. > > I've made a little patch who do that [1].Stephan will probably do something about this, but until then: Your patch uses memory in a way that could cause a buffer overflow and break things. This really isn't safe to do:> + sprintf(recipient, "%s", my_address);I'm not sure if there's an easy way to fix it. Don't go writing to const pointers anyway. :) Probably should be something like: _contains_my_address(.., const char **recipient_r) { .. *recipient_r = my_address; // instead of sprintf .. } -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20100419/7b35b899/attachment-0002.bin>
Stephan Bosch
2010-Apr-19 21:46 UTC
[Dovecot] Dovecot-sieve vacation proposal, use address in addresses as recipient
Timo Sirainen wrote:> On Fri, 2010-04-09 at 03:05 +0200, David Berard wrote: > > >> I propose to use the addresses found in addresses (if one match) >> as From address in vacation reply. >> >> I've made a little patch who do that [1]. >>Ok, I've implemented the desired functionality: http://hg.rename-it.nl/dovecot-1.2-sieve/rev/1a9b3c3a4fdf http://hg.rename-it.nl/dovecot-2.0-pigeonhole/rev/cb4c3ce31192 Now I'm wondering.. should this be configurable/optional? Regards, Stephan.