ユーザ用ツール

サイト用ツール


ubuntu-server-18-04:postfix

差分

このページの2つのバージョン間の差分を表示します。

この比較画面にリンクする

次のリビジョン
前のリビジョン
ubuntu-server-18-04:postfix [2019/08/26 17:00]
admin 作成
ubuntu-server-18-04:postfix [2020/04/10 14:45] (現在)
admin [メールボックス形式の設定]
行 41: 行 41:
   * Mailbox size limit (bytes): 0   * Mailbox size limit (bytes): 0
   * Local address extension character: +   * Local address extension character: +
-  * +  * Internet protocols to use: all 
 + 
 + 
 +==== メールボックス形式の設定 ==== 
 + 
 + 
 +Postfix の設定は /etc/postfix/main.cf を直接編集するか、設定用のコマンドを使う。 
 + 
 +メールボックス形式をデフォルトの mbox から Maildir に変更する。 
 + 
 +<code> 
 +$ sudo postconf -e 'home_mailbox = Maildir/' 
 +</code> 
 + 
 +==== メール送信テスト ==== 
 + 
 +外部のメールアドレスにテストメールを送信して送信を確認する。 
 + 
 +<code> 
 +$ echo "Subject: sendmail test" | sendmail -v example@gmail.com 
 +</code> 
 + 
 + 
 +==== TLS でメールを暗号化して送信する ==== 
 + 
 +特に重要ではないと思うが、メールを暗号化して送信したい場合は [[certbot]] で証明書を取得した後、以下のコマンドを実行する。 
 + 
 +<code> 
 +$ sudo postconf -e 'smtpd_tls_cert_file = /etc/letsencrypt/live/example.com/fullchain.pem' 
 +$ sudo postconf -e 'smtpd_tls_key_file = /etc/letsencrypt/live/example.com/privkey.pem' 
 +$ sudo postconf -e 'smtp_tls_security_level = may' 
 +$ sudo postconf -e 'smtpd_tls_security_level = may' 
 +$ sudo postconf -e 'smtp_tls_note_starttls_offer = yes' 
 +$ sudo postconf -e 'smtpd_tls_loglevel = 1' 
 +$ sudo postconf -e 'smtpd_tls_received_header = yes' 
 +</code> 
  
 ===== 参考 ===== ===== 参考 =====
ubuntu-server-18-04/postfix.1566806416.txt.gz · 最終更新: 2019/08/26 17:00 by admin