LoginSignup
1
1

More than 5 years have passed since last update.

MAMP + Postfix on Yosemite

Posted at

fatal: bind fe80::1 port 25: Can't assign requested address

MAMPはGUIでPHPから送信するメールサーバーの設定を行えるが、そのままだとYosemiteではIPv6で接続しようとして動作しない。
また、GUI側でSMTPサーバーに指定でポート番号を記載しても、ポート指定がうまく動いていないようだった。結果的に、Postfix設定を直接変更することで対処できた。

MAMP向けのSASL設定を書き換える

> sudo vi /etc/postfix/sasl_MAMP_passwd
smtp.example.com:587   your_account:password
~                                                               

Postfix設定ファイルでSMTPサーバーとポート番号を指定する

> sudo vi /etc/postfix/main.cf   
/etd/postfix/main.cf
inet_interfaces = 127.0.0.1
relayhost=smtp.example.com:587
smtp_sasl_security_options=

Postfix設定をリロードしてログ監視

> sudo postfix reload

/usr/sbin/postconf: warning: /etc/postfix/main.cf: unused parameter: mydomain_fallback=localhost
postfix/postfix-script: refreshing the Postfix mail system
> tail -f /private/var/log/mail.log

参考

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1