linux:postfix_install
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
linux:postfix_install [2022/08/19 13:55] – [Setting-up Postfix] kimi | linux:postfix_install [2022/08/23 13:34] (現在) – 外部編集 127.0.0.1 | ||
---|---|---|---|
行 2: | 行 2: | ||
今回は旧学科メールサーバからの転送を受け取るだけのサーバを立てることにする。 | 今回は旧学科メールサーバからの転送を受け取るだけのサーバを立てることにする。 | ||
* Postfix(SMTPサーバ) | * Postfix(SMTPサーバ) | ||
- | * (imapサーバ) | + | * dovecot(imapサーバ) |
===== Postfixのインストール ===== | ===== Postfixのインストール ===== | ||
インストールは'' | インストールは'' | ||
$ sudo apt install postfix | $ sudo apt install postfix | ||
+ | $ sudo apt install mailutils # デフォルトでmailコマンドが入ってないなんて! | ||
</ | </ | ||
途中で | 途中で | ||
行 35: | 行 36: | ||
└─────────────────────────────────────────────────────────────────────────┘ | └─────────────────────────────────────────────────────────────────────────┘ | ||
</ | </ | ||
- | のような選択肢が出るので、ここは'' | + | のような選択肢が出るので、ここは'' |
+ | <code txt> | ||
+ | | ||
+ | │ The 'mail name' is the domain name used to ' | ||
+ | │ addresses without a domain name. This includes mail to and from < | ||
+ | │ please do not make your machine send out mail from root@example.org | ||
+ | │ unless root@example.org has told you to. │ | ||
+ | | ||
+ | │ This name will also be used by other programs. It should be the single, | ||
+ | │ fully qualified domain name (FQDN). | ||
+ | | ||
+ | │ Thus, if a mail address on the local host is foo@example.org, | ||
+ | │ correct value for this option would be example.org. | ||
+ | | ||
+ | │ System mail name: │ | ||
+ | | ||
+ | │ XXX.XXX.XXX.ac.jp_________________________________________________________ │ | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | </ | ||
+ | これで'' | ||
===== Setting-up Postfix ===== | ===== Setting-up Postfix ===== | ||
- | 設定ファイルは''/ | + | 設定ファイルは''/ |
+ | 変更は'' | ||
<code sh> | <code sh> | ||
- | sudo cp / | + | $ sudo postconf smtpd_banner=$myhostname\ ESMTP\ $mail_name |
</ | </ | ||
+ | のように行う。 | ||
+ | |||
+ | ^パラメータ^デフォルト^設定値^ | ||
+ | |myorigin|'' | ||
+ | |mydestination|'' | ||
+ | |inet_interfaces|'' | ||
+ | あたりの設定が必要。 | ||
+ | 最終的に、外からアクセスして以下のようなレスポンスが返ってくるようになってればOK。 | ||
+ | <code sh> | ||
+ | % telnet mail.global.jp 25 | ||
+ | Trying XXX.XX.XX.XXX... | ||
+ | Connected to mail.global.jp. | ||
+ | Escape character is ' | ||
+ | 220 mail.local ESMTP Postfix (Ubuntu) | ||
+ | mail from: xyz@abc.net | ||
+ | 250 2.1.0 Ok | ||
+ | rcpt to: user@mail.global.jp | ||
+ | 250 2.1.5 Ok | ||
+ | data | ||
+ | 354 End data with < | ||
+ | This mail comes from outside. | ||
+ | . | ||
+ | 250 2.0.0 Ok: queued as D186F80AFD | ||
+ | quit | ||
+ | 221 2.0.0 Bye | ||
+ | Connection closed by foreign host. | ||
+ | % telnet mail.global.jp 25 | ||
+ | Trying XXX.XX.XX.XXX... | ||
+ | Connected to mail.global.jp. | ||
+ | Escape character is ' | ||
+ | 220 mail.local ESMTP Postfix (Ubuntu) | ||
+ | mail from: xyz@abc.net | ||
+ | 250 2.1.0 Ok | ||
+ | rcpt to: user@somewhere.else.jp | ||
+ | 454 4.7.1 < | ||
+ | quit | ||
+ | 221 2.0.0 Bye | ||
+ | Connection closed by foreign host. | ||
+ | % | ||
+ | </ | ||
+ | |||
+ | ===== dovecot ===== | ||
+ | インストールは'' | ||
+ | $ sudo apt install dovecot-imapd | ||
+ | </ | ||
+ | |||
+ | 設定ファイルは''/ | ||
+ | |||
+ | ===== main.cfのパラメータ ===== | ||
+ | |||
^ 雛形 ^ 設定変更 ^ | ^ 雛形 ^ 設定変更 ^ | ||
|''# | |''# |
linux/postfix_install.1660884928.txt.gz · 最終更新: 2022/08/23 13:34 (外部編集)