martin f krafft
2007-Aug-08 11:25 UTC
[Dovecot] lda: vacation auto-reply for a virtual address
Hi, I am using Dovecot to manage a complex virtual mailbox setup. It's all working splendidly, thanks to the Dovecot LDA. This morning, however, I needed to create a vacation-style autoreply for one of the virtual addresses. I made use of cmusieve, authored a little sieve script, and had it working in no time... until I discovered how limited sieve's vacation module is. Most importantly: it's hardcoded to use the Return-Path of a message, but in this very case, I need to actually use the address in the from header. So I had to give up on sieve and am now looking for another solution, but without much success. Given that mail is delivered by the Dovecot LDA, is there any way to make deliver pass it off to e.g. procmail in such a way that $HOME is set to /srv/vmail/domain.org/localpart, so that procmail can find the .procmailrc? Cheers, -- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net at madduck "we are trapped in the belly of this horrible machine, and the machine is bleeding to death." -- godspeed you black emperor! spamtraps: madduck.bogus at madduck.net -------------- next part -------------- A non-text attachment was scrubbed... Name: digital_signature_gpg.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature (see http://martin-krafft.net/gpg/) URL: <http://dovecot.org/pipermail/dovecot/attachments/20070808/80d8933c/attachment-0002.bin>
Steffen Kaiser
2007-Aug-08 12:58 UTC
[Dovecot] lda: vacation auto-reply for a virtual address
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Wed, 8 Aug 2007, martin f krafft wrote:> until I discovered how limited sieve's vacation module is. Most > importantly: it's hardcoded to use the Return-Path of a message, but > in this very case, I need to actually use the address in the fromWhat's the reason of not using Return-Path? When it is missing, you can search the archives for a patch of mine, that uses the -f argument in this case. -> And the reply, why NOT to use From for sending replies ;-)> Given that mail is delivered by the Dovecot LDA, is there any way to > make deliver pass it off to e.g. procmail in such a way that > $HOME is set to /srv/vmail/domain.org/localpart, so that procmail > can find the .procmailrc?Of course, you could patch Dovecot LDA. It is rather straight forward. Another idea is to setup your MTA to deliver each mail to two maildrops, traditionally this is called ".forward" files, because in sendmail you can create a file ".forward" in the user's homedir and put all the mail forwards there, e.g.: \account "|vacation -a alias1 -a alias2 account" \account is necessary to file the mail into the local maildrop (INBOX), too; otherwise it would only run vacation and trash the mail afterwards. But, such program will normally use Return-Path as well. Bye, - -- Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQEVAwUBRrm93C9SORjhbDpvAQICgggA3WbNxr5nrhigaJHa/Vk71YXdHNOeueC8 QCngSQ2ErSXR4ixAqMiSevDA7T1y3VKsRE2X41OAJunxxoFFliSeIGRvjBh2pCoG iv0UbWiLkLP5WspQqmRMR2mm3q9wZsy2geQiTtWvYArPMTbJoIMvRZz2TyFoqixU jMfMMHMPTBCniVjpwH93XQtzXAcQHp0cllfGSvP8wdI8Ja/wNIE8sg37g6JQ1gKF JXo13e0y0jIrBr+tVWbQjycXJ6YI9J6QTVyN/yphQ3za4igftWjXHRFD2OBdiT+q llNbNHCIemsQuvQVjJ2L7QSkW1kN/xq7xP2zb/vtGUK4iXOVkyMzpg==oW4A -----END PGP SIGNATURE-----