Hello, we're implementing a dovecot 1.2.1 with sieve 0.1.7 and managesieve 0.11.7. We're having problems with creating sieve scripts so that vacation works. Our script looks like this: require ["fileinto", "vacation"]; if address :matches ["To", "Cc"] "*someone at example.com*" { if not header :matches "X-Spam-Status" "Yes*" { vacation :days 1 :subject "test" "autoresponder test."; keep; } } And when sent and delivered to someone at example.com, we get this in the log: dovecot: deliver(username): sieve: msgid=<...>: discarding vacation response for message implicitly delivered to <username at fqdn.hostname.com> Our final recipients are in the form of username at fqdn.hostname.com; it looks like this is being matched in sieve as address. But we want to match against original recipient address, not address after alias expansion. Any ideas? -- Jure Pe?ar http://jure.pecar.org http://f5j.eu
Jure Pe?ar schreef:> Hello, > > we're implementing a dovecot 1.2.1 with sieve 0.1.7 and managesieve 0.11.7. > We're having problems with creating sieve scripts so that vacation works. > > Our script looks like this: > > require ["fileinto", "vacation"]; > > if address :matches ["To", "Cc"] "*someone at example.com*" { > if not header :matches "X-Spam-Status" "Yes*" { > vacation > :days 1 > :subject "test" > "autoresponder test."; > keep; > } > } > > And when sent and delivered to someone at example.com, we get this in the log: > > dovecot: deliver(username): sieve: msgid=<...>: discarding vacation response for message implicitly delivered to <username at fqdn.hostname.com> > > Our final recipients are in the form of username at fqdn.hostname.com; it looks like this is being matched in sieve as address. But we want to match against original recipient address, not address after alias expansion. > > Any ideas?Currently, you need to add all allowed aliases to the :addresses argument of the vacation command. My TODO list contains a new feature that lets you extract additional valid aliases directly from a dictionary (e.g. an SQL database). It is not at the top of my TODO list yet, but since you are not the only one needing this, I'll give it some more priority. Regards, -- Stephan Bosch stephan at rename-it.nl
On Fri, 2009-08-07 at 15:01 +0200, Jure Pe?ar wrote:> And when sent and delivered to someone at example.com, we get this in the log:..> Our final recipients are in the form of username at fqdn.hostname.com; it looks like this is being matched in sieve as address. But we want to match against original recipient address, not address after alias expansion.Is it really necessary for you to change the address like that? I think that's going to mess up other tests too. I think deliver should eventually be called with: deliver -a someone at example.com -d username at fqdn.hostname.com Then vacation and everything works correctly. Can you configure your MTA to do that? deliver/dovecot-auth could also internally do the someone at example.com -> username at fqdn.hostname.com translation in userdb lookup. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20090807/daa7eb10/attachment-0002.bin>