メール

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

yumがうまく動かなかった場合?

http://mirror.centos.org/centos/6/SCL/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 – “The requested URL returned error: 404 Not Found”
他のミラーを試します。
エラー: Cannot retrieve repository metadata (repomd.xml) for repository: scl. Please verify its path and try again

sudo yum -y remove centos-release-SCL
sudo yum -y install centos-release-sclo-rh

↓別対応(これの場合、CentOSがバージョンアップしてしまう)
$ sudo yum remove centos-release-SCL
$ sudo yum update # CentOS-6.8にアップデート
$ sudo yum install centos-release-scl
$ sudo yum update

秘密鍵

default: Warning: Authentication failure. Retrying…
↑のようなエラー時

vagrant ssh-config

IdentityFile “C:/xampp/htdocs/attendance/vagrant/.vagrant/machines/attendance/virtualbox/private_key”

ssh-keygen -yf xxxx/vagrant_private_key > public_key
public_keyがゲスト側にできるので、viとかで中身見てコピー

vagrant ssh
初期パスワードは「vagrant」

sudo vi /home/vagrant/.ssh/authorized_keys
コピーしたpublic_keyの中身を上書き