Vine3.2 postfixの環境で設定
メールを受け取るユーザーの作成 *
スクリプト内の設定を修正
サーバーにアップロード
実行許可を与える
#chmod 755
postfixのmain.cfを編集
allow_mail_to_commands = alias
を追記
postfixのaliasesファイルを編集
#vi /etc/postfix/aliases
ユーザー名: "|/home/xxxx/post2blog"
を追記
aliasesの更新
# newaliases
postfix再起動
# service postfix restart
ちょっとだけ引っかかったのはmy $urlの設定
メール送っても更新されなくてログを見ると
Command output: 500 Can't connect to tasyu.com:80 (connect: timeout) at /xxxxx/xxxxxx/post2blog line 97
my $urlにはmt-xmlrpc.cgiのアドレスをhttp://の形式で書くんだけど
hostsをいじって無ければドメイン名からはアクセスできない
なので
my $url= http://サーバーのIPアドレス/xxxx/xxxx/mt-xmlrpc.cgi
って感じにしてやれば大丈夫

コメントする