OS X (macOS?) Server 5.2 no longer logs to mail.log

A bit of history: I was happily running Mac OS X Server 10.6.8 for many years, but last year upgraded (if you can call it that) to OS X Server (whatever version was on Yosemite → El Capitan and now Sierra). Although Server 5 was more or less working okay under El Capitan, after upgrading to Sierra and (latest) Server 5.2, I noticed that my trusty SMTP log is no longer logging anything. It’s empty, a zero-byte file that’s created every time I stop and restart mail or the server.


-rw-r----- 1 root admin 0 Oct 16 13:21 mail.log


Server’s “help” is pretty much useless (especially in this area), but I eventually found a Web site that included some hints about using the server admin command in Server 5.2 to get information about the service. Of note, see where the system puts other logs:


> sudo serveradmin fullstatus mail | grep log

Password:

mail:logPaths:Server Error Log = "/Library/Logs/Mail/mail-err.log"

mail:logPaths:IMAP Log = "/Library/Logs/Mail/mail-info.log"

mail:logPaths:Server Log = "/Library/Logs/Mail/mail-info.log"

mail:logPaths:POP Log = "/Library/Logs/Mail/mail-info.log"

mail:logPaths:SMTP Log = "/var/log/mail.log"

mail:logPaths:List Server Log = "/Library/Logs/Mail/listserver.log"

mail:logPaths:Migration Log = "/Library/Logs/MailMigration.log"

mail:logPaths:Virus Log = "/Library/Logs/Mail/clamav.log"

mail:logPaths:Amavisd Log = "/Library/Logs/Mail/amavis.log"

mail:logPaths:Virus DB Log = "/Library/Logs/Mail/freshclam.log"


This, I imagine, is why there’s no longer an SMTP log option in the Server GUI, as I’m guessing that the application now expects to see all logs in /Library/Logs/Mail. Unfortunately, I can’t figure out how to set the “mail:logPaths:SMTP Log” setting; using sudo serveradmin settings mail:logPaths:SMTP Log fails, as expected:


> sudo serveradmin settings mail:logPaths:SMTP Log = "/Library/Logs/Mail/mail.log"

mail = _empty_dictionary


Quoting the command argument to “mail:logPaths:SMTP Log” results in the same “_empty_dictionary” response, which is pretty meaningless and not documented anywhere I’ve found.


Setting mail service’s global log path to /Library/Logs/Mail doesn’t help. (I’ve stopped/restarted mail service multiple times after each attempt here.)


Mail is working, but I’m used to tailing /var/log/mail.log to see what’s going on—useful for greylisted messages, for example—and not having access to that vital log is really frustrating (as is most of my experience with Server, but I’ve not found any reasonable way to get away from it without losing all of my e-mail, Web sites, etc.).


Any suggestions or pointers to usable documentation would be most appreciated.

Mac mini, macOS Sierra (10.12)

Posted on Oct 16, 2016 11:29 AM

Reply
4 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

OS X (macOS?) Server 5.2 no longer logs to mail.log

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.