[root@swisspc ~]# yum install postfix
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
- > Populating transaction set with selected packages. Please wait.
- > Downloading header for postfix to pack into transaction set.
postfix-2.2.10-1.RHEL4.2. 100% |=========================| 40 kB 00:00 - > Package postfix.i386 2:2.2.10-1.RHEL4.2 set to be updated
- > Downloading header for postfix to pack into transaction set.
- > Running transaction check
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
postfix i386 2:2.2.10-1.RHEL4.2 base 3.0 M
Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)
Total download size: 3.0 M
Is this ok [y/N]: y
Downloading Packages:
(1/1): postfix-2.2.10-1.R 100% |=========================| 3.0 MB 00:00
warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID 443e1821
Public key for postfix-2.2.10-1.RHEL4.2.i386.rpm is not installed
Retrieving GPG key from http://mirror.centos.org/centos/RPM-GPG-KEY-centos4
Importing GPG key 0x443E1821 "CentOS-4 key <centos-4key@centos.org>"
Is this ok [y/N]: y
Key imported successfully
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: postfix ######################### [1/1]
Installed: postfix.i386 2:2.2.10-1.RHEL4.2
Complete!
main.cfの編集
Maildirの作成
[root@swisspc ~]# mkdir -p /etc/skel/Maildir/new
[root@swisspc ~]# mkdir -p /etc/skel/Maildir/cur
[root@swisspc ~]# mkdir -p /etc/skel/Maildir/tmp
[root@swisspc ~]# chmod -R 700 /etc/skel/Maildir/
[root@swisspc ~]# ls /etc/skel/
Maildir
[root@swisspc ~]# vi /usr/lib/sasl2/smtpd.conf
#pwcheck_method
pwcheck_method: auxprop
[root@swisspc ~]# echo "*******" | saslpasswd2 -p -u skier-ch.info -c skier
[root@swisspc ~]# echo "*******" | saslpasswd2 -p -u swisspc.info -c server
[root@swisspc ~]# sasldblistusers2
skier@skier-ch.info: userPassword
server@swisspc.info: userPassword
[root@swisspc ~]# ll /etc/sasldb2
- rw-r----- 1 root root 12288 Sep 26 22:36 /etc/sasldb2
[root@swisspc ~]# chmod 640 /etc/sasldb2
[root@swisspc ~]# chgrp postfix /etc/sasldb2
[root@swisspc ~]# ll /etc/sasldb2 - rw-r----- 1 root postfix 12288 Sep 26 22:36 /etc/sasldb2
[root@swisspc ~]# /etc/rc.d/init.d/saslauthd start
Starting saslauthd: [ OK ]
CentOSの標準メールを停止と変更
[root@swisspc ~]# /etc/rc.d/init.d/sendmail stop
Shutting down sendmail: [ OK ]
Shutting down sm-client: [ OK ]
[root@swisspc ~]# chkconfig sendmail off
[root@swisspc ~]# alternatives --config mta
There are 2 programs which provide 'mta'.
Selection Command
+ 1 /usr/sbin/sendmail.sendmail
2 /usr/sbin/sendmail.postfix
Enter to keep the current selection[+], or type selection number: 2
[root@swisspc ~]# /etc/rc.d/init.d/dovecot start
Starting Dovecot Imap: [ OK ]
[root@swisspc ~]# chkconfig dovecot on
[root@swisspc ~]# /etc/rc.d/init.d/postfix start
Starting postfix: [ OK ]