[Home][Back][Next]

1.Postfix(SMTP)のインストール

# yum -y install postfix
Setting up Install Process
Setting up Repos
base 100% |=========================| 1.1 kB 00:00
updates-released 100% |=========================| 951 B 00:00
Reading repository metadata in from local files
base : ################################################## 2622/2622
primary.xml.gz 100% |=========================| 361 kB 00:00
MD Read : ################################################## 897/897
updates-re: ################################################## 897/897
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Downloading header for postfix to pack into transaction set.
postfix-2.1.5-5.i386.rpm 100% |=========================| 39 kB 00:00
---> Package postfix.i386 2:2.1.5-5 set to be updated
--> Running transaction check

Dependencies Resolved
Transaction Listing:
Install: postfix.i386 2:2.1.5-5 - updates-released
Total download size: 2.7 M
Downloading Packages:
(1/1): postfix-2.1.5-5.i3 100% |=========================| 2.7 MB 00:02
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: postfix 100 % done 1/1

Installed: postfix.i386 2:2.1.5-5
Complete!
# yum clean packages
Cleaning up Packages
15 packages removed

2.Postfixの設定及びDovecotのインストール

Postfixの設定 # vi /etc/postfix/main.cf

myhostname = ataru03.kkataru.mine.nu←#を外してホスト名を記述
mydomain = kkataru.mine.nu←#を外してドメイン名を記述
myorigin = $myhostname←#を外す
inet_interfaces = all←#を外す
#inet_interfaces = localhost←#を付ける
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain←, $mydomainを追加
mynetworks = 192.168.0.0/24, 127.0.0.0/8←#を外すしてローカルネットワークを記述

*メモ viモードで“:set number”と入力すると画面の左側に行番号が表示されます。
Postfixの起動 # /etc/rc.d/init.d/postfix start
Starting postfix: [ OK ]
メール配送テスト (送信テスト)
$ mail root@ataru03.kkataru.mine.nu
Subject: test mail
time 1:08

end
.
Cc:

(メールの確認)
# mail
N 5 ataru@ataru03.kkatar Thu Dec 30 01:12 16/524 "test mail"
& 5
Message 5:
From testmail@ataru03.kkataru.mine.nu Thu Dec 30 01:12:34 2004
X-Original-To: root@ataru03.kkataru.mine.nu
Delivered-To: root@ataru03.kkataru.mine.nu
To: root@ataru03.kkataru.mine.nu
Subject: test mail
Date: Thu, 30 Dec 2004 01:12:34 +0900 (JST)
From: ataru@ataru03.kkataru.mine.nu

time 1:08

end
Dovecotのインストール # yum -y install dovecot
Dovecotの設定 # vi /etc/dovecot.conf

****************************************
# Protocols we want to be serving:
# imap imaps pop3 pop3s
#protocols = imap imaps
protocols = imap pop3←この行を追加
****************************************

# /etc/rc.d/init.d/dovecot start
Dovecot Imap を起動中: [ OK ]

# chkconfig dovecot on
メールアドレスの作成 # useradd -s /sbin/nologin testuser
# passwd testuser
Changing password for user testuser
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
複数アドレスに一括送信 # vi /etc/aliases

****************************************
# Person who should get root's mail
#root: marc

root: post←root宛てメールをpostユーザに転送
post: ataru,ataru02←post宛てメールをataru、ataru02に転送

****************************************

# postalias /etc/aliases

[Home][Back][Next]

Copyright (C) 2005 ataru