/usr/bin/mail stopped working from command line

I'm not sure whether this is security or Core OS.

I'm running macOS 10.13.6. I didn't upgrade to 10.14 because I've been running Server.app, and need to keep some websites going.


On January 17, 2019 I installed a security update from Apple, and command line bash scripts are now unable to send email messages. If I use type the /usr/bin/mail command manually, it seems to work, and the process returns a status code ("echo $?") of 0. But those messages do not get delivered.


For a script that is scheduled to run daily, I actually get emailed failure notices from the "Mail Delivery System" saying the messages could not be delivered:

delivery temporarily suspended: connect to

127.0.0.1[127.0.0.1]:10024: Connection refused


Any information about what might be going on would be appreciated.

Replies

Maybe this went to the wrong forum, given the many views with no replies.


In any event, my workaround is a Python script that can send email. It works from the command line, and has also been tested from a web application (PHP script, using the system() function).


The script is available at https://github.com/cvickery/mail_proj.

Maybe this went to the wrong forum …

Indeed. The focus for Developer Forums is code-level questions, and that doesn’t really cover command-line tools.

In any event, my workaround is a Python script that can send email.

I’m glad to hear you got it going.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"