Postfix

Ubuntu14.04 でphpでメール受信とか

## install postfix

“`

sudo apt-get install postfix postfix-dev sasl2-bin

sudo apt-get install dovecot-core dovecot-dev dovecot-pop3d dovecot-imapd dovecot-gssapt

“`

## Settings

“`

sudo cp /usr/lib/postfix/main.cf /etc/postfix/main.cf

sudo emacs -nw /etc/postfix/main.cf

“`

### 参考

http://www.server-world.info/query?os=Ubuntu_14.04&p=mail

http://www.server-world.info/query?os=Ubuntu_14.04&p=mail&f=2

### gmailに転送する設定に変更

relayhostにgmailを指定

パスワードの設定とかね。

## phpでメールを受信出来るよう設定

メールサーバ受信DNS設定とか面倒だからやめた。

phpinfoを見ると案の定imap入ってませんでしたので、php5.5系の落としてきてimapのディレクトリ移動してphpize

### configureで失敗する

configureしたらutf8_mime2text()がうんたらと出てきた。

ググると、どうもphpにimapとかメール関係入れる時にライブラリが足りないと出るエラーのようだ。

sudo apt-cache search libc-client

[Read More…]