I needed stunnel to log to the MAIL facility in order to get stunnel-wrapped imap to work correctly with my homegrown imap-before-SMTP antirelay solution for sendmail 8. For a few iterations, I just rebuilt stunnel with a modified log.c for each install, but it has occurred to me that for similar reasons others might want to change the syslog facility to which stunnel writes. Inspired vaguely by sshd's SyslogFacility configuration parameter, I've hacked in some code to allow runtime specification of log facilities. Attached is a diff against stunnel-3.8p4 which adds a new commandline option ("-F") which accepts a syslog facility (e.g. "mail", "DAEMON") as a parameter. I've tested this under linux 2.2.16 and OSF1 (aka Digital Unix/Compaq Tru64/whateverthehellitisthisweek) V4.0 878. Insofar as those two are concerned it seems to work.