linux:postfix_install
文書の過去の版を表示しています。
メールサーバの構築
今回は旧学科メールサーバからの転送を受け取るだけのサーバを立てることにする。
- Postfix(SMTPサーバ)
- (imapサーバ)
Postfixのインストール
インストールはapt
一発とはいかない。(Ubuntu Serverの場合)
$ sudo apt install postfix
途中で
Package configuration ┌────────────────────────┤ Postfix Configuration ├────────────────────────┐ │ │ │ Please select the mail server configuration type that best meets your │ needs. │ │ No configuration: │ Should be chosen to leave the current configuration unchanged. │ Internet site: │ Mail is sent and received directly using SMTP. │ Internet with smarthost: │ Mail is received directly using SMTP or by running a utility such │ as fetchmail. Outgoing mail is sent using a smarthost. │ Satellite system: │ All mail is sent to another machine, called a 'smarthost', for │ delivery. │ Local only: │ The only delivered mail is the mail for local users. There is no │ network. │ │ <Ok> │ │ └─────────────────────────────────────────────────────────────────────────┘
のような選択肢が出るので、ここはNo configuration
を選択する。
Setting-up Postfix
設定ファイルは/etc/postfix/main.cf
。雛形が/usr/share/postfix
にある。
sudo cp /usr/share/postfix/main.cf.dist /etc/postfix/main.cf
雛形 | 設定変更 |
---|---|
#mail_owner = postfix | mail_owner = postfix |
#myhostname = host.domain.tld | myhostname = (内部host名).(内部ドメイン名) |
#mydomain = domain.tld | #mydomain = domain.tld |
#myorigin = $mydomain | #myorigin = $mydomain |
#inet_interfaces = all | #inet_interfaces = all |
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain | #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain |
#local_recipient_maps = unix:passwd.byname $alias_maps | #local_recipient_maps = unix:passwd.byname $alias_maps |
#home_mailbox = Maildir/ | #home_mailbox = Maildir/ |
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) | smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) |
sendmail_path = | sendmail_path = |
newaliases_path = | newaliases_path = |
mailq_path = | mailq_path = |
setgid_group = | setgid_group = |
html_directory = | html_directory = |
manpage_directory = | manpage_directory = |
sample_directory = | sample_directory = |
readme_directory = | readme_directory = |
linux/postfix_install.1660884903.txt.gz · 最終更新: 2022/08/23 13:34 (外部編集)