[oi-dev] Sendmail logging to wrong facility

Udo Grabowski (IMK) udo.grabowski at kit.edu
Tue Sep 18 15:57:07 UTC 2018

On 18/09/2018 17:15, Gary Mills wrote:
> 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.

Have a look into /etc/syslog.conf, there are rules affecting the
mail client and server logging:

*.err;kern.notice;auth.notice			/dev/sysmsg
*.err;kern.debug;daemon.notice;mail.crit	/var/adm/messages

*.alert;kern.err;daemon.err			operator
*.alert						root

*.emerg						*

mail.debug			ifdef(`LOGHOST', /var/log/syslog, @loghost)
# non-loghost machines will use the following lines to cause "user"
# log messages to be logged locally.
ifdef(`LOGHOST', ,
user.err					/dev/sysmsg
user.err					/var/adm/messages
user.alert					`root, operator'
user.emerg					*

Dr.Udo Grabowski   Inst.f.Meteorology & Climate Research IMK-ASF-SAT
KIT - Karlsruhe Institute of Technology           http://www.kit.edu
Postfach 3640,76021 Karlsruhe,Germany T:(+49)721 608-26026 F:-926026

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5227 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://openindiana.org/pipermail/oi-dev/attachments/20180918/c16df88e/attachment-0005.bin>

More information about the oi-dev mailing list