M
M
Mikhail Lebedev2017-01-29 07:33:33
Command line
Mikhail Lebedev, 2017-01-29 07:33:33

MacOS Sierra sending mail from terminal?

clean macOS Sierra
/etc/postfix/main.cf
configured ( taken from here )
_____________________________

#Gmail SMTP
relayhost=smtp.gmail.com:587
# Enable SASL authentication in the Postfix SMTP client.
smtp_sasl_auth_enable=yes
smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options=noanonymous
smtp_sasl_mechanism_filter=plain
# Enable Transport Layer Security (TLS), i.e. SSL.
smtp_use_tls=yes
smtp_tls_security_level=encrypt
tls_random_source=dev:/dev/urandom

_____________
/etc/postfix/sasl_passwd
_____________________________
Sending test message date | mail -s testing [email protected]
Nothing comes, I
tried it . Also, the manual
does not come out either.
I don't find any mail logs in the system (Postfix)
syslogd is running and has the following:
/etc/syslog.conf:
# Note that flat file logs are now configured in /etc/asl.conf

*.*                     @127.0.0.1:32376

/etc/asl/com.apple.mail
# mail facility has its own log file
? [= Facility mail] claim only
> /var/log/mail.log mode=0644 format=bsd rotate=seq compress file_max=5M all_max=50M
* file /var/log/mail.log

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2017-01-29
@Nc_Soft

Try this (option for mailgun)

relayhost = [smtp.mailgun.org]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = static:[email protected]:password
smtp_sasl_security_options = noanonymous

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question