[Dovecot] Sieve vacation not working
I've been trying all night to get vacation working in my .dovecot.sieve file. The way our email works is we have one account on dovecot which serves my mail and my wife's and we use procmail and sieve to put the emails in different folders depending on who it's for. I'm trying to set up a vacation reply on my wife's email address (aaaaaaaa@optus* below) so people can update to her new address.
Here's my file with the email addresses masked:
require ["fileinto", "vacation"]; if address :is "to" "xxxxxxxxxxxxxxx@ozemail.com.au" { fileinto "Phill_OzEmail_Folder"; stop; } elsif address :is "to" "yyyyyyyyyyyyyyyyy@optusnet.com.au" { fileinto "Phill_Optus_Folder"; stop; } elsif address :matches "to" "aaaaaaaa@optus*" { vacation "Please update my email address to bbbbbbbbb@exemail.com.au"; fileinto "Sarah_Optus_Folder"; stop; } else { keep; stop; }
The problem I'm having is that no auto-replies are sent. I removed .dovecot.lda-dupes and that didn't help; so then I touched it and now it's a 0 byte file and that didn't help. There is no dovecot.sieve.err file and I can't see anything in /var/log/dovecot.log which gives any message about why this wouldn't work.
The emails to aaaaaaa@optus* get filed into the right folder so I know the matching is working.
I've also tried a reject recipe and that worked fine, so I know that it can send an email if it chooses to.
So it's a complete black box mystery as to why it just won't send a reply.
Regards, Phill
Phill Edwards wrote:
So it's a complete black box mystery as to why it just won't send a reply.
You did not specify what version of Dovecot and Sieve you are using, but, considering the lack of log messages, I am assuming it is CMUSieve. Please do indicate your setup.
According to the sources, the CMUSieve plugin will refuse to autorespond in the following situations:
The message contains a "List-Id" [RFC2919], "List-Help", "List-Subscribe", "List-Unsubscribe", "List-Post", "List-Owner" or "List-Archive" [RFC2369] header field.
The message has an "Auto-submitted" header field with a value other than "no".
The message has a "Precedence" header field with one of the following values: list, bulk, junk
There is no address to respond to, i.e. empty envelope from: no -f parameter for deliver and no Return-Path header (placed by MTA) in the message.
The sender address is the address of the user this script is running for (sender == recipient) or it is one of the addresses specified in the :addresses parameter.
The sender address is a system address, starting with 'MAILER-DAEMON', 'LISTSERV', 'majordomo', or 'owner-', or containing '-request@'.
The message is not explicitly addressed to the user nor to one of the addresses specified in the :addresses parameter. No automatic responses will be generated for implicitly delivered messages: the recipient or one of the provided addresses must be found in the to, cc, bcc, resent-to, resent-cc or resent-bcc headers of the message.
Unfortunately, CMUSieve does not indicate which condition is triggered and the vacation action is silently discarded.
Regards,
Stephan.
According to the sources, the CMUSieve plugin will refuse to autorespond in the following situations:
Thanks Stephan. It is indeed the CMU Sieve plugin (sorry for not pointing that out). I saw those conditions the wiki somewhere and I don't believe any of the conditions are met, though perhaps I need to check the mail headers more to be absolutely certain.
Is the Dovecot Sieve plugin more lenient/easier to use and would it be worth giving it a try? I can't remember the exact version of Dovecot I'm running until I go home to check, but I'm pretty sure it's < 1.2 which is why I'm using CMU Sieve.
Regards, Phill
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hi Phill,
I know this won't help much, but I can tell you that we have vacation with cmusieve (CentOS package dovecot-sieve-1.1.6-9.el5) working with dovecot (1.1.7-0_84.el5) without any problems.
An example how we use it:
require ["vacation"]; vacation :days 1 :subject "Auto-reply: Out of office" :addresses ["patrick.nagel@example.com"] "I'm out of office until 2009-07-08"
Good luck!
Patrick.
STAR Software (Shanghai) Co., Ltd. http://www.star-group.net/ Phone: +86 (21) 3462 7688 x 826 Fax: +86 (21) 3462 7779
PGP key: E883A005 https://stshacom1.star-china.net/keys/patrick_nagel.asc Fingerprint: E09A D65E 855F B334 E5C3 5386 EF23 20FC E883 A005 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAkpTF48ACgkQ7yMg/OiDoAWDbACfdXTZ/UteCE/XcoMXPtr//es4 2tgAn3DBoFDmdYiYGcVci7LZnQeujDgA =h6h+ -----END PGP SIGNATURE-----
I know this won't help much, but I can tell you that we have vacation with cmusieve (CentOS package dovecot-sieve-1.1.6-9.el5) working with dovecot (1.1.7-0_84.el5) without any problems.
Thanks for the info. My versions are dovecot-1.1.4-0_81 and dovecot-sieve-1.1.6-9. Perhaps I need to do some upgrading - though I somehow doubt that's the problem.
Regards, Phill
According to the sources, the CMUSieve plugin will refuse to autorespond in the following situations:
Thanks Stephan. It is indeed the CMU Sieve plugin (sorry for not pointing that out). I saw those conditions the wiki somewhere and I don't believe any of the conditions are met, though perhaps I need to check the mail headers more to be absolutely certain. In most cases in which vacation fails, the sender envelope address is not known. This can be caused by a missing return-path header, but (when
Phill Edwards wrote: the return-path header is not used) also by a missing -f parameter for deliver. So it is not always a message header problem. Alternatively, the message could have been sent with a null sender address '<>', but that is usually done only by automated e-mail responders.
Is the Dovecot Sieve plugin more lenient/easier to use and would it be worth giving it a try? I can't remember the exact version of Dovecot I'm running until I go home to check, but I'm pretty sure it's < 1.2 which is why I'm using CMU Sieve. It will at least provide you with an informative log message on why no vacation response is sent. Better log/error messages for administrators and users is one of the new implementation's main goals. So, it will most probably help you finding the issue. It is however not more lenient regarding the restrictions of the vacation action and, being the author, I cannot really claim that the new Sieve is easier to use than the old CMUSieve. It should be anyway :)
Regards,
Stephan
According to the sources, the CMUSieve plugin will refuse to autorespond in the following situations
Here are the headers of an email that I believe should have triggered an auto-reply but didn't (with email addresses and names masked for privacy). I don't see any headers here that should prevent vacation from auto-replying.
Return-Path: <1staddress@gmail.com> X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on ash.edwards.home X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VERIFIED autolearn=failed version=3.2.5 Received: from mail-pz0-f200.google.com (mail-pz0-f200.google.com [209.85.222.200]) by mail14.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id n67CEnCM028116 for <2ndaddress@optusnet.com.au>; Tue, 7 Jul 2009 22:14:53 +1000 Received: by pzk38 with SMTP id 38so1578688pzk.23 for <2ndaddress@optusnet.com.au>; Tue, 07 Jul 2009 05:14:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=6QSMfQcM9Jx/F5SCN90TkKETpHxtUkMGGvtoTjT/stM=; b=IWFsqmBGzHGv+nhcHcgjGFRVzpHWlztUfd/kG00d3sYltw6vB8AEzlGY0XdRbN724+ 2KmxoYsvjAndbKwLeAnIpBTA1hXTp2DenGTa8HUqiqfzRP7+bbTzfPZBFF8r90n9i7YZ 1E6mQmemrdPNZ2q5uGEcglajxMZKeIdgc1OaQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=IlCr6qHtsPkykHQ6NeusuIO2uSDTv0Zm3bYtOeE7PHZGm/D7+9a9+sq85MsW1tlaL3 Jvo6LOZha+fDq680ElEW282jIUl7gHmoIt/THLa8v84WWHQEpfGXtx/Ihv31MpqLPUXW i664bd+xJXBsa2uq8Su6ePeb50+Iev9qb8P1k= MIME-Version: 1.0 Received: by 10.142.226.1 with SMTP id y1mr1758836wfg.298.1246968889443; Tue, 07 Jul 2009 05:14:49 -0700 (PDT) Date: Tue, 7 Jul 2009 22:14:49 +1000 Message-ID: <c92a75980907070514i72368d29ub6061ae977d50ea6@mail.gmail.com> Subject: Automails reply properly if set up correctly #2 From: Me <1staddress@gmail.com> To: "You" <2ndaddress@optusnet.com.au> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit
Unfortunately, CMUSieve does not indicate which condition is triggered and the vacation action is silently discarded.
Yes - that is indeed unfortunate; it makes it just about impossible to debug. If I was using the dovecot sieve plugin would that have better logging so I could find out what's going on?
Regards, Phill
Folks, I'm really sorry. It turns out I'm just an idiot. I hadn't put anything in the :addresses field. As soon as I put the recipient's email address in there it all started working. Something like this:
:addresses ["2ndaddress@optusnet.com.au"]
I hadn't realised you had to do that and I'd seen examples which didn't use it, but I guess I should have tried it before wasting everyone's time.
Sorry again. Hopefully this will help someone in the future with a similar issue.
Regards, Phill
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
On Tue, 7 Jul 2009, Phill Edwards wrote:
Sorry again. Hopefully this will help someone in the future with a similar issue.
Frankly the restriction with :addresses bugs me, too. I would prefer selecting conditions with surrounding code.
Bye,
Steffen Kaiser -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux)
iQEVAwUBSlNC43WSIuGy1ktrAQIrBwf+LVut88xaS6UoYtTlW+zCy7Yt7roJ8eij XZWftDraTwX4MlilITEx4aUsenO96ZnVHW137GsG7U7J08UobH7Epag94H94I3KG 0h6vV6Rq0oQENQR1stPt8+ODsmayYL4VmMUnkWI3BOWQR2+OhoZN68XuvX/unl1g JvCBvp+iL25FShTYLrNtvr3HR/QxKLLpAgzDyHbxmeLQ5hCWVzgbXQbVgwLfiEba PYQCN84zF42zh2kEqHpKWpGaohhNRO9cjHE7uPK9mw5RLwKc1ohdW6N/M88m+bFO BrnRK14nH8T8JbsJT1n9frsfsHYm3wcwndhp/FFMsgo3ChOj6qLMPw== =6gTx -----END PGP SIGNATURE-----
It only works without :addresses for me
And even when getting this on confirmation the logs:
Feb 24 09:03:52 localhost dovecot: lmtp(7895, a1@dum.li): yeIlOfjN61TXHgAA0J78UA: sieve: msgid=<451bb443b8ad815c205a2cce07ac31aec0727c47@vm-atmail7>: sent vacation response to <a2@dum.li>
It wasn't working.
This did the trick on CentOS 7 though:
alternatives --set mta /usr/sbin/sendmail.exim
Cheers
participants (5)
-
Marcelo
-
Patrick Nagel
-
Phill Edwards
-
Steffen Kaiser
-
Stephan Bosch