Re: [oi-dev] Sendmail logging to wrong facility

2018-09-20 Thread Gary Mills
On Tue, Sep 18, 2018 at 03:57:13PM -0500, Gary Mills wrote:
> 
> Yes, I thought of dtrace too, but that's as far as I got.  I'm not
> at all familiar with dtrace.

I found out that dtrace is one of my friends.

> I need something that would enable the MTA service and then display
> the openlog() function calls, showing me the calling function for each
> of them.  That should tell me what is changing the syslog facility.

The culprit seems to be usr/src/lib/pkcs11/pkcs11_tpm/common/apiutil.c
in illumos.  Yes, it's an illumos bug that's doing it.


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

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


Re: [oi-dev] Sendmail logging to wrong facility

2018-09-18 Thread Gary Mills
On Tue, Sep 18, 2018 at 10:26:12PM +0300, Toomas Soome wrote:
> 
> > On 18 Sep 2018, at 22:24, Gary Mills  wrote:
> > 
> > On Tue, Sep 18, 2018 at 09:57:40PM +0300, Toomas Soome via oi-dev wrote:
> >> 
> >>   var/log/daemon.6:Aug  1 12:48:19 beastie sendmail[1189]: [ID 702911
> >>   [7]daemon.info] starting daemon (8.14.4+Sun): SMTP+queueing@00:15:00
> > 
> >>   apparently the daemon part is logging using daemon facility.
> > 
> > Yes, that's the problem.  How do I determine what's causing it?
> > It's likely not sendmail itself.
> > 
> 
> daemon() call? I guess dtrace would help.

Yes, I thought of dtrace too, but that's as far as I got.  I'm not
at all familiar with dtrace.

I need something that would enable the MTA service and then display
the openlog() function calls, showing me the calling function for each
of them.  That should tell me what is changing the syslog facility.


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

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


Re: [oi-dev] Sendmail logging to wrong facility

2018-09-18 Thread Toomas Soome via oi-dev



> On 18 Sep 2018, at 22:24, Gary Mills  wrote:
> 
> On Tue, Sep 18, 2018 at 09:57:40PM +0300, Toomas Soome via oi-dev wrote:
>> 
>>   var/log/daemon.6:Aug  1 12:48:19 beastie sendmail[1189]: [ID 702911
>>   [7]daemon.info] starting daemon (8.14.4+Sun): SMTP+queueing@00:15:00
> 
>>   apparently the daemon part is logging using daemon facility.
> 
> Yes, that's the problem.  How do I determine what's causing it?
> It's likely not sendmail itself.
> 

daemon() call? I guess dtrace would help.

rgds,
toomas

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


Re: [oi-dev] Sendmail logging to wrong facility

2018-09-18 Thread Gary Mills
On Tue, Sep 18, 2018 at 09:57:40PM +0300, Toomas Soome via oi-dev wrote:
> 
>var/log/daemon.6:Aug  1 12:48:19 beastie sendmail[1189]: [ID 702911
>[7]daemon.info] starting daemon (8.14.4+Sun): SMTP+queueing@00:15:00

>apparently the daemon part is logging using daemon facility.

Yes, that's the problem.  How do I determine what's causing it?
It's likely not sendmail itself.


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

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


Re: [oi-dev] Sendmail logging to wrong facility

2018-09-18 Thread Toomas Soome via oi-dev


> On 18 Sep 2018, at 20:37, Gary Mills  wrote:
> 
> On Tue, Sep 18, 2018 at 06:03:48PM +0100, Jonathan Adams wrote:
>>   add this to your syslog.conf:
>>   mail.info;daemon.info�  �  �  �  �  � ifdef(`LOGHOST',
>>   /var/log/syslog, @loghost)
> 
> So, you had the same problem.  Good.  It exists.  Thanks for that
> information.
> 
>>   I found it out by adding every possible log format to the file until I
>>   could work out what had changed.
> 
> I don't like your workaround, however:
> 
> $ grep sendmail /var/adm/messages | wc -l
>  56
> $ grep daemon.info /var/adm/messages | wc -l
>   11624
> 
> I'm mainly trying to work out what had changed.
> 
> My original question was:
> 
>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-
> 
> ___
> oi-dev mailing list
> oi-dev@openindiana.org
> https://openindiana.org/mailman/listinfo/oi-dev 
> 
var/log/daemon.6:Aug  1 12:48:19 beastie sendmail[1189]: [ID 702911 
daemon.info] starting daemon (8.14.4+Sun): SMTP+queueing@00:15:00

apparently the daemon part is logging using daemon facility.

rgds,
toomas

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

Re: [oi-dev] Sendmail logging to wrong facility

2018-09-18 Thread Gary Mills
On Tue, Sep 18, 2018 at 06:03:48PM +0100, Jonathan Adams wrote:
>add this to your syslog.conf:
>mail.info;daemon.info�  �  �  �  �  � ifdef(`LOGHOST',
>/var/log/syslog, @loghost)

So, you had the same problem.  Good.  It exists.  Thanks for that
information.

>I found it out by adding every possible log format to the file until I
>could work out what had changed.

I don't like your workaround, however:

$ grep sendmail /var/adm/messages | wc -l
  56
$ grep daemon.info /var/adm/messages | wc -l
   11624

I'm mainly trying to work out what had changed.

My original question was:

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-

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

Re: [oi-dev] Sendmail logging to wrong facility

2018-09-18 Thread Jonathan Adams
add this to your syslog.conf:

mail.info;daemon.info   ifdef(`LOGHOST', /var/log/syslog, @loghost)

I found it out by adding every possible log format to the file until I
could work out what had changed.

Jon

On Tue, 18 Sep 2018 at 17:25, Gary Mills  wrote:

> On Tue, Sep 18, 2018 at 05:57:07PM +0200, Udo Grabowski (IMK) wrote:
> > 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 .
>
> > Have a look into /etc/syslog.conf, there are rules affecting the
> > mail client and server logging:
>
> That's the first place I looked.  It's not the cause of this problem.
> Something is changing the syslog facility.
>
>
> --
> -Gary Mills--refurb--Winnipeg, Manitoba,
> Canada-
>
> ___
> oi-dev mailing list
> oi-dev@openindiana.org
> https://openindiana.org/mailman/listinfo/oi-dev
>
___
oi-dev mailing list
oi-dev@openindiana.org
https://openindiana.org/mailman/listinfo/oi-dev

Re: [oi-dev] Sendmail logging to wrong facility

2018-09-18 Thread Gary Mills
On Tue, Sep 18, 2018 at 05:57:07PM +0200, Udo Grabowski (IMK) wrote:
> 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 .

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

That's the first place I looked.  It's not the cause of this problem.
Something is changing the syslog facility.


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

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


Re: [oi-dev] Sendmail logging to wrong facility

2018-09-18 Thread Udo Grabowski (IMK)

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



smime.p7s
Description: S/MIME Cryptographic Signature
___
oi-dev mailing list
oi-dev@openindiana.org
https://openindiana.org/mailman/listinfo/oi-dev

[oi-dev] Sendmail logging to wrong facility

2018-09-18 Thread Gary Mills
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.


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

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