Macで開発用SMTPサーバをたてたい!
を参考にして snow leopard でやってみた。
これで送信できるとのことなので試すと下記エラーがでていて送信できなかった
$postfix start $mail dealforest@dealforest.net Aug 16 20:05:56 dealforest-MBP-2 postfix[5026]: error: to submit mail, use the Postfix sendmail command Aug 16 20:05:56 dealforest-MBP-2 postfix[5026]: fatal: the postfix command is reserved for the superuser |
実行権限的な問題かなと思って sudo をつけて再度ためす
$sudo postfix start $mail dealforest@dealforest.net fatal: open lock file pid/master.pid: unable to set exclusive lock: Resource temporarily unavailable |
ログを見ていると上記のようなエラーがを発見
どっかしらないとこで起動してるのかと思って launchd を調べてみた
sudo launchctl list | grep postfix |
sudo をつけないと org.postfix.master でてこなくて少し悩んだ。
対処方法はここにあるように plist をいじるのもいいって自分で postfix を起動させる方法でもいいんだけど、それも気持ち悪いので launchd をそのまま使うことにした。
$sudo launchctl start org.postfix.master [起動] $sudo launchctl stop org.postfix.master [停止] |
設定ファイルは /etc/postfix/master.cf にあります。
とりあえずこれで送信できるようになりましたとさ。