タイトルの通りmacのターミナルからgmail宛にメールを送信したいです。
下記情報から原因が思い当たりましたら是非ご指摘ください????♂️
実行コマンド
echo foo|mail ***@gmail.com
ログ
log stream --predicate '(process == "smtpd") || (process == "smtp")' --info Filtering the log data using "process == "smtpd" OR process == "smtp"" Timestamp Thread Type Activity PID TTL 2020-02-04 21:24:59.437459+0900 0xf1c7 Activity 0xb340 3305 0 smtp: (libsystem_info.dylib) Retrieve User by Name 2020-02-04 21:24:59.438191+0900 0xf1c7 Activity 0xb341 3305 0 smtp: (libsystem_info.dylib) Retrieve User by Name 2020-02-04 21:24:59.439102+0900 0xf1c7 Activity 0xb342 3305 0 smtp: (libsystem_info.dylib) Retrieve Group by Name 2020-02-04 21:24:59.476002+0900 0xf1c7 Activity 0xb343 3305 0 smtp: (libsystem_info.dylib) Resolve user group list 2020-02-04 21:25:00.495582+0900 0xf1c7 Info 0x0 3305 0 smtp: 62278300128D1F: to=<***@gmail.com>, relay=smtp.gmail.com[64.233.189.108]:587, delay=1.1, delays=0.03/0.05/1/0, dsn=4.7.0, status=deferred (SASL authentication failed; cannot authenticate to server smtp.gmail.com[64.233.189.108]: generic failure)
環境
#macOS sw_vers ProductName: Mac OS X ProductVersion: 10.15.2 BuildVersion: 19C57
必要か分からない設定ファイルの中身
#/etc/postfix/main.cf compatibility_level = 2 queue_directory = /private/var/spool/postfix command_directory = /usr/sbin daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix mail_owner = _postfix cifies the list of domains that this unknown_local_recipient_reject_code = 550 relayhost = smtp.gmail.com:587 debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5 sendmail_path = /usr/sbin/sendmail newaliases_path = /usr/bin/newaliases mailq_path = /usr/bin/mailq setgid_group = _postdrop html_directory = /usr/share/doc/postfix/html manpage_directory = /usr/share/man sample_directory = /usr/share/doc/postfix/examples readme_directory = /usr/share/doc/postfix inet_protocols = all message_size_limit = 10485760 mailbox_size_limit = 0 biff = no mynetworks = 127.0.0.0/8, [::1]/128 smtpd_client_restrictions = permit_mynetworks permit_sasl_authenticated permit recipient_delimiter = + tggls_random_source = dev:/dev/urandom smtpd_tls_ciphers = medium inet_interfaces = loopback-only smtp_use_tls=yes smtp_tls_security_level=may tls_random_source=dev:/dev/urandom mydomain_fallback = localhos smtp_sasl_auth_enable=yes smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd smtp_sasl_security_options=
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。