[KLUG Members] cyrus imap working
Peter Buxton
members@kalamazoolinux.org
Sun, 24 Aug 2003 17:20:22 -0400
On Mon, Aug 11, 2003 at 11:38:35AM -0400, Dirk H Bartley was only escaped
alone to tell thee:
> Sieve is really beginning to aggravate me. I am having a hell of a
> time with it and am not succeeding in finding a good website with
> examples and explanations of syntax.
>
> Does altnamespace make a difference?? I took off INBOX. at the
> beginning of each destination and some things seem to go where I want
> them and others do not. I am also getting email in more than one box.
> It's somewhat frustrating.
As I recall, when I used Cyrus 2.x on my home box, I did not use
altnamespace.
/* This is a short list of Sieve extensions to aid memory:
* fileinto reject envelope vacation imapflags
* notify subaddress relational regex
* This 'require' will insure the extensions are present and loaded.
*/
require ["fileinto","reject","vacation"] ;
/* This uses the vacation extension to remind people to update their
* address books. This block will not save the message in any way, thus
* simplifying the main delivery block below. Note that before you use
* this feature you had better have updated ALL your incoming mailing
* lists unless you like being the target of listmasters' just wrath.
*
* Note the period that closes the email message, followed by the
* semicolon to close the 'vacation ... text:' statement. The 'reject'
* action is identical.
*/
if address :domain :is ["To","CC"] "killdevil.ath.cx"
{
vacation :subject "New domain for killdevil.ath.cx"
text:
This is an automatic reply.
For future reference, please note that killdevil.ath.cx is now killdevil.org.
Your message has been forwarded.
Thank you.
.
;
}
/* This comment block serves no purpose. */
/* THE MAIN (and only) DELIVERY BLOCK
*
* Most of these destinations are pretty self-explanatory. But note how
* these six if...elsif...else statements are mutually exclusionary.
* That saves a lot of mental effort. Basically, I expect every message
* to fit one of these catagories. Since the last conditional has no
* conditions (i.e., it is always true) it will always be executed
* UNLESS one of the previous conditions has been met.
*/
if address :domain :is ["To","CC"] ["kalamazoolinux.org","kazoolug.org"]
{
fileinto "INBOX.klug" ;
}
elsif address :domain :matches ["To","CC"] ["linuxdoc.org","*.tldp.org"]
{
fileinto "INBOX.ldp" ;
}
elsif address :localpart :is ["To","CC"] "continuing-time"
{
fileinto "INBOX.c-time" ;
}
/* Note I will end up with mail BCCed to me in my Spam box, but that's
* not a heavily used feature. (I used this trick with procmail, as
* well.) Also note that these boxes are case-sensitive.
*
* Also note the position of the Spam directive. It is before the
* default targets, but after the mailing lists. Important.
*/
elsif not address :localpart :contains ["From","To","CC"]
["peter","somercet","root","postmaster"]
{
fileinto "INBOX.Spam" ;
}
/* Note the 'stop' action in this block. That means I never see the mail.
*/
elsif address :all :is "From" "luser@annoyed.com"
{
reject text:
Hello, this is the vacation(1) program, a super product of the Sirius
Cybernetics Corporation family of happy software! Your message would
normally be drop-kicked through the marketing department as soon as
Happy Hour is over, but new, cutting-edge advances in Time Therapy have
made Happy Hour neverending!
A copy of your message has NOT been archived.
Share and Enjoy!
.
;
stop ;
}
/* As you can see, only unprefiled mail is marked as 'keep', because
* 'keep' isn't very discriminating as to where it is kept, unlike
* 'fileinto'.
*
* But that's it.
*/
else
{
keep ;
}
--
-26
Power tools for power fools.