Upgraded to 3.4 today. All logging has Stopped?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Upgraded to 3.4 today. All logging has Stopped?

rachalmers

I upgraded to and installed 3.4 today. It appears to be running, but all logging has stopped. The last entry in the log file was at the exact time I started the new version.

I’m also having trouble with the Mail program but that’s another story. Which is why I’m trying contact via my iPad.

Local mail, via sendmail seems to be working as does mail going off site again via sendmail. But no logging.
I haven’t changed my main.cf nor the master.cf in ages now, so what’s changed I wonder.
Thanks
Robert

Reply | Threaded
Open this post in threaded view
|

Re: Upgraded to 3.4 today. All logging has Stopped?

Viktor Dukhovni

> On Nov 29, 2018, at 9:15 AM, Robert Chalmers <[hidden email]> wrote:
>
> I upgraded to and installed 3.4 today. It appears to be running, but all logging has stopped. The last entry in the log file was at the exact time I started the new version.

Apple changed the syslog API to use the os_log(3) interface, but apparently
if you compile on a sufficiently old MacOS/X system, you get linked against
the traditional syslog API.

So some people do that, but the os_log(3) stuff is configurable, so you
should be able to configure the logs to be saved.  The in-memory logs
can be queried with log(1).  For example:

  # postfix reload
  postfix/postfix-script: refreshing the Postfix mail system

  # log show --info --style syslog --last 2m --predicate 'eventType == logEvent'  | grep libpostfix-util
  2018-11-29 12:02:26.765215-0500  localhost postlog[59348]: (libpostfix-util.dylib) refreshing the Postfix mail system
  2018-11-29 12:02:26.776443-0500  localhost master[33680]: (libpostfix-util.dylib) reload -- version 3.4-20181125, configuration /var/tmp/postfix/etc

Someone should figure out how create an asl.conf(5) configuration
that causes appropriate Postfix logs to land on disk, and share
the recipe.

I should note that the new API appears to strip everything up to
the last "/" in the log name, so we're losing the "postfix/"
prefixes.  Might need to change the code (on MacOS) to send

        postfix:master

rather than

        postfix/master

--
        Viktor.

Reply | Threaded
Open this post in threaded view
|

Re: Upgraded to 3.4 today. All logging has Stopped?

rachalmers
Interesting - but I'm at a loss as to how to actually solve the logging
problem here. It's a bit iffy with no Postfix mail logs. Dovecot is logging
fine, but that's only half the story.




--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
Reply | Threaded
Open this post in threaded view
|

Re: Upgraded to 3.4 today. All logging has Stopped?

Bill Cole-3
In reply to this post by Viktor Dukhovni
On 29 Nov 2018, at 12:07, Viktor Dukhovni wrote:

>> On Nov 29, 2018, at 9:15 AM, Robert Chalmers <[hidden email]>
>> wrote:
>>
>> I upgraded to and installed 3.4 today. It appears to be running, but
>> all logging has stopped. The last entry in the log file was at the
>> exact time I started the new version.
>
> Apple changed the syslog API to use the os_log(3) interface, but
> apparently
> if you compile on a sufficiently old MacOS/X system, you get linked
> against
> the traditional syslog API.
>
> So some people do that, but the os_log(3) stuff is configurable, so
> you
> should be able to configure the logs to be saved.

The word "should" has 2 distinct meanings...

There's already a default /etc/asl/com.apple.mail file which *according
to Apple's docs* should cause mail messages to go into
/var/log/mail.log, but they do not. Replicating the configuration in
/etc/asl.conf which seems to make some messages land in
/var/log/system.log does not work for any other target. None of the
/etc/asl/com.apple.* files which seem to want to cause messages to go
into log files actually generates any log files.

I agree that there *SHOULD* be a way to cause the broken "unified
logging" subsystem to save custom logs. That would be a good thing. I do
not believe that a working documented mechanism exists to do so. It
seems to me to be unlikely that anyone would stumble across whatever
magic is needed to achieve this result.


> The in-memory logs
> can be queried with log(1).  For example:
>
>   # postfix reload
>   postfix/postfix-script: refreshing the Postfix mail system
>
>   # log show --info --style syslog --last 2m --predicate 'eventType ==
> logEvent'  | grep libpostfix-util
>   2018-11-29 12:02:26.765215-0500  localhost postlog[59348]:
> (libpostfix-util.dylib) refreshing the Postfix mail system
>   2018-11-29 12:02:26.776443-0500  localhost master[33680]:
> (libpostfix-util.dylib) reload -- version 3.4-20181125, configuration
> /var/tmp/postfix/etc
>
> Someone should figure out how create an asl.conf(5) configuration
> that causes appropriate Postfix logs to land on disk, and share
> the recipe.

As I said above, I'm not sure that's possible. However, one could launch
this persistently in the background (either via launchd or even 'batch'
if you're into such things...) and get an emulation of sane mail
logging:

log stream --info --predicate 'senderImagePath CONTAINS "postfix"'
--style syslog >> /var/log/mail.log


--
Bill Cole
[hidden email] or [hidden email]
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Available For Hire: https://linkedin.com/in/billcole