Re: Open source mail server on windows, oh my...

From: Mark Crispin (mrc_at_CAC.Washington.EDU)
Date: 10/29/03


Date: Wed, 29 Oct 2003 07:19:40 -0800

On Wed, 29 Oct 2003, David Brown wrote:
> Why not get cygwin and use standard unix email programs, such as uw-imap?
> Life under windows would be unbearable without cygwin.

As much as I would like to advocate UW-IMAP :-) I don't think that Cygwin
plus UNIX servers is the answer for servers under Windows. The original
poster would be best off finding native server software for Windows.

Cygwin is a compatibility package; and as such it has limitations which
are intrinsic to all compatibility packages. The environment that Cygwin
creates is a cross between UNIX and Windows that fits into neither. This
creates lots of subtle little issues that will trip up non-trivial
programs.

For example, locking under Cygwin is done via fcntl() but implemented via
the Windows LockFileEx() call. The result works differently than fcntl()
locking on UNIX. From UW-IMAP's perspective, this has both good and bad
consequences; but in any case it's something that has to be treated
specially.

Another example is open(). Cygwin implements a Windows-style open() in
which newline conversion (CRLF <=> LF) is done unless you set the O_BINARY
flag. The O_BINARY flag doesn't exist on UNIX. UNIX code that
manipulates binary files and/or does its own newline handling, won't know
that it needs to set O_BINARY (and in fact generally can't).

Still another is server login. Cygwin has setuid() and friends, but to
actually make things happen you also have to do calls into the Windows
logon and impersonate routines.

Now, these things all make perfect sense (and I would probably make the
same choices if I was developing Cygwin); but the result is that Cygwin
isn't really either a UNIX or Windows environment. The mere fact that
UNIX software builds and starts on Cygwin is just the start. There's lots
more that has to be changed.

Cygwin is enormously helpful in porting UNIX tools when a full-fledged
port to native Windows is either unnecessary or too time-consuming. But
for something like a server, I recommend a native server implementation.
That means one of the following:
 . native Windows servers
 . run VMware under Windows, boot UNIX under VMware, run UNIX servers
 . run UNIX instead of Windows.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.



Relevant Pages

  • Re: What is the more popular UNIX flavor?
    ... about my experience with Solaris and Cygwin. ... installing packages. ... needing eg tftp you only need to activate on a Unix system. ... probably need installing first on the equivalent Windows system. ...
    (comp.unix.questions)
  • Re: Open source mail server on windows, oh my...
    ... > Life under windows would be unbearable without cygwin. ... plus UNIX servers is the answer for servers under Windows. ...
    (comp.os.linux.questions)
  • Re: What is the more popular UNIX flavor?
    ... The solaris system I was using went ... experience with Solaris and Cygwin. ... Cygwin is but a thin veneer that makes windows more ... want out of full unix but can't get on cygwin. ...
    (comp.unix.questions)
  • Re: Card Reader
    ... it is theoretically possible to infect a Unix executable with a virus, such things are almost never seen in the wild because the Unix design blocks them from propagating. ... Contrast that with the virus sewer that Windows users swim in every day. ... Until I retired I worked with AIX servers,, and the same precautions were in effect for them as for the 40 or so Windows servers we used. ...
    (rec.photo.digital)
  • Re: Why does every one hate Microsoft
    ... I myself at work only use Unix servers and workstations, ... That is why I say let MS bundle all these security apps into windows, ... but until that happens windows really has the market by the balls. ...
    (alt.computer.security)