Bind, sendmail etc -- some porting news

Mumit Khan khan@NanoTech.Wisc.EDU
Thu Nov 25 01:52:00 GMT 1999


I've seen a few queries regarding ports of sendmail (and bind is 
related[1]), so it's probably a good time to dig out my bind and
sendmail changes. I took a shot a while back with bind-8.2.2 and
sendmail-8.9.3, and had it mostly working (don't take "working"
too literally ;-). 

Basic sendmail was easy, but I need to go through the code to get
the uid/gid etc fixed (haven't looked at Sergey's changes, so it's
probably already there); for bind, I started with Sergey's changes,
made quite a few changes, and the whole thing actually built. I 
used a Cygwin DLL without AF_UNIX support, but if you use a DLL
that supports AF_UNIX, you can always enable AF_UNIX by editing 
the port/cygwin/include/port_before.h file.

Sendmail port is reasonably clean -- it uses the BuildTools/OS/cygwin 
and you build it just like you would on a normal Unix box. There were
two #ifdef __CYGWIN__ -- one to include sysmacros.h to get major and
minor macros, and other one to work around a bug I never found (see
the first problem below).

What worked when I last tried:

- I could send mail using command line or a mail user agent. I used a 
  trivial mail client that passed the args onto sendmail. I don't
  remember if I tried to use Pine (I have a Cygwin port on my ftp
  site ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin/ports/ ),
  but should work in theory.
- I *think* I could get it accept mail as well, but not sure.

Problems I remember:
  
- Something gets corrupted and sendmail dies at the first putenv
  call (from main->setuserenv("AGENT","sendmail"). I have no idea
  why. I was using original B20.1 DLL, so should probably try a
  newer one. For now, I just disabled the putenv for CYGWIN, which
  means if sendmail forks, it may not work correctly.
- Had some problems with sendmail + bind, but I believe I know 
  what it was (I think I forgot to recompile parts of sendmail with
  -DNAMED_BIND=1 after I added the resolver support).

- resolver insisted on using 0.0.0.0 as the first server even if
  I had a /etc/resolv.conf that said otherwise.
- I never bothered to build named and named-xfer, and should be 
  reasonably simple after I #ifdef the support (or lack thereof)
  for AF_UNIX.

Let me know if anyone wants to play with this and I'll bundle up
the patches. It'll take a few days, so have patience.

Regards,
Mumit

[1] If you don't have a resolver library, and unless you want to add
winsock code, MX lookups won't work in sendmail.



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list