procmail
[Top] [All Lists]

Re: Procmail ec on NT?

1999-03-06 18:23:00
On Sat, 6 Mar 1999, Mike de Laine wrote:

Excuse me for blaspheming, but has there been any demand for procmail,
formail etc on Windows-NT? Has anybody seriously looked at porting it to NT?

I've seriously looked at porting it to NT, yes.  The problems are pretty
severe.

First, NT doesn't have any standard API for accessing the equivalent of
UNIX user IDs, and even if it did there isn't any tight association of
user ID with process access rights.  So procmail's setuid()-based access
model is difficult to emulate under NT.

Second, procmail makes unusually extensive use of the UNIX model of
separate fork() and exec() -- that is, it does significant amounts of work
between the fork() and the eventually exec(), and it does so in different
layers of abstraction.  This makes it difficult to convert procmail to
either a multithreaded style or spawn() [simultaneous fork/exec] style.  
It's possible to emulate fork/exec under NT, but it's very inefficient.

Finally, procmail relies on a host of other minor UNIX system facilities,
such as hard linked files and other file permission details, which can be
worked around but lack of which has either inefficient or insecure side-
effects.  (I was able to produce a working "formail" (except for the -s
flag) under VC++ 5 by patching around a number of those kinds of things.)

Consequently, it would require a major rewrite and code restructuring to
have a native NT port of procmail.  It'd probably be simpler to start from
scratch and only worry about parsing procmailrc syntax.

It might be possible to compile procmail under very recent versions of the
cygwin or gnuwin environments; it didn't work when I tried last December
with 3.11pre7, but I believe there's been at least one update to the
Cygnus environment since then.

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