<code>
CREATE USER 'local_wordpress'@'localhost' IDENTIFIED BY 'local_user_pass';
GRANT USAGE ON *.* TO 'local_wordpress'@'localhost';
GRANT ALL PRIVILEGES ON `localhost_wordpress`.* TO 'local_wordpress'@'localhost';
</code>
さて、ローカル環境にWordpressの実行環境を作る方法だけど、一つ一つソフトをインストールしたり設定したりするのはかなりめんどくさい。
そこで、ローカルに一気にインストールできるツールが出回っている。XAMPP(ザンプ)と言うツールだ。いわゆる、LAMP(Linux、Apache、MySQL、PHP or Perl、これはLinux版)のWindows版のツールと言う意味らしい(なので頭の文字がLinuxではなくx-Windowって意味になってる?)これをインストールするとWordpress以外は一気にインストールできるのでお勧めだ。 XAMPP Installers and Downloads for Apache Friendsに行き、XAMPPをダウンロードしよう。
今度のメッセージは一応注意。
【Important! Because an activated User Account Control (UAC) on your system some functions of XAMPP are possibly restricted. With UAC please avoid to install to C:\Program Files (x86) (missing write permissions). Or deactivate UAC with msconfig after this setup.】
UACの問題が出るので、【C:\Program Files (x86)】みたいな一般的なインストール先へのインストールはやめましょうってこと。この後出てくるけど、このツールのデフォルトのインストール先は【C:\xampp】になるので、そっちに入れておけば問題はない。OKを押して続行する。
Bitnami for XAMPPと言うのは、XAMPPの環境に簡単にインストールできるWordpressアプリなのだが、僕が試用した限りではbitnami_wordpressと言う名前の不要なWordpressサイトを作るだけなので(テーマの編集などならそれで済ませても構わないのだが)、今回はチェックを外してWordpressは別途落とすこととした。
<code>
# ***ATTENTION*** --ctladdr options is stronger than "--distribute",
# Hence even if config.ph has the setting &DEFINE_MODE(distribute),
# this "fml.pl ... --ctladdr" does commnads-service;
"|/usr/local/bin/spamassassin |/home/user-name/fml/fml.pl /home/user-name/fml/spool/ml/fml-name --ctladdr"
# Multipart Canceler Filter by Yuao TANIGAWA
#"|/home/user-name/fml/bin/multipart.pl |/home/user-name/fml/fml.pl /home/user-name/fml/spool/ml/fml-name --ctladdr"
</code>
これも両方設定は同じことなんだけどおまじないで両方書き換えで。要するにPERMIT_XXX_FROMをmembers_onlyに、REJECT_XXX_HANDLERをignoreにしている。参加者以外からのメールは拒否した上に無視する、と言うこと。無視にしておかないと、『spam業者がfmlにメールを投げる』→『fmlが拒否メールをspam業者宛てに返す』→『spam業者から文句のメールが返ってくる』と言うくだらない事態が起こるからだ。文句と言うのはReturned mail: see transcript for details(reason: 550 5.1.:User unknown)だったりWarning: could not send message for past 4 hours(454 4.7.1 : Relay access denied)だったりとまあいろいろ(と言うか文句言ってるのはspam業者の鯖じゃなくてうちの鯖か)あるのだけど、こんな無駄なキャッチボールしてても仕方ない。
<code>
sub IgnoreHandler
{
&Log("Ignored: \"From:\" field is not member");
# &WarnE("Ignored NOT MEMBER article from $From_address $ML_FN",
# "Ignored NOT MEMBER article from $From_address");
}
</code>
Return-Path:
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on www302.sakura.ne.jp
X-Spam-Level: ******
X-Spam-Status: No, score=6.1 required=12.0 tests=BAYES_50,CONTENT_TYPE_PRESENT, HTML_MESSAGE,MIMEQENC,MULTIPART_ALTERNATIVE,ONLY1HOPDIRECT,ONLY1HOPDIRECTRIPE, QENCPTR1,QENCPTR2,RCVD_IN_SBL,RIPE_NCC,RP_MATCHES_RCVD,TOOLONGSTR, URIBL_JP_SURBL autolearn=no version=3.3.2
Received: from www302.sakura.ne.jp (ksav31.sakura.ne.jp [210.224.165.211])
by www302.sakura.ne.jp (8.14.5/8.14.5)
with ESMTP id s1PCK5ID038721 for <___@________.net>;
Tue, 25 Feb 2014 21:20:05 +0900 (JST) (envelope-from OnlineDoctorate-___=______.net@_alaskansmokedsalmonplus.com)
X-Nat-Received: from [202.181.99.22]:20402 [ident-empty] by smtp-proxy.isp with TPROXY id 1393330805.22619
Received: from net._alaskansmokedsalmonplus.com (net._alaskansmokedsalmonplus.com [77.81.108.140])
by www302.sakura.ne.jp (8.14.5/8.14.5)
with ESMTP id s1PCJhkJ038572 for <___@________.net>;
Tue, 25 Feb 2014 21:19:46 +0900 (JST) (envelope-from OnlineDoctorate-___=_______.net@alaskansmokedsalmonplus.com)
MIME-Version: 1.0
From: Online Doctorate
To: ___@______.net
Subject: Find the degree program for you.
Reply-To: replyto1@_alaskansmokedsalmonplus.com
List-Unsubscribe:
Message-ID: <5253142afb72bdd6c0db0751d4f7433d@_alaskansmokedsalmonplus.com>
Date: Tue, 25 Feb 2014 12:19:51 +0000
X-Anti-Virus: Kaspersky Anti-Virus for Linux Mail Server 5.6.45.2/RELEASE, bases: 25022014 #7301207, status: clean
X-Antivirus: avast! (VPS 140224-1, 2014/02/25), Inbound message
X-Antivirus-Status: Clean
Content-Type: multipart/alternative; boundary=”===============3635023624886176509==”
Content-Transfer-Encoding: 7bit
There is no text only message available for this email. Please use an HTML capable email client.
Unsubscribe from future emails: unsub1@_alaskansmokedsalmonplus.com
(HTMLパートは省略)
Return-Path:
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on www302.sakura.ne.jp
X-Spam-Level: **********
X-Spam-Status: No, score=10.9 required=12.0 tests=BAYES_50, CONTENT_TYPE_PRESENT,HTML_MESSAGE,MIMEQENC,MULTIPART_ALTERNATIVE, ONLY1HOPDIRECT,ONLY1HOPDIRECTRIPE,QENCPTR1,QENCPTR2,RCVD_IN_MSPIKE_L3, RIPE_NCC,RP_MATCHES_RCVD,TOOLONGSTR,URIBL_DBL_SPAM,URIBL_JP_SURBL autolearn=no version=3.3.2
Received: from www302.sakura.ne.jp (ksav51.sakura.ne.jp [219.94.192.131])
by www302.sakura.ne.jp (8.14.5/8.14.5)
with ESMTP id s1OAV2Tv091610 for <____@______.net>;
Mon, 24 Feb 2014 19:31:02 +0900 (JST) (envelope-from CookingSchool-___=______.net@jessicadegouw.net)
X-Nat-Received: from [202.181.99.22]:44918 [ident-empty] by smtp-proxy.isp with TPROXY id 1393237862.29202
Received: from non._jessicadegouw.net (non._jessicadegouw.net [31.220.43.158])
by www302.sakura.ne.jp (8.14.5/8.14.5)
with ESMTP id s1OAV1lg091606 for <___@______.net>;
Mon, 24 Feb 2014 19:31:01 +0900 (JST) (envelope-from CookingSchool-___=________.net@jessicadegouw.net)
MIME-Version: 1.0
From: Cooking School
To: ___@________.net
Subject: You won’t get in trouble for playing with food here.
Reply-To: replyto1@_jessicadegouw.net
List-Unsubscribe:
Message-ID: <5253142afb72bdd6c0db0751d4f7433d@_jessicadegouw.net>
Date: Mon, 24 Feb 2014 05:31:02 -0500
X-Anti-Virus: Kaspersky Anti-Virus for Linux Mail Server 5.6.45.2/RELEASE, bases: 24022014 #7276764, status: clean
X-Antivirus: avast! (VPS 140223-1, 2014/02/24), Inbound message
X-Antivirus-Status: Clean
Content-Type: multipart/alternative; boundary=”===============9001998848229897669==”
Content-Transfer-Encoding: 7bit
There is no text only message available for this email. Please use an HTML capable email client.
Unsubscribe from future emails: unsub1@_jessicadegouw.net
<code>
# For irregular spam.
rawbody UNSUB1 /Unsubscribe from future emails/
describe UNSUB1 Unsubscribe adress is unsub1@example.net
score UNSUB1 10.0
</code>
ついでに、今のprivate_prefsを他のところも抜粋して書いておくと
<code>
#
# more information (default spamassassin rules)
# -- about : http://spamassassin.apache.org/tests_3_2_x.html
#
# added 2011/04/15 by [chatarou] helped by [yoh]
# for checking SAKURA & MY MAIL's network.
# following IPs are anti-Virus Servers of SAKURA INTERNET (ksavXX.sakura.ne.jp)
trusted_networks 210.224.165.38 210.224.165.45 210.224.165.143 210.224.165.142 210.224.165.211 210.224.165.212 210.224.165.35 210.224.165.220 219.94.192.131 219.94.192.132 219.94.192.133 219.94.192.134 219.94.192.135 219.94.192.136 219.94.192.137 219.94.192.138 219.94.192.139 219.94.192.140 219.94.192.141 219.94.192.142 219.94.192.143 219.94.192.144 219.94.192.145 219.94.192.146 219.94.192.147 219.94.192.148 219.94.192.149 219.94.192.150 219.94.192.151 219.94.192.152 219.94.192.153 219.94.192.154 219.94.192.155 219.94.192.156 219.94.192.157 219.94.192.158 219.94.192.159 219.94.192.160 219.94.192.161 219.94.192.162 219.94.192.163 219.94.192.164 219.94.192.165 219.94.192.166 219.94.192.167 219.94.192.168 219.94.192.169 219.94.192.170 219.94.192.171 219.94.192.172 219.94.192.173 219.94.192.174 219.94.192.175 219.94.192.176 219.94.192.177 219.94.192.178 219.94.192.179
#replace_tag MYMTA ((mail|www)\.chatarou\.net)
#trusted_networks 127.0.0.1 192.168.0.1/24
# I receive very few Japanese spam mails, allmost all of spam mails are come from foreign countries.
# so changes some socres of Japanese mail's rule. :2011/04/26 by [chatarou]
score ISO2022JP_CHARSET -2.0
score ISO2022JP_BODY -2.0
#
# We use SAKURAWEB as SMTP. so the following rule has no meanings. : 2007/12/21 by [chatarou]
#
score SAKURAWEB 0.0
# For RAKUTEN Mail.
header RAKUTEN_INFO Subject =~ /\!Z3ZE7\!\[/
describe RAKUTEN_INFO Rakuten Mail
score RAKUTEN_INFO -5.0
# For SONY Info Mail.
header SONY_INFO From =~ /info\@e\.crmstyle\.com/
describe SONY_INFO SONY Info Mail
score SONY_INFO -5.0
# For irregular spam.
header VIRTUAL_VEGASCLUB From =~ /Virtual VegasClub/
describe VIRTUAL_VEGASCLUB Virtual VegasClub
score VIRTUAL_VEGASCLUB 5.0
header LINKEDIN Subject =~ /LinkedIn/
describe LINKEDIN LinkedIn
score LINKEDIN 5.0
header PAYROLL Subject =~ /Payroll Invoice/
describe PAYROLL Payroll Invoice
score PAYROLL 50.0
header IRREGULAR_RETURN_PATH Return-Path =~ /\-___\=example\.net/
describe IRREGULAR_RETURN_PATH Return-Path contains (-___=example.net)
score IRREGULAR_RETURN_PATH 6.0
rawbody UNSUB1 /Unsubscribe from future emails/
describe UNSUB1 Unsubscribe adress is unsub1@example.net
score UNSUB1 10.0
#
# "FERA" ,or "DYN_FERA" is defined & scored as porn word by [yoh].
# but, "FERRARI" is not porn word for [chatarou]...: 2011/04/16 by [chatarou]
#
rawbody FERRARI /\%U\%\'\%i\!\<\%j/
describe FERRARI Ferrari (maybe F1 WORKS TEAM)
score FERRARI -0.1
#'
rawbody MCRALEN /\%\^\%\/\%i\!\<\%l\%s/
describe MCRALEN Mcralen (maybe F1 WORKS TEAM)
score MCRALEN -0.1
meta F1_MAIL FERRARI && MCRALEN
score F1_MAIL -4.0
#
# Other Virtual Domains(chatarou.sakura.ne.jp, www302.sakura.ne.jp) are not used on mailservice. : 2011/04/24 by [chatarou]
#
header FAKE_VDH_TO To =~ /\@(chatarou|www302)\.sakura\.ne\.jp/
describe FAKE_VDH_TO To: @(chatarou|www302).sakura.ne.jp
score FAKE_VDH_TO 5.0
#
# Other Virtual Domains are used by spammers as fake from-address. : 2011/04/24 by [chatarou]
#
header FAKE_VDH_FROM From =~ /\@www302\.sakura\.ne\.jp/
describe FAKE_VDH_FROM From: @www302.sakura.ne.jp
score FAKE_VDH_FROM 5.0
#
# Spammers frequently writes "Nothing" in To:header. . : 2011/04/24 by [chatarou]
#
header NOTHING_TO_HEADER To =~ /!@/
describe NOTHING_TO_HEADER To: Nothing
score NOTHING_TO_HEADER 5.0
#
# Default postmaster is used by almost only spammers. : 2008/06/20 by [chatarou]
#
header POSTMASTER_TO To =~ /postmaster\@example\.net/
describe POSTMASTER_TO To: postmaster@example.net
score POSTMASTER_TO 5.0
# threshold level down from 10.0 to 8.0 2011/04/13 by [chatarou]
# threshold level up to 12.0 2011/04/18 by [chatarou]
required_score 12.0
</code>