Today is my first day with sieve, so be gentle :) I'm trying to set up a pretty webmail interface to our Dovecot 1.2.4 server using roundcube. The managesieve config + roundcube 'managesieve' plugin work fine, and I'm able to use roundcube's UI to generate .dovecot.sieve files. We use winbind + LDAP lookups to do some exotic mail rewriting... ultimately user.name at domain.com gets rewritten to 'ar-cloh at localhost', and in /home/AD/ar-cloh/.dovecot.sieve there is only this: require ["vacation"]; # rule:[gdh_test] if anyof (header :contains "Subject" "test") { vacation "test away"; } When I send an email to the user, I see this in the mail.log Oct 19 15:39:43 ar-smtp-1 dovecot: deliver(ar-cloh): sieve: msgid=<1255963176.14420.31.camel at gdh-work>: discarding vacation response for message implicitly delivered to <ar-cloh at ar-smtp-1> I don't understand; sending a vacation for implicitly-delivered messages sounds exactly like what I want - is there any way to say 'do this anyway' ? gdh
On 10/19/2009 05:03 PM Gavin Hamill wrote:> Today is my first day with sieve, so be gentle :) I'm trying to set up a > pretty webmail interface to our Dovecot 1.2.4 server using roundcube. > The managesieve config + roundcube 'managesieve' plugin work fine, and > I'm able to use roundcube's UI to generate .dovecot.sieve files. > > We use winbind + LDAP lookups to do some exotic mail rewriting... > ultimately user.name at domain.com gets rewritten to 'ar-cloh at localhost', > and in /home/AD/ar-cloh/.dovecot.sieve there is only this: > > require ["vacation"]; > # rule:[gdh_test] > if anyof (header :contains "Subject" "test") > { > vacation "test away"; > } > > When I send an email to the user, I see this in the mail.log > > Oct 19 15:39:43 ar-smtp-1 dovecot: deliver(ar-cloh): sieve: > msgid=<1255963176.14420.31.camel at gdh-work>: discarding vacation response > for message implicitly delivered to <ar-cloh at ar-smtp-1> > > I don't understand; sending a vacation for implicitly-delivered messages > sounds exactly like what I want - is there any way to say 'do this > anyway' ? > > gdh >You are missing the 'addresses:' list in your vacation script. See http://wiki.dovecot.org/LDA/Sieve#Vacation_auto-reply-1 for more details. Regards, Pascal -- The trapper recommends today: fabaceae.0929217 at localdomain.org
Gavin wrote:> Postfix receives mails in firstname.lastname at domain.com format, and does > an LDAP lookup to Active Directory to determine the 'flastname' > login-name format (for delivery to /home/AD/flastname/Maildir/). > > It would then seem that we'd need a method to do a reverse lookup at > Dovecot's 'deliver' time and determine the valid To: addresses from > LDAP. Does this sound vaguely possible without major engineering work?I have exactly the same problem, though with a slightly different setup. Ubuntu 8.04 LTS Dovecot 1.2.6 Sieve 0.1.12 Postfix 2.5.1 OpenExchange 6.12.0.0-5 I'm currently evaluating software for an upgrade to our hosting platform and postfix/dovecot is the current solution in testing. As this is currently a test system I'm in a position to seriously mess around with things to try and find a solution. The solution is not necessarily in dovecot, but may require changes in postfix config or perhaps use of procmail or some other delivery mechanism in place of deliver. I can't rely on changes in the client as we need to be open enough to permit the user to choose the mail client. We have multiple domains hosted on the same system. Users are stored in LDAP to allow use of a single account for multiple access methods and software solutions. Usernames are in the format user at domain (effectively the email address) to provide simplicity for the user and differentiation of different users with the same names in different domains. So we have exactly the same issue - vacation responses appear from user-domain at hostservername. If there's no way around this it's going to mean looking for another solution, which is a real shame as postfix/dovecot does everything else I need absolutely perfectly (including shared mailbox folders with ACL/IMAP_ACL) quickly and cleanly with a minimum of configuration nightmares, and it's a killer waste of time to have to start evaluation of other solutions for such a minor flaw. I've found two workarounds so far; it's possible to pass ORIGINAL_RECIPIENT to deliver using postfix but this then causes problems with messages to system aliases; if there's a group alias on the system the response will apparently come from the group alias and not the individual, this is regardless of any "address:" value in the sieve script. Alternatively it's possible to specify "from:" in the sieve script but this assumes you have a client that's configured to do this. To date, I haven't found one that does. So this means either living with the system group alias problem, manual editing, or a hack involving a script that checks for changed sieve scripts and updates them with the appropriate "from:" value in the vacation stanza. I find it really hard to believe that Gavin and I are the only ones to hit this issue. That said I've probably been hacking at this particular system too long and am missing something very obvious....! Peter. -----Original Message----- From: dovecot-bounces+dovecot=peter-b.org at dovecot.org [mailto:dovecot-bounces+dovecot=peter-b.org at dovecot.org] On Behalf Of Gavin Hamill Sent: 19 October 2009 19:13 To: Dovecot Mailing List Subject: Re: [Dovecot] simple steps with sieve On Mon, 2009-10-19 at 17:59 +0200, Pascal Volk wrote:> The :addresses argument accepts only additional mail addresses that a > user might have. (http://tools.ietf.org/html/rfc5230#section-4.5) > Which of your users has the address *doe@*? ;-) > I believe there is no wildcard support. In my opinion wildcard addresses > would also make no sense.OK now I understand...> > I'm just trying to reduce the migration pain on behalf of the users > > whose current experience with Outlook is Tools -> Out of Office -> > > Enable. > > Hm, I can't find Outlook in the repos. :-DHa :) Work with me here; I'm trying to pull people /away/ from the beast so the experience needs to be as drool-proof as possible as people leave their comfort zone :) gdh
I've been looking at various client fixes to add :from, but ultimately the better solution would be in sieve/managesieve as although I have a single webmail solution I'm also offering imap access. A really simple solution (for me) would be for sieve to copy the :address to :from. I may even implement this as a hack and recompile... Still doesn't fix responses to expanded system aliases. That's a whole different problem though, I suspect. Peter. -----Original Message----- From: dovecot-bounces+dovecot=peter-b.org at dovecot.org [mailto:dovecot-bounces+dovecot=peter-b.org at dovecot.org] On Behalf Of Gavin Hamill Sent: 22 October 2009 11:03 To: Stephan Bosch Cc: 'Dovecot Mailing List' Subject: Re: [Dovecot] simple steps with sieve On Tue, 2009-10-20 at 17:34 +0200, Stephan Bosch wrote:> Peter Borg wrote: > > I find it really hard to believe that Gavin and I are the only ones tohit> > this issue. That said I've probably been hacking at this particularsystem> > too long and am missing something very obvious....! > > > You're definitely not the only one. Finding a good solution is difficult > however. The intention of this check within the vacation action is to > prevent spurious vacation responses to for example Bcc:'ed deliveries > (and perhaps multi-drop aliases).For my own situation, I solved this issue entirely from the 'roundcube' webmail package. Help on the roundcubeforums site suggested changes to the 'sieverules' plugin so :addresses would always be included in a vacation rule. I extended this to the :from parameter. Also used roundcube's new_user_identity plugin to populate the primary identity of a 'ar-wbim' username with 'wim.bim at ourdomain.com' so that the :from and :addresses are using the canonical format Fairly ugly, but it works for us. I'll document the changes if I get a moment. Cheers, Gavin.