I followed this tutorial closely to set up a mail server on Mac OSX High Sierra. (The comments in this link are important since certain steps should be modified for High Sierra.)

After I sent the email via terminal, no error occurs but I receive no email. Typing mailq in the terminal shows the email I tried to send with the sender/recipient addresses.

Why can't I see them in my inbox?

(I have checked the spam folder, and they are not there either.)

I sent a mail in terminal like so:

date | mail -s "Test mail" myemail@gmail.com

then I checked log file like so:

show --predicate 'eventMessage contains "postfix"' --last 1h

This is what I got, I dont really understand it though

Filtering the log data using "eventMessage CONTAINS "postfix""
Skipping info and debug messages, pass --info and/or --debug to
Timestamp                       Thread     Type       Activity             PID    TTL   
Log      - Default:          0, Info:                0, Debug:        
 0, Error:          0, Fault:          0 Activity - Create:          
 0, Transition:          0, Actions:           0

If mailq shows the email, that means the mail is still stuck in Postfix's outgoing queue. When the message successfully leaves your server, it gets removed from the mailq list.

You should check the mail server log (/var/log/mail.log): it should include messages about each attempt to send the message out and their results.

In newer macOS versions the classic syslog has been replaced by ASL (Apple System Log). Try this:

log show --predicate 'eventMessage contains "postfix"' --last 2d
  • I do not have mail.log in /var/log/ directory Jun 12 '18 at 9:45
  • Sorry, I forgot that new macOS uses ASL instead of classic syslog. See my updated answer.
    – telcoM
    Jun 12 '18 at 9:53
  • I updated the question with what you suggested Jun 12 '18 at 11:56
  • Looks like there are no messages logged from Postfix. That might mean that the parts of Postfix that are supposed to handle the messages placed into the outgoing queue directory are not running.
    – telcoM
    Jun 12 '18 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.