How do I turn on logging for postfix on mac

I have been asked how I turn on /var/log/mail.log for postfix on a Mac running Mohave.

I have it running on mine, but it always has - but I can’t remember if I had to do anything special to turn it on.
The person asking has no /var/log/mail.log at all and now I’m curious.



Re: How do I turn on logging for postfix on mac

By James Brown at 11/08/2018 - 04:42

I’ve been having the same issue. Apple changed their logging system a few releases ago (Sierra?) to use the Unified Logging System, which logs to RAM rather than disk files.

I can create the file at /var/log/mail.log, give it correct permissions, etc, but it remains at 0 bytes.

I have managed to get some info by running this command in a terminal window:

$ log stream --predicate '(process == "smtpd") || (process == "smtp") || (process == "master")' -info

I suppose the output could be piped to mail.log.

I have heard of someone compiling Postfix an an older Mac, then moving it across to Mojave and it then logs to /var/log/mail.log.

Hopefully someone knows how to bring back the old functionality.


Re: How do I turn on logging for postfix on mac

By Larry Stone at 11/08/2018 - 10:42

It’s been discussed here before. And so far, no one has come up with a way to build on a current MacOS version and have it log to /var/log/mail.log.

Viktor did suggest that a while back and it does work. I have an old Macintosh running MacOS 10.9.5 in order to support a fax modem and I do the Postfix builds on it as well.

So far, no. Apple knows what’s best for us. :-(

Also, please don’t top post on this list. Replies should be interleaved with the lines you are replying to.