put the following line in /etc/imapd.conf #sieveusehomedir: 1
and restarted cyrus-imapd and this didn't go over very well
Feb 1 00:16:08 linuxserver sieve[17242]: can't use home directorieses Feb 1 00:16:37 linuxserver master[17145]: process 17253 exited, status 75 Feb 1 00:16:37 linuxserver master[17145]: service sieve pid 17253 in BUSY state: terminated abnormally
OK - I'll byte - what's the trick? I'm finding that using sieve inside the mystery that is cyrus is clumsy and was thinking that if I could park the sieve files in home directories, things might be more manageable.
I was thinking that this might be a clue... Feb 1 00:14:06 linuxserver lmtpunix[17213]: IOERROR: not a sieve bytecode file /home/craig/.sieve
but this came before the other
Any clues?
Craig
Craig White wrote:
put the following line in /etc/imapd.conf #sieveusehomedir: 1
and restarted cyrus-imapd and this didn't go over very well
Feb 1 00:16:08 linuxserver sieve[17242]: can't use home directorieses Feb 1 00:16:37 linuxserver master[17145]: process 17253 exited, status 75 Feb 1 00:16:37 linuxserver master[17145]: service sieve pid 17253 in BUSY state: terminated abnormally
OK - I'll byte - what's the trick? I'm finding that using sieve inside the mystery that is cyrus is clumsy and was thinking that if I could park the sieve files in home directories, things might be more manageable.
I was thinking that this might be a clue... Feb 1 00:14:06 linuxserver lmtpunix[17213]: IOERROR: not a sieve bytecode file /home/craig/.sieve
but this came before the other
Any clues?
Maybe premissions? Remember, cyrus is not running as root, and unlike some other IMAP implementations, doesn't need to run as root. If you store anything in user's home directory, that file must be accessible by cyrus user. For the second problem, I guess you'd need to byte-compile your sieve script prior to placing it into .sieve. Dunno how to do that.
Anyhow, I've been using Sieve for some time now, no problems. I'm not using anything in user's home directories (I've let Cyrus keep sieve scripts in his store, and installed smartsieve for script management), and had no problems with it so far. The only place where I allow Cyrus to interact with local accounts is password checking (where applicable, if there are local user accounts). This would make moving Cyrus IMAPD to dedicated (accountless) machine very simple.
Hm, thinking of it, theoretically, I could even start running Sendmail as non-priviledged user (it doesn't need root priviledge to deliver mail anymore, I'd just need to sort out file permissions and ownership things on queue and db dirs/files).
On Tue, 2005-02-01 at 09:35 -0600, Aleksandar Milivojevic wrote:
Craig White wrote:
put the following line in /etc/imapd.conf #sieveusehomedir: 1
and restarted cyrus-imapd and this didn't go over very well
Feb 1 00:16:08 linuxserver sieve[17242]: can't use home directorieses Feb 1 00:16:37 linuxserver master[17145]: process 17253 exited, status 75 Feb 1 00:16:37 linuxserver master[17145]: service sieve pid 17253 in BUSY state: terminated abnormally
OK - I'll byte - what's the trick? I'm finding that using sieve inside the mystery that is cyrus is clumsy and was thinking that if I could park the sieve files in home directories, things might be more manageable.
I was thinking that this might be a clue... Feb 1 00:14:06 linuxserver lmtpunix[17213]: IOERROR: not a sieve bytecode file /home/craig/.sieve
but this came before the other
Any clues?
Maybe premissions? Remember, cyrus is not running as root, and unlike some other IMAP implementations, doesn't need to run as root. If you store anything in user's home directory, that file must be accessible by cyrus user. For the second problem, I guess you'd need to byte-compile your sieve script prior to placing it into .sieve. Dunno how to do that.
---- I was thinking that cyrus changed to user to do this work - ala procmail. Just in case, my home directory was set to 777 and the perms on /home/craig/.sieve were 644 - perhaps that needed to have write or execute permission to all users. Wouldn't seem to need that though.
The bytecode file clue means that apparently sieve does some juju on the script before it drops it to it's resting point making the home directory repository slightly less appealing as it was easy for me to modify users procmail recipes by munging the file in their home directory and sieve is going to require a new level of automation. I do see files... # ls -l /var/lib/imap/sieve/c/craig total 24 lrwxrwxrwx 1 cyrus mail 8 Feb 1 08:49 defaultbc -> lists.bc -rw------- 1 cyrus mail 5164 Feb 1 08:49 lists.bc -rw------- 1 cyrus mail 3796 Jan 31 22:33 lists_pseudo.bc -rw------- 1 cyrus mail 3572 Jan 31 22:33 lists_pseudo.script -rw------- 1 cyrus mail 4348 Feb 1 08:49 lists.script
I wonder if I just adjust the 'lists.script' and restart cyrus-imapd or some other command to do the juju on lists.script for lists.bc (obviously the bytecode juju). I'll have to do this later as now I have to run. ----
Anyhow, I've been using Sieve for some time now, no problems. I'm not using anything in user's home directories (I've let Cyrus keep sieve scripts in his store, and installed smartsieve for script management), and had no problems with it so far. The only place where I allow Cyrus to interact with local accounts is password checking (where applicable, if there are local user accounts). This would make moving Cyrus IMAPD to dedicated (accountless) machine very simple.
---- I did download the smartsieve php stuff and played around with it and managed to disable my script completely. Figured that I would understand exactly what was happening with the sieve stuff first. lists_pseudo above came from either smartsieve or the other web tool stuff I was playing with (websieve.pl - a perl/cgi implementation). ----
Hm, thinking of it, theoretically, I could even start running Sendmail as non-priviledged user (it doesn't need root priviledge to deliver mail anymore, I'd just need to sort out file permissions and ownership things on queue and db dirs/files).
---- I'll leave this as an exercise for you to do at this point - my plate is full at the moment ;-)
Thanks
Craig
On Tue, 2005-02-01 at 09:03 -0700, Craig White wrote:
On Tue, 2005-02-01 at 09:35 -0600, Aleksandar Milivojevic wrote:
Craig White wrote:
put the following line in /etc/imapd.conf #sieveusehomedir: 1
and restarted cyrus-imapd and this didn't go over very well
Feb 1 00:16:08 linuxserver sieve[17242]: can't use home directorieses Feb 1 00:16:37 linuxserver master[17145]: process 17253 exited, status 75 Feb 1 00:16:37 linuxserver master[17145]: service sieve pid 17253 in BUSY state: terminated abnormally
OK - I'll byte - what's the trick? I'm finding that using sieve inside the mystery that is cyrus is clumsy and was thinking that if I could park the sieve files in home directories, things might be more manageable.
I was thinking that this might be a clue... Feb 1 00:14:06 linuxserver lmtpunix[17213]: IOERROR: not a sieve bytecode file /home/craig/.sieve
but this came before the other
Any clues?
Maybe premissions? Remember, cyrus is not running as root, and unlike some other IMAP implementations, doesn't need to run as root. If you store anything in user's home directory, that file must be accessible by cyrus user. For the second problem, I guess you'd need to byte-compile your sieve script prior to placing it into .sieve. Dunno how to do that.
I was thinking that cyrus changed to user to do this work - ala procmail. Just in case, my home directory was set to 777 and the perms on /home/craig/.sieve were 644 - perhaps that needed to have write or execute permission to all users. Wouldn't seem to need that though.
The bytecode file clue means that apparently sieve does some juju on the script before it drops it to it's resting point making the home directory repository slightly less appealing as it was easy for me to modify users procmail recipes by munging the file in their home directory and sieve is going to require a new level of automation. I do see files... # ls -l /var/lib/imap/sieve/c/craig total 24 lrwxrwxrwx 1 cyrus mail 8 Feb 1 08:49 defaultbc -> lists.bc -rw------- 1 cyrus mail 5164 Feb 1 08:49 lists.bc -rw------- 1 cyrus mail 3796 Jan 31 22:33 lists_pseudo.bc -rw------- 1 cyrus mail 3572 Jan 31 22:33 lists_pseudo.script -rw------- 1 cyrus mail 4348 Feb 1 08:49 lists.script
I wonder if I just adjust the 'lists.script' and restart cyrus-imapd or some other command to do the juju on lists.script for lists.bc (obviously the bytecode juju). I'll have to do this later as now I have to run.
Anyhow, I've been using Sieve for some time now, no problems. I'm not using anything in user's home directories (I've let Cyrus keep sieve scripts in his store, and installed smartsieve for script management), and had no problems with it so far. The only place where I allow Cyrus to interact with local accounts is password checking (where applicable, if there are local user accounts). This would make moving Cyrus IMAPD to dedicated (accountless) machine very simple.
I did download the smartsieve php stuff and played around with it and managed to disable my script completely. Figured that I would understand exactly what was happening with the sieve stuff first. lists_pseudo above came from either smartsieve or the other web tool stuff I was playing with (websieve.pl - a perl/cgi implementation).
Hm, thinking of it, theoretically, I could even start running Sendmail as non-priviledged user (it doesn't need root priviledge to deliver mail anymore, I'd just need to sort out file permissions and ownership things on queue and db dirs/files).
I'll leave this as an exercise for you to do at this point - my plate is full at the moment ;-)
Thanks
Craig
Craig,
In /usr/share/doc/cyrus-imapd-2.2.10/install-sieve.html there is a mention that sieveusehomedir is incompatible with timsieved. Other references in that directory mention running sieve to possibly compile the script into byte code. I think something other than timsieved would have to run to process the script. Possibly from deliver.
Otherwise I see the same errors as you. I'll look more into it when I get some free time.
Bob...
On Tue, 2005-02-01 at 13:07 -0500, Bob Chiodini wrote:
On Tue, 2005-02-01 at 09:03 -0700, Craig White wrote:
On Tue, 2005-02-01 at 09:35 -0600, Aleksandar Milivojevic wrote:
Craig White wrote:
put the following line in /etc/imapd.conf #sieveusehomedir: 1
and restarted cyrus-imapd and this didn't go over very well
In /usr/share/doc/cyrus-imapd-2.2.10/install-sieve.html there is a mention that sieveusehomedir is incompatible with timsieved. Other references in that directory mention running sieve to possibly compile the script into byte code. I think something other than timsieved would have to run to process the script. Possibly from deliver.
Otherwise I see the same errors as you. I'll look more into it when I get some free time.
---- yeah - I have pretty much given up on the sieveusehomedir option since just putting the file there doesn't do much - it still has to be processed by sieveshell or some sieve process to bytecode it. This makes the location of the file less relevant - but since you can script the sieveshell stuff, I suppose you could put a script in the users home directory and run a shell script that invokes sieveshell in the users name, put (pulls it in in sieveshell lingo) activates it and bails
Craig
On Wed, 2005-02-02 at 07:28 -0700, Craig White wrote:
On Tue, 2005-02-01 at 13:07 -0500, Bob Chiodini wrote:
On Tue, 2005-02-01 at 09:03 -0700, Craig White wrote:
On Tue, 2005-02-01 at 09:35 -0600, Aleksandar Milivojevic wrote:
Craig White wrote:
put the following line in /etc/imapd.conf #sieveusehomedir: 1
and restarted cyrus-imapd and this didn't go over very well
In /usr/share/doc/cyrus-imapd-2.2.10/install-sieve.html there is a mention that sieveusehomedir is incompatible with timsieved. Other references in that directory mention running sieve to possibly compile the script into byte code. I think something other than timsieved would have to run to process the script. Possibly from deliver.
Otherwise I see the same errors as you. I'll look more into it when I get some free time.
yeah - I have pretty much given up on the sieveusehomedir option since just putting the file there doesn't do much - it still has to be processed by sieveshell or some sieve process to bytecode it. This makes the location of the file less relevant - but since you can script the sieveshell stuff, I suppose you could put a script in the users home directory and run a shell script that invokes sieveshell in the users name, put (pulls it in in sieveshell lingo) activates it and bails
Craig
Craig,
That's pretty much how I'm doing it.
What about the password prompt, when running from a script?
Bob...
On Wed, 2005-02-02 at 10:05 -0500, Bob Chiodini wrote:
On Wed, 2005-02-02 at 07:28 -0700, Craig White wrote:
On Tue, 2005-02-01 at 13:07 -0500, Bob Chiodini wrote:
On Tue, 2005-02-01 at 09:03 -0700, Craig White wrote:
On Tue, 2005-02-01 at 09:35 -0600, Aleksandar Milivojevic wrote:
Craig White wrote:
put the following line in /etc/imapd.conf #sieveusehomedir: 1
and restarted cyrus-imapd and this didn't go over very well
In /usr/share/doc/cyrus-imapd-2.2.10/install-sieve.html there is a mention that sieveusehomedir is incompatible with timsieved. Other references in that directory mention running sieve to possibly compile the script into byte code. I think something other than timsieved would have to run to process the script. Possibly from deliver.
Otherwise I see the same errors as you. I'll look more into it when I get some free time.
yeah - I have pretty much given up on the sieveusehomedir option since just putting the file there doesn't do much - it still has to be processed by sieveshell or some sieve process to bytecode it. This makes the location of the file less relevant - but since you can script the sieveshell stuff, I suppose you could put a script in the users home directory and run a shell script that invokes sieveshell in the users name, put (pulls it in in sieveshell lingo) activates it and bails
Craig
Craig,
That's pretty much how I'm doing it.
What about the password prompt, when running from a script?
---- yeah for one user, not a problem...
but so far my scripting hasn't worked for the one user (me)... # cat sieve-update #!/bin/sh /usr/bin/sieveshell localhost -u craig -e /home/craig/sieve- update.script
# cat sieve-update.script delete lists put /home/craig/lists.script lists activate lists quit
# ./sieve-update connecting to localhost Please enter your password: Invalid command: /home/craig/sieve-update.script
me scratches head and thinks it's time for coffee
Craig
Craig White wrote:
On Wed, 2005-02-02 at 10:05 -0500, Bob Chiodini wrote:
On Wed, 2005-02-02 at 07:28 -0700, Craig White wrote:
On Tue, 2005-02-01 at 13:07 -0500, Bob Chiodini wrote:
On Tue, 2005-02-01 at 09:03 -0700, Craig White wrote:
On Tue, 2005-02-01 at 09:35 -0600, Aleksandar Milivojevic wrote:
Craig White wrote:
>put the following line in /etc/imapd.conf >#sieveusehomedir: 1 > >and restarted cyrus-imapd and this didn't go over very well
In /usr/share/doc/cyrus-imapd-2.2.10/install-sieve.html there is a mention that sieveusehomedir is incompatible with timsieved. Other references in that directory mention running sieve to possibly compile the script into byte code. I think something other than timsieved would have to run to process the script. Possibly from deliver.
Otherwise I see the same errors as you. I'll look more into it when I get some free time.
yeah - I have pretty much given up on the sieveusehomedir option since just putting the file there doesn't do much - it still has to be processed by sieveshell or some sieve process to bytecode it. This makes the location of the file less relevant - but since you can script the sieveshell stuff, I suppose you could put a script in the users home directory and run a shell script that invokes sieveshell in the users name, put (pulls it in in sieveshell lingo) activates it and bails
Craig
Craig,
That's pretty much how I'm doing it.
What about the password prompt, when running from a script?
yeah for one user, not a problem...
but so far my scripting hasn't worked for the one user (me)... # cat sieve-update #!/bin/sh /usr/bin/sieveshell localhost -u craig -e /home/craig/sieve- update.script
# cat sieve-update.script delete lists put /home/craig/lists.script lists activate lists quit
# ./sieve-update connecting to localhost Please enter your password: Invalid command: /home/craig/sieve-update.script
me scratches head and thinks it's time for coffee
The arguement for '-e' is the script itself, not the file containing the script:
sieveshell localhost -u craig -e "delete lists; put /home/craig/lists.script lists; activate lists"
On Wed, 2005-02-02 at 10:26 -0600, Aleksandar Milivojevic wrote:
me scratches head and thinks it's time for coffee
The arguement for '-e' is the script itself, not the file containing the script:
sieveshell localhost -u craig -e "delete lists; put /home/craig/lists.script lists; activate lists"
--- afraid coffee has let me down today...
# /usr/bin/sieveshell localhost -u craig -e "delete lists; \ put /home/craig/lists.script lists; activate lists" connecting to localhost Please enter your password: delete <name> - delete script.
#was all on one line and I manually added \ because of mail wrap.
but script is definitely there...
# sieveshell localhost -u craig connecting to localhost Please enter your password:
list
.sieve lists <- active script lists_pseudo
quit
Craig
Craig White wrote:
On Wed, 2005-02-02 at 10:26 -0600, Aleksandar Milivojevic wrote:
me scratches head and thinks it's time for coffee
The arguement for '-e' is the script itself, not the file containing the script:
sieveshell localhost -u craig -e "delete lists; put /home/craig/lists.script lists; activate lists"
afraid coffee has let me down today...
# /usr/bin/sieveshell localhost -u craig -e "delete lists; \ put /home/craig/lists.script lists; activate lists" connecting to localhost Please enter your password: delete <name> - delete script.
#was all on one line and I manually added \ because of mail wrap.
but script is definitely there...
# sieveshell localhost -u craig connecting to localhost Please enter your password:
list
.sieve lists <- active script lists_pseudo
quit
My bad, again... ";" isn't command separator... Don't know what is (if anything is). But if you type it multiline (as shown below), it worked:
smartsieve localhost -u craig -e "delete lists put /home/craig/lists.script lists activate lists"
On Wed, 2005-02-02 at 11:08 -0600, Aleksandar Milivojevic wrote:
Craig White wrote:
On Wed, 2005-02-02 at 10:26 -0600, Aleksandar Milivojevic wrote:
me scratches head and thinks it's time for coffee
The arguement for '-e' is the script itself, not the file containing the script:
sieveshell localhost -u craig -e "delete lists; put /home/craig/lists.script lists; activate lists"
afraid coffee has let me down today...
# /usr/bin/sieveshell localhost -u craig -e "delete lists; \ put /home/craig/lists.script lists; activate lists" connecting to localhost Please enter your password: delete <name> - delete script.
#was all on one line and I manually added \ because of mail wrap.
but script is definitely there...
# sieveshell localhost -u craig connecting to localhost Please enter your password:
list
.sieve lists <- active script lists_pseudo
quit
My bad, again... ";" isn't command separator... Don't know what is (if anything is). But if you type it multiline (as shown below), it worked:
smartsieve localhost -u craig -e "delete lists put /home/craig/lists.script lists activate lists"
---- indeed it does...
# cat test #!/bin/sh /usr/bin/sieveshell localhost -u craig -e "delete lists put /home/craig/lists.script lists activate lists"
boy - that's clumsy...
now - on to automation to get sieve scripts automatically imported into new users...
Thanks
Craig
Craig White wrote:
I was thinking that cyrus changed to user to do this work - ala procmail. Just in case, my home directory was set to 777 and the perms on /home/craig/.sieve were 644 - perhaps that needed to have write or execute permission to all users. Wouldn't seem to need that though.
Actually it was the sendmail that changed to user's ID before invoking procmail. Sendmail can do that, since it is running as root. Cyrus is not running as root, so it can't change its user ID.
The permissions look way to permissive to me. I believe minimalistic persmissions that should work (once you figure out how to put all other parts together) are 711 for you home dir (allows others to access the files inside directory if individual file's permissions permit that, but not to list content of directory), and 644 for .sieve (and any related files) to allow Cyrus to actually read it.
Sorry for not being of more help.
On Tue, 2005-02-01 at 13:08 -0600, Aleksandar Milivojevic wrote:
Craig White wrote:
I was thinking that cyrus changed to user to do this work - ala procmail. Just in case, my home directory was set to 777 and the perms on /home/craig/.sieve were 644 - perhaps that needed to have write or execute permission to all users. Wouldn't seem to need that though.
Actually it was the sendmail that changed to user's ID before invoking procmail. Sendmail can do that, since it is running as root. Cyrus is not running as root, so it can't change its user ID.
--- good to know - I hadn't thought that hard about it and it makes sense ---
The permissions look way to permissive to me. I believe minimalistic persmissions that should work (once you figure out how to put all other parts together) are 711 for you home dir (allows others to access the files inside directory if individual file's permissions permit that, but not to list content of directory), and 644 for .sieve (and any related files) to allow Cyrus to actually read it.
--- Yeah well it was in an attempt to make certain that permissions weren't a problem.
Apparently sieveshell can use scripted method and I'm going to fool with that - I presume that is what smartsieve does without looking at the code. I do know that it doesn't do much good to just copy up or edit a script in the /var/lib/imap/sieve/ directory tree as it won't bytecode it.
Thanks
Craig