User Tools

Site Tools


vps:vps4th2nd_07

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
vps:vps4th2nd_07 [2019/06/29 14:42]
hoge@hoge
vps:vps4th2nd_07 [2019/06/29 16:41]
hoge@hoge [/etc/hosts 設定]
Line 3: Line 3:
  
 ===== 構成 ===== ===== 構成 =====
-  - fwweb, desktopの各root宛メールはjailerのroot宛とする。 +  - jailerprisnor それぞれの root 宛メールを gmail アカウント宛とする。
-  - jailerのroot宛メールgmailアカウント宛とする。+
  
-===== jailer設定 ===== 
  
  
-==== MTA 設定 ==== + 
-=== インストール ===+ 
 +===== MTA 設定 ​===== 
 +==== インストール ​====
 以下をインストールする。 以下をインストールする。
   * ssmtp   * ssmtp
  
-=== /​etc/​mail/​mailer.conf 設定 ===+==== /​etc/​mail/​mailer.conf 設定 ​====
 導入した ssmtp を指定する。 導入した ssmtp を指定する。
 <​code>​ <​code>​
Line 27: Line 27:
 </​code>​ </​code>​
    
-=== /​usr/​local/​etc/​ssmtp/​revaliases 設定 ===+==== /​usr/​local/​etc/​ssmtp/​revaliases 設定 ​====
 revaliases.sample を revaliases にコピーし編集する。 revaliases.sample を revaliases にコピーし編集する。
 <​code>​ <​code>​
Line 33: Line 33:
 </​code>​ </​code>​
  
-=== /​usr/​local/​etc/​ssmtp/​ssmtp.conf 設定 ===+==== /​usr/​local/​etc/​ssmtp/​ssmtp.conf 設定 ​====
 ssmtp.conf.sample を ssmtp.conf にコピーし編集する。 ssmtp.conf.sample を ssmtp.conf にコピーし編集する。
 <​code>​ <​code>​
Line 59: Line 59:
  
  
-==== /etc/hosts 設定 ==== 
-メールのリレー元であるfw,​ web, desktopを/​etc/​hostsに登録する。 
  
 ==== 送信テスト ==== ==== 送信テスト ====
Line 71: Line 69:
 </​code>​ </​code>​
   - gmailでメールが受信できていれば完了。/​var/​log/​maillogにてstat=Sentとなっている事も併せて確認する。   - gmailでメールが受信できていれば完了。/​var/​log/​maillogにてstat=Sentとなっている事も併せて確認する。
- 
-===== prisoner 設定 ===== 
-prisoner fw, web, desktopそれぞれで設定を行う。 
-==== /etc/hosts 設定 ==== 
-メールのリレー先であるjailerを/​etc/​hostsに登録する。 
- 
-==== /​etc/​mail/​aliases.db 設定 ==== 
-aliasesを編集して、root宛メールの送付先をroot@jailerとする。 
-  # root: me@my.domain 
-  root: <​jailerのroot宛>​ 
- 
-newaliaesを実行し、aliases.dbを更新する。 
-  # newaliases 
-  /​etc/​mail/​aliases:​ 28 aliases, longest 22 bytes, 301 bytes total 
-  # 
- 
-==== 送信テスト ==== 
-  - sendmailを停止・起動する。<​code>​ 
-# service sendamil stop 
-sendmail_submit not running? (check /​var/​run/​sendmail.pid). 
-Stopping sendmail_clientmqueue. 
-# service sendmail sart 
-Cannot '​start'​ sendamil. Set sendmail_enable to YES in /​etc/​rc.conf or use '​onestart'​ instead of '​start'​ 
-</​code>​ 
-  - mailコマンドでroot宛メールを送信する。<​code>​ 
-# mail root 
-Subject: TEST 
-TEST from fw 
-. 
-EOT 
-</​code>​ 
-  - gmailでメールが受信できていれば完了。 
  
  
vps/vps4th2nd_07.txt · Last modified: 2019/06/29 21:48 by hoge@hoge