sudo yum install -y postfix
sudo cp /etc/postfix/main.cf /etc/postfix/main.cf.org
sudo vi /etc/postfix/main.cf
inet_interfaces = all
myhostname = example.com
mydomain = example.com
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
home_mailbox = Maildir/
mynetworks = 192.168.33.0/24, 127.0.0.0/8
sudo service postfix check
[ OK ]
sudo service postfix start
(自動起動の設定)
sudo chkconfig postfix on
sudo yum install -y mailx
mail -s ‘send test mail’ vagrant@example.com
Hello, Postfix!
.
EOT
(確認場所)
cd /home/vagrant/Maildir/new