New Code!
Postoffice has been updated to version 1.5.9 with a year’s worth of debugging and tweaks to make it work more happily on OSX and versions of Linux that use systemd instead of the traditional Unix init/rc setup.
- Tweak the punctuation on the various “you are tcp wrappered; go away” messages
- Display env->localhost as part of the DEBUG output
- Set a default for env->localhost after doing all the configfile and command line options.
- Add the option
ohostname=auto|literal|name
;- if
auto
, do as we’ve always done (get machine name from uname, then use gethostbyname to pick up the canonical dns name) - if
literal
, get machine name from uname) - otherwise use “name”.
This means I needed to do some changes to the way I process
/etc/postoffice.cf
(or whatever config file is set with-C
) ; I now make a pass of the command line processing everything EXCEPT-o
arguments, then process/etc/postoffice.cf
(-C
config files were processed when they were encountered on the command line), and finally make a second pass on the command line to process-o
options.) - if
- If PAM is configured, add “PAM: T” to the output from DEBUG
- The flock sanity test was bizarrely & brokenly wrong?
- Add PAM support for AUTH LOGIN (
--with-pam
configuration option) - Check for existance of pw && pass && crypt(pass,pw) before strcmp'ing them.
- If –with-gdbm, don’t even bother to look for ndbm routines (check $WITH_GDBM)
- Handle SIGTSTP (signal 18) on modern Unices (temp kludge; need a wrapper)
- add
postoffice -bD
(fake daemonize w/o going to bg for Linux systemd rc files) - have the ns debug program display AAAA records as AAAA records instead of unknown type records
- Fix mf.c & smtp.c to compile if milters are not defined
- Add plists for osx daemonisation (tested on osx 10.5, nothing newer)
- If the message is being dumped to the spam folder because of tcpwrappers, add a X-Spam header with the reason why.
Some of this support may not be completely baked (I had to migrate my mail server from a FreeBSD 7.x machine to Linux in a hurry when my freebsd service provider went out of business) but it at least works for me™. A large caution is my support for $DENY and $WHY environment variables with tcp wrappers depended on how tcp wrappers handled running twist scripts – I was doing setenv WHY blah blah blah
which put $WHY into my environment on 7.x, but when I switched to Linux the environment was given to the child process that ran setenv, so I couldn’t get that value (I fixed this by rewriting tcp wrappers to explicitly set the environment when the twist script was $NAME=value; I need to further modify my copy of tcp wrappers to use configure.sh instead of the somewhat less than intuitive make arrangement it has right now, and then I'l publish it as a derivative work so I don’t have to keep looking for my modified copy.)