差分

提供: fukudat.net
ナビゲーションに移動検索に移動
1,367 バイト追加 、 2020年6月3日 (水) 16:53
Ubuntu上で[[google:MTA|Mail Transfer Agent (MTA)]] サービスを [[google:postfix|postfix]] で作成する覚書。
== インストール Install ==
<pre>
$ sudo apt-get install -y postfix
</pre>
configurator が走るので、
* メール設定の一般形式 = インターネットサイト
* システムメール名 = fukudat.net
 
としておく。
SASL認証のために dovecot (POP3/IMAP サーバー)を入れる。
</pre>
でも POP3/IMAP は使わない。
 
== Configure ==
/etc/postfix にある main.cf を編集して、以下の変更を加える。
<pre>
mail_owner = postfix
myhostname = fukudat.net
mydomain = fukudat.net
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
local_recipient_maps = unix:passwd.byname $alias_maps
alias_maps = hash:/etc/aliases
smtpd_banner = $myhostname ESMTP
sendmail_path = /usr/sbin/postfix
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
#html_directory =
#manpage_directory =
#sample_directory =
#readme_directory =
message_size_limit = 10485760
mailbox_size_limit = 1073741824
disable_vrfy_command = yes
smtpd_banner = $myhostname ESMTP
smtpd_helo_required = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
smtpd_sasl_security_options = noanonymous
smtpd_recipient_restrictions = permit_mynetworks,permit_auth_destination,permit_sasl_authenticated,reject
smtpd_relay_restrictions = permit_mynetworks,permit_sasl_authenticated,defer_unauth_destination
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/ssl/certs/fukudat.net.crt # SSL Certificate
smtpd_tls_key_file = /etc/ssl/private/fukudat.net.key # SSL Private Key
</pre>
== 参考文献 ==

案内メニュー