From: Muhai Pop (m.pop@ieee.org)
	[ comments by  <mea@utu.fi> -- the Zmailer main hacker.. ]


I modified the Zmailer code to run on a HP 9000/817S running
HP-UX 8.02.  I'd expect it would run OK on other HP-UX versions too.

The changes to the code are somewhat minor.  
The first changes refer to the FILE structure.  The Zmailer code
assumes that there is a short member called _file in this
structure.  On HP-UX there are two characters __fileL and __fileH
instead.  I don't understand why anyone would want to know the
contents of the FILE structure instead of using standard
functions to process it.
	[Creative rewriting has removed the need for those kludges.
	 Nobody really needed to have access to there.. ]

A second problem I had was in the router/functions.c file in the
run_daemon() function.  I noticed that the router processed some
files and after passing once through the directory just stopped.
I tried to find where the problem was.  I noticed that the
directory was opened as filedescriptor 0 which could (how?) be
bad.  So I included some code to open the file descriptor 0
before doing opendir() so that opendir() returns something else
than 0.  After this the router started to work (why?).

I also modified here the seekdir(dirp[i], loc[i]) with
rewinddir(dirp[i]) (it seems this is what should happen).

Another problem was with setuid().  It is not reversible under
HP-UX 8.02.  Also seteuid() doesn't exist in HP-UX.  I changed
all occurences of seteuid() with setresuid().

In order to activate those changes you have to define
_HPUX_SOURCE.  I included this in Config.hpux.

I ran the Zmailer as the Central Mail Server of the network in
the "Politehnica" University of Bucharest since July 1994.  There
is a memory leak in the router program.   Because of that I
restart the program every night.  I haven't had any other
serious problems.
	[ Propably that is  $MAILSHARE/lists/LISTNAME expansion
	  with a 'HUGE' list, like 100+ addresses.  The memory
	  bloats up to whatever size, and will stay at it.
	  There is a utility   utils/listexpand  which can help
	  on this matter. -- see  doc/guides/lists  for more info!

	  Dec-94: New built-in routine:  listexpand  handles it
	          well without bloating memory ]

Mihai Pop (m.pop@ieee.org)           2 August 1994

Communication Center
"Politehnica" University of Bucharest
