On 5 Dec 2018, at 07:34, Bill Cole <postfixlists-070...@billmail.scconsult.com> 
wrote:
> On 2 Dec 2018, at 20:31, James Brown wrote:
> 
>> I’m trying to set up a new mail server on macOS Mojave and it almost works. 
>> Dovecot for IMAP is working.
> 
> This is a bad idea. Mojave (like High Sierra and Sierra before it) is unfit 
> for server duty due to the intentional mangling of logging by Apple. Without 
> proper logs, detecting subtle problems is difficult and troubleshooting any 
> blatant problem like this is impossible.

Apple's logging is not mangled, it is simply using a different logging method. 
All the information is there, it's just harder (well, harder for me) to get to. 
However, you can easily do some pretty complex queries against it (as I 
understand it).

But I thought we were talking about Apple Mail.app *sending* mail?

> You can get something like a proper mail log by running this command 
> persistently (i.e. using launchd or batch or whatever else works...)
> 
>   log stream --info --predicate 'senderImagePath CONTAINS "postfix"' --style 
> syslog >> /var/log/mail.log
> 
> That will give you useful information in a standard-ish format in 
> /var/log/mail.log.
> 
> Without such logging, it is infeasible to troubleshoot your problem.

Well, it is feasible because you can query the logs anytime you want (using 
collect will even generate a log file for your query across the whole logging 
system without having to go searching trough many files). That said, I don't 
use my Macs as servers. postfix runs on FreeBSD. Apache runs on FreeBSD. MySQL 
runs on FreeBSD. Etc.

# log show --info  --start "2018-12-06 16:00:00" --end "2018-12-06 16:45:00" 
--predicate 'senderImagePath CONTAINS "sshd" AND messageType=info' --style 
syslog
Filtering the log data using "senderImagePath CONTAINS "sshd" AND logType == 1"
Timestamp                       (process)[PID]    
2018-12-06 16:17:28.311749-0700  localhost sshd[1649]: Connection closed by 
130.162.96.208 port 18696 [preauth]
2018-12-06 16:20:14.692208-0700  localhost sshd[1822]: Did not receive 
identification string from 63.143.42.244 port 10643
2018-12-06 16:25:14.528760-0700  localhost sshd[2100]: Did not receive 
identification string from 63.143.42.244 port 17916
2018-12-06 16:30:14.586075-0700  localhost sshd[2378]: Did not receive 
identification string from 63.143.42.244 port 33134



-- 
A bartender is just a pharmacist with a limited inventory.


Reply via email to