SST Lab Dokuwiki Header header picture

ユーザ用ツール

サイト用ツール


linux:postfix_install

差分

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

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
linux:postfix_install [2022/08/19 14:31] – [Postfixのインストール] kimilinux:postfix_install [2022/08/23 13:34] (現在) – 外部編集 127.0.0.1
行 2: 行 2:
 今回は旧学科メールサーバからの転送を受け取るだけのサーバを立てることにする。 今回は旧学科メールサーバからの転送を受け取るだけのサーバを立てることにする。
   * Postfix(SMTPサーバ)   * Postfix(SMTPサーバ)
-  * (imapサーバ)+  * dovecot(imapサーバ)
  
 ===== Postfixのインストール ===== ===== Postfixのインストール =====
 インストールは''apt''一発とはいかない。(Ubuntu Serverの場合)<code sh> インストールは''apt''一発とはいかない。(Ubuntu Serverの場合)<code sh>
 $ sudo apt install postfix $ sudo apt install postfix
 +$ sudo apt install mailutils # デフォルトでmailコマンドが入ってないなんて!
 </code> </code>
 途中で 途中で
行 35: 行 36:
   └─────────────────────────────────────────────────────────────────────────┘   └─────────────────────────────────────────────────────────────────────────┘
 </code> </code>
-のような選択肢が出るので、ここは''Internet site''を選択する。+のような選択肢が出るので、ここは''Local only''を選択する。
 <code txt> <code txt>
-E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are yPackage configuration 
- 
  
  ┌─────────────────────────┤ Postfix Configuration ├─────────────────────────┐  ┌─────────────────────────┤ Postfix Configuration ├─────────────────────────┐
行 63: 行 62:
  
 ===== Setting-up Postfix ===== ===== Setting-up Postfix =====
-設定ファイルは''/etc/postfix/main.cf''。雛形が''/usr/share/postfix''にある。+設定ファイルは''/etc/postfix/main.cf''雛形が''/usr/share/postfix''にある。
  
 +変更は''postconf''を使って
 <code sh> <code sh>
-sudo cp /usr/share/postfix/main.cf.dist /etc/postfix/main.cf+sudo postconf smtpd_banner=\$myhostname\ ESMTP\ \$mail_name
 </code> </code>
 +のように行う。
 +
 +^パラメータ^デフォルト^設定値^
 +|myorigin|''$myhostname''| |
 +|mydestination|''$myhostname localhost.$mydomain localhost''| |
 +|inet_interfaces|''local-loopback''| |
 +あたりの設定が必要。
 +最終的に、外からアクセスして以下のようなレスポンスが返ってくるようになってれば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 <CR><LF>.<CR><LF>
 +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 <user@somewhere.else.jp>: Relay access denied
 +quit
 +221 2.0.0 Bye
 +Connection closed by foreign host.
 +
 +</code>
 +
 +===== dovecot =====
 +インストールは''apt''一発。(Ubuntu Serverの場合)<code sh>
 +$ sudo apt install dovecot-imapd
 +</code>
 +
 +設定ファイルは''/etc/dovecot/dovecot.conf''
 +
 +===== main.cfのパラメータ =====
 +
 ^ 雛形 ^ 設定変更 ^ ^ 雛形 ^ 設定変更 ^
 |''#mail_owner = postfix''|''mail_owner = postfix''| |''#mail_owner = postfix''|''mail_owner = postfix''|
linux/postfix_install.1660887112.txt.gz · 最終更新: 2022/08/23 13:34 (外部編集)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki