[oi-dev] Sendmail logging to wrong facility

Gary Mills gary_mills at fastmail.fm
Tue Sep 18 15:15:13 UTC 2018


I'm using the sendmail supplied with OI-hipster with my own
configuration files.  It works correctly except that the MTA daemon
logs to the wrong facility.  Specifically, the client sendmail logs to
the mail facility, which syslog sends to /var/log/syslog, but the
sendmail MTA logs to the daemon facility, which syslog sends to
/var/adm/messages .  Has anyone else noticed this anomaly?  The entire
sendmail logging should be in /var/log/syslog .

The sendmail source contains two instances of this code:

	openlog(SM_LOG_STR, LOG_PID, LOG_MAIL);

That code sets the facility that will be used by subsequent syslog()
calls by storing it into a static structure.  The same sendmail source
is used for both the client and MTA servers.  It looks correct.

My suspicion is that something is calling openlog() again with the
wrong facility.  I used truss to show the openlog() function like
this:

    7411/1 at 1:     -> libc:openlog(0x80f62a1, 0x1, 0x10, 0x8064d4c)

but it only shows the called function in libc.  How do I determine the
caller?  I need to examine the startup of the MTA, as that's where the
openlog() calls occur.


-- 
-Gary Mills-		-refurb-		-Winnipeg, Manitoba, Canada-




More information about the oi-dev mailing list