This implements a number of functions found in -lmail on SysV systems