Re: [Dovecot] global vs user script

2007-05-14 Thread Mark E. Mallett
On Tue, May 08, 2007 at 08:45:31AM +0200, Steffen Kaiser wrote:
 
 On Tue, 8 May 2007, M1 wrote:
 
 I glanced over the current Sieve library (CMU):
 
 1) 3 global scripts, 1 execute before user script, 1 execute after user 
 script, 1 execute only if there is no user script.
 
 I didn't found an easy way to let the parser read in more than one script 
 in a row. There is a function that translates just one file into the 
 bytecode. It is not iterative.
 
 2) Call global script from user script or call user script from global 
 script.
 
 Maybe, one could expand Sieve to have some sort of include statement. It 
 could work.
 
 However, there are at least two other Sieve implementations, too, there 
 had been some suggestions to look into them, but nobody jump into til now.

Speaking as the author of one of them, maybe, depending on whether mine
was one of the two you refer to, I can say how my implementation handles
it.  

This is only quasi-on-topic, hit 'd' if you don't care; I hesitated
quite a while before responding since I've rambled on about it here
before, but in the end wasn't able to resist, as you can see.

mvmda, which is the beast I refer to, is intended to be both
system-admin-friendly and expert-user-friendly.  Having both those
things at once is hard to arrange.  One of the ways it tries to do this
is to defer a lot of its control flow and logic to a site-wide script,
which the system administrator must install and tweak (well, you can get
by without one, but that would be another tangent).  This would be the
global script.  The global script executes in an admin mode in which
all permissions are enabled, meaning that the global script can pretty
much do what it wants.  A typical script (typical because I'm using
one like this and because one like it comes with the distribution) would
do something like:

 - define namespaces and mailstore locations, probably tailored to
   the specific user being delivered to;

 - interpret any command line arguments as if they were script file
   names, and attempt to run them (e.g. from the user's homedir or base
   dir), each in turn, with admin mode turned off;

 - if no scripts are found, attempt to run one with a standard name
   (e.g. filter.mfl or filter.sieve -- so no script need be named on
   the command line);

 - if still no scripts have been found, attempt to run a system-wide one
   (the name could be derived from the username or the user's group name
   or any other variable information, to provide for classes of global
   scripts).

Since control always returns to the site-wide script, there can also be
common post-user-script actions taken.

The scripting language is an mixture of Sieve and C-like constructs.
User-level scripts need not use anything other than Sieve, but the
system-wide script pretty much has to use non-Sieve elements (and
advanced script writers can as well).

http://www.mvmf.org/

I'm actively using it in dovecot environments as well as in UW
environments, and in qmail as well as sendmail environments- it adapts
well.  One downside is indeed the requirement for a system-wide script
and potentially other system-wide stuff, as that presents a steeper
install/learning curve than you might expect from a delivery agent.  On
the upside, you can get a lot of consistency at the user script level,
and you also get a nice qmail-smtpd replacement :)

mm


Re: [Dovecot] global vs user script

2007-05-11 Thread Magnus Holmgren
On Friday 11 May 2007 03:53, M1 wrote:
 Dear Mark,

 Yes, you're right. I posted the wrong link.

 I do not know much about rfc system. What does it mean by expired?

Internet Drafts must be updated, or submitted for official review and 
publication as an RFC, within six months, otherwise they are considered dead, 
which means they are deleted from the IETF's public repository.

http://www.ietf.org/ietf/1id-guidelines.html#expiry
http://en.wikipedia.org/wiki/Internet_Draft

-- 
Magnus Holmgren[EMAIL PROTECTED]
   (No Cc of list mail needed, thanks)

  Exim is better at being younger, whereas sendmail is better for 
   Scrabble (50 point bonus for clearing your rack) -- Dave Evans


pgp4rseT5uRX5.pgp
Description: PGP signature


Re: [Dovecot] global vs user script

2007-05-10 Thread Mark E. Mallett
On Thu, May 10, 2007 at 05:16:41PM +0800, M1 wrote:
 Referring to 
 http://wiki.fastmail.fm/wiki/index.php/SieveExtensionsSupportMatrix , there 
 is already a include sieve extensive and it is already implemented by cmu 
 cyrus ==2.3==
 
 The rfc draft is here === 
 http://www.ietf.org/internet-drafts/draft-ietf-sieve-notify-mailto-02.txt

That would be a mailto notify draft :)

The last include draft was:

   draft-daboo-sieve-include-05.txt

but has expired.  For reference you can find it here:

   http://ietfreport.isoc.org/idref/draft-daboo-sieve-include/

(via the http://sieve.info/ site)

mm


Re: [Dovecot] global vs user script

2007-05-10 Thread M1

Dear Mark,

Yes, you're right. I posted the wrong link.

I do not know much about rfc system. What does it mean by expired?

regards,
Steve

Mark E. Mallett [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]

On Thu, May 10, 2007 at 05:16:41PM +0800, M1 wrote:

Referring to
http://wiki.fastmail.fm/wiki/index.php/SieveExtensionsSupportMatrix , 
there

is already a include sieve extensive and it is already implemented by cmu
cyrus ==2.3==

The rfc draft is here ===
http://www.ietf.org/internet-drafts/draft-ietf-sieve-notify-mailto-02.txt


That would be a mailto notify draft :)

The last include draft was:

  draft-daboo-sieve-include-05.txt

but has expired.  For reference you can find it here:

  http://ietfreport.isoc.org/idref/draft-daboo-sieve-include/

(via the http://sieve.info/ site)

mm





Re: [Dovecot] global vs user script

2007-05-08 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Tue, 8 May 2007, M1 wrote:

I glanced over the current Sieve library (CMU):

1) 3 global scripts, 1 execute before user script, 1 execute after user 
script, 1 execute only if there is no user script.


I didn't found an easy way to let the parser read in more than one script 
in a row. There is a function that translates just one file into the 
bytecode. It is not iterative.


2) Call global script from user script or call user script from global 
script.


Maybe, one could expand Sieve to have some sort of include statement. It 
could work.


However, there are at least two other Sieve implementations, too, there 
had been some suggestions to look into them, but nobody jump into til now.


Bye,

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBRkAcjS9SORjhbDpvAQJIVwf+P/IFkwlE5Hs+/B1d0vie2jzWAjWMOa4C
xLuTS4kMvnaxS7NBQs26W9CVvHrcx1J1TNzxm0wy40p4MuN6R57K6k6XdtLUf8tJ
ueoEIfd2Uf/l/ulCdn0t3hbz1Rwk43K9aKdoYEUcHMXsRy2kT8QrWNhxZKYH2G3u
/k9Zg6Vjp8/ZqdDP34f365w9diNzylU+sdQbJXm5FvjLo/sbVXcxWQiI0c/NW78O
Kqj9Clv/izufMcNqqLkk8z1FMcJRgpjqLCw2iGV1nBDHrEjBuN2Y4UuV3MqeLD9a
bhkBDbw/GpanSgrB59YOUfKtuJrF9Vcg7duHVVaYnCBOfMYB30wXRw==
=JXVy
-END PGP SIGNATURE-


Re: [Dovecot] global vs user script

2007-05-07 Thread Steffen Kaiser
On Fri, 4 May 2007, M1 wrote:

 What is the order of execution if both user and global sieve script exists?

There was some discussion about it, what the order _should_ be. As far as
I know:

if exists user Sieve script
then run user Sieve script
elif exists global Sieve script
then run global Sieve script
fi

Bye,

-- 
Steffen Kaiser


Re: [Dovecot] global vs user script

2007-05-07 Thread M1
That's mean global script will not run if there is user script. Am I right? 
Any way to enforce gloabl script even there is a user script?


Regards,
Steve

Steffen Kaiser [EMAIL PROTECTED] wrote in 
message 
news:[EMAIL PROTECTED]

On Fri, 4 May 2007, M1 wrote:

What is the order of execution if both user and global sieve script 
exists?


There was some discussion about it, what the order _should_ be. As far as
I know:

if exists user Sieve script
then run user Sieve script
elif exists global Sieve script
then run global Sieve script
fi

Bye,

--
Steffen Kaiser





Re: [Dovecot] global vs user script

2007-05-07 Thread Steffen Kaiser

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, 7 May 2007, M1 wrote:


Any way to enforce gloabl script even there is a user script?


Not that I know of.
I would patch the cmusieve plugin so that:

a) it reads both scripts* in the order you like AND
b) drop the results (compiled script or errors) into the homedirectory of 
the user.


Bye,

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBRj8UUS9SORjhbDpvAQIPhQgA2fVXaCcbOkBpSQoKIvGTY3Sb4+LUZhMO
L7qxabvy/y7H07oq2oOWNVfUe5UVRiKJOJ1BizR7XQSks4PZhiL2i4WNb95BjDom
jx8GXjifv2lAHDMgyzvxfVRm6HtQp88JyL7JG27DeTrDva35zF6mxYhQZhJ6rtlC
flSGJdylfOpI2SWiBJRjd3w8fDIjKBLJlVOk9t0XPOt9pyF5Dwp4AQB52Yax+K81
/HKEkV4rbLfXXR9et8/oIdLjsn31SpIIqNqxWLPFMR17IDof330G8fEeWKOQ9/b5
PEgFS1SDV/h3wr4jD9nJGL5nb0xuPQmXq3y7Zi5KJryFQGLkiyq6jQ==
=AvUD
-END PGP SIGNATURE-


Re: [Dovecot] global vs user script

2007-05-07 Thread M1

I have 2 ideas.

1) 3 global scripts, 1 execute before user script, 1 execute after user 
script, 1 execute only if there is no user script.


2) Call global script from user script or call user script from global 
script.


Regards,
Steve

Steffen Kaiser [EMAIL PROTECTED] wrote in 
message 
news:[EMAIL PROTECTED]

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Mon, 7 May 2007, M1 wrote:


Any way to enforce gloabl script even there is a user script?


Not that I know of.
I would patch the cmusieve plugin so that:

a) it reads both scripts* in the order you like AND
b) drop the results (compiled script or errors) into the homedirectory of 
the user.


Bye,

- -- 
Steffen Kaiser

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iQEVAwUBRj8UUS9SORjhbDpvAQIPhQgA2fVXaCcbOkBpSQoKIvGTY3Sb4+LUZhMO
L7qxabvy/y7H07oq2oOWNVfUe5UVRiKJOJ1BizR7XQSks4PZhiL2i4WNb95BjDom
jx8GXjifv2lAHDMgyzvxfVRm6HtQp88JyL7JG27DeTrDva35zF6mxYhQZhJ6rtlC
flSGJdylfOpI2SWiBJRjd3w8fDIjKBLJlVOk9t0XPOt9pyF5Dwp4AQB52Yax+K81
/HKEkV4rbLfXXR9et8/oIdLjsn31SpIIqNqxWLPFMR17IDof330G8fEeWKOQ9/b5
PEgFS1SDV/h3wr4jD9nJGL5nb0xuPQmXq3y7Zi5KJryFQGLkiyq6jQ==
=AvUD
-END PGP SIGNATURE-