Attempting to send mails using mail(1)
from the macOS terminal shell results in the following message and the mail is not sent.
postdrop: warning: unable to look up public/pickup: No such file or directory
I have checked for the directory where I think it should be and it's there:
root# ls -ld /var/spool/postfix/public/pickup
prw--w--w- 1 _postfix _postdrop 0 Dec 31 2016 /var/spool/postfix/public/pickup
I've read that Postfix is launched ephemerally to send mail but I don't know how – I have no idea how Postfix is configured on macOS. I know Postfix from Linux but am unfamiliar with macOS.
I'd just like to fix this so my script can send email its output.
Pertinent system details:
System Version: macOS 10.12.6 (16G29) (Sierra)
Kernel Version: Darwin 16.7.0
Best Answer
Sending mail from the command line involves two things.
Send the mail without making any command line or Unix changes.
Step 1 is missing and assumed in the linked question / selected answer. Also, if you don’t want to send mail from an account you enter in your mail app, grab a stand alone install of
sendemail
as it’s quite easy to set up with your smtp server of choice: