Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Sieve scripting on OS X Server 10.4.3 using avelsieve

All,

As noted elsewhere on the forums (and AFP548), the latest Tiger updater has fixed the problems many were having with Sieve scripts, particularly using the SquirrelMail plug-in avelsieve. Below is guide to getting this working if you're starting from scratch, something I see a number of people are asking for...

Prerequisites
===============
I have used the following setup on a fresh install of Mac OS X 10.4 Server, with the 10.4.3 Combo Update installed. I then added a user to the local netinfo domain as a test case, and along with the default admin account have enabled mail for these users - Note: Open Directory is not currently running.

Web, DNS, SMTP and IMAP/POP are all running, and SquirrelMail has been enabled in Web Services. SquirrelMail has been tested for the two users mentioned above, and both accounts log in correctly, displaying empty mail boxes.

To enable sieve scripts via Squirrelmail
========================================

1) If it doesn't already exist, create the following directory as root or using sudo from the Terminal;

% sudo mkdir -p /usr/sieve
% sudo chown cyrusimap /usr/sieve
% sudo chgrp wheel /usr/sieve

Directory permissions should then look like;

drwxr-xr-x 3 cyrusimap wheel 102 Nov 3 21:31 sieve

2) Add (or un-comment if it exists) the following line to the /etc/services file. To do this you either need to su to root (or use sudo) to edit the file using the Terminal.

sieve 2000/tcp # Sieve mail filtering

3) Stop the mail services from Server Admin.

4) On the Mail -> Settings -> Advanced tab, ensure you have IMAP set to allow 'PLAIN' as well as 'Clear' Authentication.

5) Start the mail services from Server Admin.

6) Run the following command using the Terminal, as any user;
% telnet localhost 2000

You should see the following output;

Trying ::1...
Connected to localhost.
Escape character is '^]'.
"IMPLEMENTATION" "Cyrus timsieved v2.2.12-OS X 10.4.0"
"SASL" "PLAIN"
"SIEVE" "fileinto reject envelope vacation imapflags notify subaddress relational comparator-i;ascii-numeric regex"
"STARTTLS"
OK

7)If you see this, your timsieved is working correctly. Use the escape character to leave the daemon, and quit telnet.

8) Download the most recent avelsieve distribution from the web page at http://email.uoa.gr/projects/squirrelmail/avelsieve_download.php. I used the more recent Dev Branch version: avelsieve-1.9.3.tar.gz, and haven't tested the earlier 1.0.1 version. If anyone has this working also, let me know.

9) Un-tar this in the squirrelmail plugins directory ( /usr/share/squirrelmail/plugins ), again as root or using sudo via the Terminal and cd into ( avelsieve/config/ ). Copy the example config 'config_sample.php' to 'config.php' IN THE SAME DIRECTORY (this is different from the V1.0.1 setup I believe). I didn't need to edit anything in the config.

10) Run the SquirrelMail config perl script, using sudo like so;
% sudo /etc/squirrelmail/config/conf.pl

Choose Option 8, "Plugins" from the menu, and enable "avelsieve" by selecting it from the resultant list. Save your changes and quit the utility.

11) Login in to one of the mail accounts using SquirrelMail, and the "Filters" menu should now be an option - choosing this allows you to create your sieve scripts, including a vacation mail 'auto-reply'.

12) Looking in the /usr/sieve/a/admin directory (for example) should show the following files;

lrwx------ 1 cyrusima wheel 12 Nov 4 11:41 defaultbc -> phpscript.bc
-rw------- 1 cyrusima wheel 232 Nov 4 11:42 phpscript.bc
-rw------- 1 cyrusima wheel 1056 Nov 4 11:42 phpscript.script

Please let me know comments and/or corrections, especially if you have achieved this differently.

Regards,

Ian Butler

Posted on Nov 4, 2005 7:09 AM

Reply
45 replies

Nov 4, 2005 12:09 PM in response to eXtremeSG

The issue of the /usr/sieve directory needing to be created in the first place seems strange - Apple now (with 10.4.3) adds the following to /etc/imapd.conf;

sievedir /usr/sieve

...so why, if that directory doesn't exist when the updater runs, doesn't it create it and set the correct permissions?

I can understand the updater leaving it alone if it already exists (and especially not changing permissions, since you may have user-editable files in that hierarcy and no intention of running avelsieve).

I hope that running Disk Tool's permission checking doesn't monkey with that folder in future!!

Anyhow, glad a couple of people have found this helpful within such a short time of me posting it...

Ian

Nov 29, 2005 1:37 AM in response to Ian Butler

This works great and I thank you for the information.
I have just 1 question.
After I set a up a Vacation message. when someone sends me a mail for the first time they get the auto reply. If they send s second mail while the rule is still enabled they get nothing? It's like the server remembers it has already sent a reply to that address and will not send another. This is not very helpful when you are sent mail from a shared computer because the second person will not get the vacation message. Is there any way around this? or is it my set up is incorrect?
any advice would be greatly appreciated

Nov 29, 2005 4:03 AM in response to Gary Mumford

Hey there,

The 'days: ' function of the vacation script controls how long an address will be remembered for - this is a feature of the script to prevent recipients getting bombarded with the same "I'm away' message over and over again.

You can change the number of days from the web client by editing the vacation message and changing;

Days: Reply message will be resent after [ 7 ] days

to something more suitable to your needs...

Regards,

Ian

Dec 21, 2005 11:29 AM in response to Ian Butler

Hi Ian,

I just wanted to post to the thread you started to say thanks for your excellent instructions.

We just purchased an XServe and all the email services were easy to setup based on the Mail Services Manual... I was not looking forward to setting up the highly requested by my users - Vacation Auto-Reply.

Your instructions were right on and easy to follow.

Thanks for taking the time to type that up.

Jerremy

Dec 22, 2005 5:21 AM in response to Ian Butler

Hey, it worked great! until I screwed it up... I tried putting in just my user name, instead of the whole address, and it seems to have really screwed it up... When I click on the filters link I get this:

ERROR:
Server responded with:
script errors:
line 19: address 'japruim': parse error, expecting `'@'
Please contact your administrator.


I tried reinstalling the sieve filtering.. But is there anyway I can fix this? I would love to be able to have a vacation plugin 🙂 Any help would be greatly appreciated!

Thanks!

Jan 11, 2006 7:29 AM in response to Ian Butler

First of all thanks for this perfect explanation on how to set up vacation messages, it really works great with our servers.

I just have one little question about it, is it normal it won't work on an OD master. On every server without od it works fine, today i've tried with an od and i've got strange script errors on top of the pages when adding a script and finally it won't work. Is there any solution for this .....


thnks
Roberto

Powerbook G4 Mac OS X (10.4.3)

Jan 11, 2006 8:06 AM in response to Roberto Leon

Aye, I second that thank you! I have implemented this on several servers, each time with almost no issue whatsoever.

To answer your question, yes, it should work on OD masters. Just about every server I set up is an OD master, and certainly all servers I've enabled avelsieve on were OD masters. What is the error message you're getting when you try to enter the filters page via squirrelmail?

The only issue that I've had (it's happened only once, and I cannot explain why it happened...), was that one of the users had an issue entering the filters page, and got a message saying that she could not connect to the timsieve daemon (or something to that effect–i've posted my fix in the forums). It was a simple permissions issue in the /usr/sieve directory for that particular user's script directory, and was quickly fixed. Other than that, sailing along wonderfully....

My only desire is for an Apple Mail and/or Outlook plugin for creating Vacation scripts without having to use squirrelmail 😉.

Sieve scripting on OS X Server 10.4.3 using avelsieve

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.