Sieve vacation function not working..

Mike Eggleston mikeegg1 at mac.com
Fri Sep 28 12:25:45 EDT 2007


On Mon, 17 Sep 2007, Mike Eggleston might have said:

> On Mon, 17 Sep 2007, Torsten Schlabach might have said:
> 
> > Hi Joseph,
> > 
> > it would indeed be helpful if you posted the relevant section of your 
> > sieve script. Nevertheless, two hints which might hopefully be useful:
> > 
> > 1. Try to find out if anything in the chain between Sieve and your MTA 
> > might be the issue. The easiest way to do that is to try some rejecting 
> > with message or some forwarding as this will require Sieve to generate a 
> > new message and send it. In case that works, your Cyrus-MTA-Integration 
> > is probably not the problem. If that does not work either, check your 
> > MTA's log files for potential problems.
> > 
> > 2. If you find out that it looks as if Sieve is not creating any 
> > vacation response message at all, do you have the :address parameter set 
> > up and set up correctly? This parameter is technically optional, but the 
> > default value when omitting that parameter is *not* a wildcard. In other 
> > words: A vacation setup without any :address parameter will never create 
> > a vacation response message at all. (I think this could become an FAQ.)
> 
> My apologies for a seeming hijack of this thread. I have the same issue also.
> 
> The vacation portion of my sieve script is:
> 
> # load the necessary components
> # fileinto is for filtering
> # vacation is ... well ... just that
> 
> require ["fileinto", "vacation", "imapflags"];
> 
> # save a copy of inbound messages
> setflag "\\Seen";
> fileinto "INBOX.backup";
> removeflag "\\Seen";
> 
> # main filtering rules
> if header :contains "Subject" "testing vacation" {
> 	vacation :days 1 :subject "test vac" "I'm testing, ok?!";
> 	setflag "\\Answered";
> 	fileinto "INBOX.howard";
> } elsif address :contains ["to","from","cc","bcc"] ["@mac.com","admin15 at pointwise.com"] {
> ...
> }
> 
> I am transitioning my users from pop3 to imap4/cyrus. Currently I have most users
> on imap4 using a wierd mail route. The mail comes in, is sent to the pop3
> server, a crontab entry for each user pulls the mail with fetchmail, sends each
> message to procmail, and procmail eventually uses deliver.
> 
> I'm testing eliminating procmail for the internal sieve scripting on my account.
> I cannot eliminate fetchmail until all my users are migrated to imap4. This is
> just background data.
> 
> Currently my sieve works well for filing the various messages. As mentioned above I
> cannot get the vacation portion to work. When a message arrives with a subject
> of 'testing vacation' the message is filed into the folder 'howard' but not reply
> is received on the external, sending account. I have waited several days between
> messages to get around the ':days 1' parameter in the script above.
> 
> I have local6 sent to a separate file, though I do not see any extra messages.
> I am using the current rpms on fedora core 5.
> 
> I know sieve is working because my messages do get filed according to the full
> sieve script.

As mentioned I'm in a transition mode from POP3 to IMAP4 for my users. For
this transition mode I have fetchmail pulling mail from my legacy POP3 server
to the new IMAP4 server running cyrus. I now have vacation working by changing
the command in the $HOME/.fetchmailrc from:

is "mikee" mda "/usr/lib/cyrus-imapd/deliver -m '' -- mikee"

to:

is "mikee" mda "/usr/lib/cyrus-imapd/deliver -r %F -- mikee"

and the sieve script to:

if header :contains "Subject" "testing vacation" {
  vacation :days 1
    :addresses ["mikee@$DOMAIN.com", "admin@$DOMAIN.com", "webmaster@$DOMAIN.com", "postmaster@$DOMAIN.com", "root@$DOMAIN.com"]
    :subject "Automated Reply"
    "I am currently out of the office and will respond to your message when I return.";
  setflag "\\Answered";
  fileinto "INBOX.while-on-vacation";
} elsif

Seems like the '-r' is critical for deliver and sieve to know where the
message has come from so sieve and vacation know where to send the reply.
Also, the receiver's email must be in the ':addresses "MYEMAIL at DOMAIN.COM'
parameter to vacation.

I place the message into the =INBOX.while-on-vacation folder so I know what
I need to deal with when I return from vacation instead of hunting various
messages in my normal folders.

Mike


More information about the Info-cyrus mailing list