前提・実現したいこと
ubuntu18.04でmailコマンドでメールを送りたいと考えています。
postfixをインストールしていますが、メールが送れずに困っています。
発生している問題・エラーメッセージ
当方初心者で、postfixの設定の仕方がよくわかっておりません。
mailコマンドを使ったときの/var/log/mail.logは
以下のとおりです。(抜き出すところが正しいか分かりません)
Aug 23 21:37:11 tatsunoshi-ThinkPad-X380-Yoga postfix/local[31276]: 3EE924E3296: to=<root@tatsunoshi-ThinkPad-X380-Yoga>, relay=local, delay=0.03, delays=0.01/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
設定ファイル
/etc/postfix/main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version 2 3 4 # Debian specific: Specifying a file name will cause the first 5 # line of that file to be used as the name. The Debian default 6 # is /etc/mailname. 7 #myorigin = /etc/mailname 8 9 smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) 10 biff = no 11 12 # appending .domain is the MUA's job. 13 append_dot_mydomain = no 14 15 # Uncomment the next line to generate "delayed mail" warnings 16 #delay_warning_time = 4h 17 18 readme_directory = no 19 20 # See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on 21 # fresh installs. 22 compatibility_level = 2 23 24 # TLS parameters 25 smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem 26 smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key 27 smtpd_use_tls=yes 28 smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache 29 smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache 30 31 32 # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for 33 # information on enabling SSL in the smtp client. 34 35 smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination 36 myhostname = tatsunoshi-ThinkPad-X380-Yoga.exampl.local 37 alias_maps = hash:/etc/aliases 38 alias_database = hash:/etc/aliases 39 mydestination = $myhostname, tatsunoshi-ThinkPad-X380-Yoga, localhost.localdomain, , localhost 40 relayhost =[smtp.gmail.com]:587 41 mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 42 mailbox_command = procmail -a "$EXTENSION" 43 mailbox_size_limit = 0 44 recipient_delimiter = + 45 inet_interfaces = all 46 inet_protocols = ipv4
補足情報(FW/ツールのバージョンなど)
ubuntu18.04 postfix(インターネットサイト)
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/08/23 21:22
2019/08/23 22:25 編集
2019/08/24 10:24
2019/08/24 10:40
2019/08/25 01:08