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. This patch now works natively with the '-D' option to provide both log level and facility for sysloging, ala '-D news.5'