Skip navigation
This discussion is archived

Sieve scripting on OS X Server 10.4.3 using avelsieve

16942 Views 45 Replies Latest reply: Dec 19, 2006 2:59 PM by UptimeJeff RSS
  • Dale Walsh Calculating status...
    To make your life easier after running "mailbfr", stop mail, edit /etc/imapd.conf (with a suitable editor like BBEdit) and make the following changes/additions.

    annotation_db: skiplist
    duplicate_db: skiplist
    mboxlist_db: skiplist
    ptscache_db: skiplist
    seenstate_db: skiplist
    subscription_db: flat
    restart mail then restart the server.
    B&W G3 400 ~ Dual 1GHz G4 ~ Dual 2GHz G5, Mac OS X (10.4.1)
  • Justyn Pride Calculating status...
    I have a problem in that when I pico the services file, and add in the sieve line, the resulting file looks like this:

    tcp-id-port 1999/tcp # cisco identification port
    callbook 2000/udp # callbook
    callbook 2000/tcp # callbook
    # Devon Bowen
    sieve 2000/tcp # Sieve mail filtering
    wizard 2001/udp # curry

    All I get when I run telnet localhost 2000 is:

    Trying ::1...
    Connected to localhost.
    Escape character is '^]'.

    It just hangs and does nothing else. Can anyone shed any light on this? On the assumption that helpful guide in this forum is the best way to work with 10.4.5 can anyone shed any light please?


    Xserve, Mac OS X (10.4.5)
  • tknospdr Level 1 Level 1 (0 points)
    As far as I can tell, you only have to enable 'Plain'; however, is there a way that this can be accomplished WITHOUT enabling the 'Plain' and/or 'Clear' options for mail?

    I really don't like having those options turned on if I can help it. I know it's timesieved that has a problem with the auth is there a config file that will allow what I want?

  • Susan Daniell Level 1 Level 1 (0 points)
    I just installed Avelsieve 1.9.3 onto a 10.4.6 server as per your instructions.

    I get all the way to saving the script when I get an error message that says:

    Server responded with:
    NO "Unable to open script for writing (phpscript.script.NEW)"
    Please contact your administrator.

    Anyone have any suggestions?

    Xserve, Mac OS X (10.4.6)
  • ianmrobbo Calculating status...
    Ian, Thanks for this, Sieve is running a treat on Xserve 10.4.6, getting the users to switch the scripts off when they get back from vacation may need some work though!

    Anyway thanks

    G5 Xserve   Mac OS X (10.4.6)  
  • Paul Bailey4 Calculating status...
    I've used Mac OS X for quite some time and just started using Terminal in Mac OS X Server. I've been following your instructions and have a couple questions.

    I'm not sure how to check the Directory permissions you mention at the end of Line 1 using the Terminal.

    I was also wondering what command do I use to Add or Un-comment the /etc/service file you mention in Line 2.

    What syntex do I use to Un-tar Sieve in the squirrelmail plugins directory in Line 9.

    Your help would be greatly appreciated.
    Power Mac DP 2.7, Mac OS X (10.4.6)
  • Joseph Delaney Level 3 Level 3 (515 points)
    Paul, those are some very basic questions - I strongly suggest you practice on some unimportant things before tackling your mail configuration. Do a google search for some basic unix tutorials to get started, try a couple of sites to find a good one.

    But here's the immediate answers to your questions:

    1. To check the directory permissions, use the "ls" command with the "-l" option (those are the letter "ell", not "i" or one). The exact command is
    ls -l /usr/
    ls -ld /usr/sieve
    The first one will list all the folders in the /usr directory which might be too much, the second one will only list the sieve directory, but you need the extra "d" so that it shows the permissions of the directory itself instead of the contents of the directory.

    2. Use any text editor to comment or uncomment lines in a script. To turn something into a comment, put a "#" at the beginning of the line, to uncomment something just remove the #. "nano" is a simple text editor built into 10.4, so you could type "nano /etc/services" (you'll actually have to preface that with "sudo" ("sudo nano /etc/services") so that you get root permissions to edit the file).

    3. Use the "tar" command to un-tar things. Something like
    tar -vzxf avelsieve.tgz /usr/share/squirrelmail/plugins/
    but you have to change "avelsieve.tgz" to whatever the name of your downloaded file is, and you may need to specify the directory that it is in. You can also double-click a .tar or .tgz file (a "tarball") and the Finder will untar it, but then you need to use "mv" or "cp" to move or copy it to the right place.

    Again, look for a good basic unix tutorial. Also, for more detailed information on how to use any unix command, you can use the "whatis", "apropos" and "man" commands.

    "whatis" tells you (briefly) what a command does.
    whatis ls
    whatis tar

    "man" shows you the detailed instructions for the command (the manual), including the syntax and what all the options do (hit the space bar to scroll the text)
    man ls
    man tar

    And "apropos" is a method to search for commands that do something, so typing "apropos directory" would have shown you everything that can affect directories, including the "ls" command. You can use that when you don't know what command to use.

    iMac flat panel, 15   Mac OS X (10.4.2)  
  • Paul Bailey4 Level 1 Level 1 (0 points)

    I appreciate everything you have done so far. It has really helped me.

    I have come across a couple more questions that I hope you can answer.

    1. When I checked the directory permissions on /usr/sieve mine says: drwxr-xr-x 2 cyrusimap wheel ... Ian said that it should look like: drwxr-xr-x 3 cyrusimap wheel ... What is the difference between the 2 and 3.

    2. I get an error when I try to use tar on avelsieve-1.9.6.tar that says /usr/share/squirrelmail/plugins is not available in the archive. Here is the syntex that I used.

    sudo tar -vzxf avelsieve-1.9.6.tar /usr/share/squirrelmail/plugins

    so then I moved the file to the desktop and tried.

    sudo tar -vzxf /desktop/avelsieve-1.9.6.tar /usr/share/squirrelmail/plugins

    I've tried many difference source locations but always seem to get the error listed above.

  • Joseph Delaney Level 3 Level 3 (515 points)
    Sorry, I messed up the "tar" command. I forgot a "-C". You should have used

    sudo tar -vzxf avelsieve-1.9.6.tar -C /usr/share/squirrelmail/plugins

    But usually what I do is "cd" into the directory where I want the files to end up, then use tar without the destination, so it would look something like

    cd /usr/share/squirrelmail/plugins/
    sudo tar -vzxf ~/Desktop/avelsieve-1.9.6.tar

    This is part of the information you'll see if you type "man ls" (you might want to try )
    "If the -l option is given, the following information is displayed for
    each file: file mode, number of links, owner name, group name, number of
    bytes in the file, abbreviated month, day-of-month file was last modi-
    fied, hour file last modified, minute file last modified, and the path-

    So, according to that, the "2" and the "3" refer to the number of links, which translates roughly to the number of files inside that folder (some are hidden, "ls -a" shows them all). The "file mode" is the permissions, that's the first column "drwxr-xr-x"
    iMac flat panel, 15, Mac OS X (10.4.2)
  • Paul Bailey4 Level 1 Level 1 (0 points)

    That worked just fine.

    I'm happy to report that avelsieve is now setup and working just fine.
    Power Mac G5 DP 2.7, Mac OS X (10.4.6), Server
  • tknospdr Level 1 Level 1 (0 points)
    Still no ideas on what can be done so as not to require 'Plain' auth to be turned on?

  • tknospdr Level 1 Level 1 (0 points)
    I answered my own question by finally taking the time to read the config.php file myself.

    If you want your webmail to be a bit more secure and don't want to enable plain or clear...

    Change line 48 in config.php from:

    $sievepreferred_saslmech = 'PLAIN';


    $sievepreferred_saslmech = 'PLAIN CRAM-MD5';

    That's it, now you can sleep better at night, well at least I can anyway.

  • Simon Mclean1 Calculating status...
    just installed avelsieve 1.9.3 on 10.4.6 server as per your instructions - worked perfectly.

    many thanks.

  • tknospdr Level 1 Level 1 (0 points)
    To make your life easier after running
    "mailbfr", stop mail, edit /etc/imapd.conf
    (with a suitable editor like BBEdit) and make the
    following changes/additions.

    annotation_db: skiplist
    duplicate_db: skiplist
    mboxlist_db: skiplist
    ptscache_db: skiplist
    seenstate_db: skiplist
    subscription_db: flat
    restart mail then restart the server.

    Why, what will this do?


  • Joseph Delaney Level 3 Level 3 (515 points)
    That changes the database format that the Cyrus mail server uses.

    See for more information about why you may want to do this.
    intel iMac, Mac OS X (10.4.7)


More Like This

  • Retrieving data ...

Bookmarked By (0)

This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.