

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
20 messages in net.sourceforge.lists.courier-usersRE: [courier-users] Proposing new fun...| From | Sent On | Attachments |
|---|---|---|
| Courier User | Oct 1, 2003 9:20 am | |
| Eduardo Roldan | Oct 1, 2003 11:34 am | |
| Mitch (WebCob) | Oct 1, 2003 12:05 pm | |
| Malcolm Weir | Oct 1, 2003 12:32 pm | |
| Sam Varshavchik | Oct 1, 2003 2:53 pm | |
| Eduardo Roldan | Oct 1, 2003 4:51 pm | |
| Sam Varshavchik | Oct 1, 2003 7:32 pm | |
| Eduardo Roldan | Oct 1, 2003 8:55 pm | |
| David Jones | Oct 2, 2003 5:02 am | |
| Julian Mehnle | Oct 2, 2003 5:18 am | |
| Jon Nelson | Oct 2, 2003 6:48 am | |
| Gordon Messmer | Oct 2, 2003 9:08 am | |
| Courier User | Oct 3, 2003 10:00 am | |
| Carlos Paz | Oct 5, 2003 6:58 pm | |
| Jon Nelson | Oct 5, 2003 8:12 pm | |
| Courier User | Oct 6, 2003 6:27 am | |
| Jon Nelson | Oct 6, 2003 7:58 am | |
| Theo Cabrerizo Diem | Oct 8, 2003 10:13 am | |
| Daniel Higgins | Oct 8, 2003 11:52 am | |
| Gordon Messmer | Oct 8, 2003 12:01 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | RE: [courier-users] Proposing new functions for maildropfilter | Actions... |
|---|---|---|
| From: | Malcolm Weir (ma...@gelt.org) | |
| Date: | Oct 1, 2003 12:32:42 pm | |
| List: | net.sourceforge.lists.courier-users | |
[ Snip ]
There are some functions that I would like to see in maildrop's filtering language, and I'm wondering how you folks feel about me writing these functions and then supplying patches for maildrop?
If there is enough interest in this, I will start work on this right away in my spare time. I would then have a prototype ready within a week or so.
The following group of functions are intended to replace the following type of construct:
INVOKE=`/bin/test -f $FILE 1>/dev/null 2>&1` if ( $RETURNCODE != 0 ) { ... etc. ... }
The following alternative functions avoid the overhead of forking a subprocess, setting up a pipe to capture its output, and then discarding the output once the command finishes ... all to simply query the process's return code for a true/false value that could be gotten much more quickly and easily via a system library function, and in some cases, to get a simple side-effect.
Plus, the `cmd` structure is unavailable in embedded mode!
isfile(item) returns 1 if the named item is an existing file; otherwise returns 0
isdir(item) returns 1 if the named item is an existing directory; otherwise returns 0
isreadable(item) returns 1 if the named item is an existing and readable file or directory; otherwise returns 0
iswritable(item) returns 1 if the named item is an existing and writable file or directory; otherwise returns 0
isexecutable(item) returns 1 if the named item is an existing and executable file, or a directory into which it is possible to cd; otherwise returns 0
These are, I think, benign in embedded mode.
unlink(file) tries to remove the file; returns 1 if successful, otherwise 0
rename(old, new) tries to rename the old item to have the new name; has the same semantics as the Unix rename function; returns 1 on success, otherwise 0
rmdir(dir) tries to remove the directory; has the same semantics as the Unix library function in that it will only remove an empty directory; returns 1 if successful, otherwise 0
mkdir(dir, mode) tries to make an empty directory; has the same semantics as the Unix library function in that the you have to specify the mode of the directory that's going to be created; returns 1 if successful, otherwise 0
These are, I think, not benign, so should be prohibited in embedded mode.
Malc.







