MacでPostfixとGoogleメールアカウントを利用して
PHPからメール送信できるようにする設定しようとしていたところ、
つまづいてしまいました。
<やったこと>
main.cfの行末に以下内容を記述
Gmail
relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash: /etc/postfix/sasl_passwd
smtp_sasl_security_options =
smtp_use_tls = yes
smtp_tls_security_level=encrypt
<次にやってつまづいたところ>
ターミナルで、
$ vi /etc/postfix/sasl_passwd
と実行したところ...
E325: ATTENTION
Found a swap file by the name "/etc/postfix/.sasl_passwd.swp"
owned by: root dated: Mon Apr 27 14:27:06 2015
file name: /private/etc/postfix/sasl_passwd
modified: YES
user name: root host name: Macintosh.local
process ID: 5645
While opening file "/etc/postfix/sasl_passwd"
(1) Another program may be editing the same file.
If this is the case, be careful not to end up with two
different instances of the same file when making changes.
Quit, or continue with caution.
(2) An edit session for this file crashed.
If this is the case, use ":recover" or "vim -r /etc/postfix/sasl_passwd"
to recover the changes (see ":help recovery").
If you did this already, delete the swap file "/etc/postfix/.sasl_passwd.swp
"
to avoid this message.
Swap file "/etc/postfix/.sasl_passwd.swp" already exists!
[O]pen Read-Only, (E)dit anyway, (R)ecover, (D)elete it, (Q)uit, (A)bort:
と出てきました。何度かうまくいってないので未完了のファイルがある、
という意味だと認識し、e((E)dit anyway)を実行しました。
そのあと以下の様な画面になり...
■(ここにポインタがある状態)
〜
〜
〜
...
-- INSERT --
上記ポインタがある位置に、
smtp.gmail.com:587 アカウント@gmail.com:パスワード
と入力しエンターを押したのですが、改行でポインタが下に移動していくのみで
処理が進みません。上記のあとにpostmapコマンド(postmap /etc/postfix/sasl_passwd)を
実行していきたいのですが...
稚拙な質問で大変恐縮ですが、ご教示いただければ幸いです。
何卒宜しくお願い申し上げます。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/05/05 05:05