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@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
http://www.imk-asf.kit.edu/english/sat.php
KIT - Karlsruhe Institute of Technology           http://www.kit.edu
Postfach 3640,76021 Karlsruhe,Germany T:(+49)721 608-26026 F:-926026

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
oi-dev mailing list
oi-dev@openindiana.org
https://openindiana.org/mailman/listinfo/oi-dev

Reply via email to