This Space for Rent

New Code! (pt 2)

Postoffice has been pushed up to version 1.3.1 to correct an annoying smtp daemon feature where if the socket wedges and needs to be reopened, the reopen will occasionally run aground on a TIME_WAIT (or FIN_WAIT; this sort of wedging never actually happens when I'm near the console, so I can't be sure which tcp state is the offending state of the moment) and, instead of sleeping a while and then retrying the reopen, it would just error exit.

This is obviously not a good way for a networking service to act. so I've removed that feature and replaced it by a traditional brute-force

    while ( (fd = reattach(25)) == -1)
             sleep(60);

Aside from this, there's not much to this release. Just this bugfix, removal of an extraneous debugging syslog message, tweaks to setproctitle() so it works similarly on Mastodon, the commercial Linuxes, and the *BSDs, and one feature I added in when I had to use my public web server as a secondary mail server when pell crashed on monday evening:

  1. Add special handling for *@domain aliases (expands to vuser@domain for all vusers)
  2. Redo the once-connected reconnect logic so that once postoffice has connected it will never error exit if it has trouble reconnecting, but will instead just stubbornly loop on attach() until it reconnects.
  3. Don't prefix the proctitle with the program name, because the *bsds automatically generate a program name prefix
  4. Take out the "runq" syslog message