[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cyrus and sieve: how to setup?



Erik Steffl <steffl@bigfoot.com> writes:

>   1) the only implementation of sieve in debian that I found is
> undocumented progam called sieve in mailutils - is that the one to use?
> if not, which one should I use?

If the imapd.conf option `sieveusehomedir' is true, cyrus will look in
your home directory for your .sieve file. If that option is on, that's
where it'll look. If it's off, then you have to put the .sieve file in a
central directory defined at compile time (I think it's
/var/lib/cyrus/sieve/username or something like that). Get sieve working
out of your home directory first before embarking on the centralized
thing.

There are timsieved and installsieve programs that offer client/server
tools to allow users to install their sieve files in the central
place. These are optional; you can use any method you want to get the
files to the central place.

>   2) how do I setup sieve to filter email? I see no hooks in cyrus and
> have no idea who would invoke sieve. I have found nothing in cyrus docs
> (does not mention sieve at all). I even have IMAP book (Managing IMAP by
> Dianna & Kevin Mullet, O'Reilly) and it is VERY vague about who and how
> invokes sieve and how it works with imap server).

As long as the sieve file is there (i.e., ~/.sieve or
/central/file/name), it just works. But, if you have any syntax errors
in the file at all, the file is ignored and everything is delivered to
your inbox.  RFC 3028 describes the sieve language, as does
http://www.cyrusoft.com/sieve/.

Here is an excerpt from my .sieve:

------------------------------------------------------------------------
require "fileinto"; 
require "envelope";
require "vacation";

if header :contains "subject" "vactest" {
	vacation :addresses ["dave@rudedog.org"] "I am on vacation";
}

if header :contains "subject" ["snort daily report","AIDE report","EFFector"] {
	fileinto "INBOX";
} elsif header :contains "subject" "[Auth_ldap]" {
	fileinto "INBOX.auth_ldap";
} elsif header :contains "subject" "[Galeon-user]" {
	fileinto "INBOX.Galeon";
} elsif address :all :contains ["To","Cc","Bcc"] "debian-user@lists.debian.org" {
	fileinto "INBOX.Debian.user";
} elsif header :contains "subject" "Bug#" {
	fileinto "INBOX.Debian.bugs";
} elsif not address :all :contains ["To","Cc","Bcc"] "dave@rudedog.org" {
	fileinto "INBOX.Spam";
}
------------------------------------------------------------------------

>   3) why is debian package so old? there are new versions of cyrus
> available (even new major version - debian package is still at 1.5 even
> though the upstream is at 2). there are also old unresolved bugs on
> cyrus - anybody knows what's going on? Is there a problem with new
> cyrus? is it being packaged? (sieve is included in newer versions so I
> guess it would help me to solve the above)

It's very complicated to package and there isn't a lot of interest in it
(why, I don't know; Cyrus is an awesome mail server). I know how
complicated it is to package, because I maintain an in-house .deb
package for my work, and that package is no where near the level of
quality needed for an official debian package.

-- 
Dave Carrigan (dave@rudedog.org)            | Yow! There's a SALE on STRETCH
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-DNS | SOCKS down at the "7-11"!!
Seattle, WA, USA                            | 
http://www.rudedog.org/                     | 



Reply to: