[Top] [All Lists]

Re: dynamic naming & creation of mailboxes

2003-01-13 17:24:40

I got some very good feedback from Jutta Degener, and so quite a bit
has changed (for the better, I hope ;).  comments are very welcome.


5.  Action setdate


   These variables SHOULD reference the time when execution of the Sieve
   script reaches the statement.  The local timezone SHOULD be used.

The local timezone is going to be the timezone of the server, which may not
be the "local" timezone for the user.  I would suggest that this be a UTC
time, as then there will only be one time conversion to do, rather than
potentially two.  ie I check my mail from the US East coast, the server is
US West coast.  "localtime" US West coast isn't so useful to me.

Also part of the point of Sieve is that your filter will do the same thing
on any server.  So if you import your script into a different mailbox, that
runs on a server in a different timezone, then you will have to modify the
times in the sieve script.

And then what if you run an ISP with mailservers in several timezones.  If
the script uses the local timezone, then this means that you can't move
users to different timezones without modifying their sieve script.

   a) Should we include more predefined variables to access the time?
   (hour, minutes, timezone, weekday, week number (US, EU og ISO?), name
   of month, name of weekday, ...)  Could use strftime(3c) as a list of
   what to offer, but the names should be in English.

Don't really follow why we need ${dollar} at all.  Most of the time $ won't
be followed by { and if we want it to then \${ or $\{ will escape it for us.
Incidentally how should we behave if the "}" is missing?  Presumably
treating it as illegal.  Perhaps there should be an example about this...

hour, minutes, name etc are probably more useful predefined variables than
the dollar, and mean you don't have to call setdate.  In fact given how
cheap it is to do a "set date" action, it might actually be better to just
do the setdate in a lazy fashion, when a reference to a time is requested,
rather than have to bother calling setdate.

   b) This extension is particularily useful if fileinto is extended to
   create new folders on demand.

            fileinto :makefolder "archive.${year}-${month}";

   It is not clear if this feature should be included here or left for a
   separate extension.

Separate extension.

   c) Should the modifier syntax be prefix or postfix?  ${var.lower} may
   be more natural than ${lower:var}.

Prefix.  More "function call" like

   d) Should references to unknown variables be left in place (rather
   than replaced by the empty string) to ease debugging scripts with

Set to null, as perhaps a "set =" is only executed in one of the if blocks,
so it's not an "error" that needs debugged if we didn't go through the if.



<Prev in Thread] Current Thread [Next in Thread>