Tom,
Look in the sieve directory (sievedir in imapd.conf, I think) for the
script you uploaded. You may need to create a symlink there to
"default", like so:

ln -s /usr/sieve/j/julesa/default.script /usr/sieve/j/julesa/default

I don't know why it doesn't create the symlink automatically, but
sometimes it doesn't, at least in my setup. 

Tyrone,
Check this for your vacation problem as well...

I wrote a quick little Perl script to go through all the users and fix
this - it is a hack in the worst way but it works for me:

#!/usr/bin/perl
# fixsieve
# We found a bug in cyrus where users who have created sieve scripts
# find their scripts don't work because the system needs a symlink
# from the script file to something called "default" and the link
# isn't always created automatically
# 
# so this script goes through all the directories and creates those
# symlinks where they haven't been created yet.

# create a log file in the temp directory
`> /tmp/fixsieve.log`;
# get a list of all the sieve directories
@dirs = `find /usr/sieve -type d -print`;

# go through the list one by one
foreach $dir( @dirs ) {
    chomp $dir;
    # get a list of files in the current Sieve directory
    my @files = `ls -1 $dir`;

    my $scriptfound = 0;
    my $linkfound = 0;

    # see whether the script file and/or symlink exist in the directory
    foreach $file( @files ) {
        chomp $file;
        if( $file eq "default" ) {
            $linkfound = 1;
        } elsif ( $file eq "default.script" ) {
            $scriptfound = 1;
        }
    }

    # create the symlink if it doesn't already exist
    if( $scriptfound && !$linkfound ) {
        `cd $dir; ln -s default.script default`;
        `echo "added link to $dir/default.script\n" >>/tmp/fixsieve.log`
    }
}





On Tue, 2002-02-19 at 10:25, T Churchward wrote:
> I am trying to get sieve to work with postfix without any luck so far.  The
> timsieved process starts okay and I am able to use sieveshell to load a
> script to the server.  I have compiled the sieve 'test' program that comes
> with the imap server and run it against my script - no errors are reported
> so it seems the script is okay.
> 
> >From reading various earlier posting to the group I need to use the lmtp
> delivery mechanism.  The LMTP readme delivered with postfix was my first
> port of call.  I'm using the postfix's mailbox_transport with UNIX domain
> sockets to deliver mail to the Cyrus imap server this all works very nicely.
> However my sieve scripts are ignored completely.
> 
> If anyone could lend a hand it would be greatly appreciated!
> 
> thanks in advance
> 
> Tom Churchward
> 
> 
> 
> 
> 
> Config files follow:-
> =====================
> 
> postfix files:
> --------------
> 
> ========= start of main.cf ===========
> 
> mailbox_transport = lmtp:unix:public/lmtp
> 
> 
> 
> 
> 
> =========sart of master.cf ===========
> 
> lmtp      unix  -       -       n       -       -       lmtp
> #
> # Interfaces to non-Postfix software. Be sure to examine the manual
> # pages of the non-Postfix software to find out what options it wants.
> # The Cyrus deliver program has changed incompatibly.
> #
> #cyrus    unix  -       n       n       -       -       pipe
>   #flags=R user=cyrus argv=/usr/cyrus/bin/deliver -e -m ${extension} ${user}
> 
> 
> 
> 
> 
> cyrus imap files:
> -----------------
> 
> ========start of cyrus.conf ===========
> 
> START {
>   # do not delete these entries!
>   mboxlist      cmd="ctl_mboxlist -r"
>   deliver       cmd="ctl_deliver -r"
> 
>   # this is only necessary if using idled for IMAP IDLE
> #  idled                cmd="idled"
> }
> 
> # UNIX sockets start with a slash and are put into /var/imap/sockets
> SERVICES {
>   # add or remove based on preferences
>   imap          cmd="imapd" listen="imap" prefork=0
>   pop3          cmd="pop3d" listen="pop3" prefork=0
>   sieve         cmd="timsieved" listen="sieve" prefork=0
> 
>   # LMTP is required for delivery
>   #lmtpunix     cmd="lmtpd" listen="/var/imap/socket/lmtp" prefork=0
>   lmtpunix      cmd="lmtpd" listen="/var/spool/postfix/public/lmtp"
> prefork=1
> }
> 
> EVENTS {
>   # this is required
>   checkpoint    cmd="ctl_mboxlist -c" period=30
> 
>   # this is only necessary if using duplicate delivery suppression
>   delprune      cmd="ctl_deliver -E 3" period=1440
> }
> 
> 
> === start of imapd.conf =========
> 
> configdirectory: /var/imap
> partition-default: /data03/imap
> admins: cyrus
> sasl_pwcheck_method: sasldb
> sendmail: /usr/sbin/sendmail
> 


Reply via email to