月別アーカイブ: 2007年4月
VPN
打率の遷移
ftpスピードアップ
FTP接続でログイン認証が遅い。
これを解決する方法があった。
Edit the file /System/Library/LaunchDaemons/ftp.plist で
以下の部分を探し(12行目)
1 2 3 4 5 |
<xmp><key>ProgramArguments</key> <array> <string>xftpd</string> <string>-a</string> </array></xmp> |
1 2 |
<xmp><string>-a</string>の -a の後に大文字のアイ( I )を書き加える。 <string>-aI</string>である。</xmp> |
ログインに15秒程度かかっていたのが5秒以内になった。
Spam-その25
昨晩の打率 .577 三振 0 通算打率 .471 三振4
Apr 24 01:04:57 – spamtrainer Version 1.6.1
0.000 0 519 0 non-token data: ham
0.000 0 1073 0 non-token data: spam
またAppleがやった
4月のsecurity update 2007.4 をかけたら、またAppleは設定を変えてくれたよ。困ったもんだ。アップデートしないわけにはいかない。しかし勝手に設定が変更されちゃうというのが何回もあった。困ったもんだ。説明が一切ないからな。
今度はFTP接続ができない。yk嬢からのクレームがあった。
みたらFTPサービスが停止している。でサービス開始したら、今度はroot directory まで見えちゃう。サーバ管理のFTPの認証済みユーザの参照先:ホームディレクトリのみ という設定が有効にならない。で、Googleで調べたらxftpd だったのが ftpd に変更されちゃったらしい。
というわけで
/system/Library/LaunchDaemons/ftp.plist
を昔のバックアップにあったファルを参考に書き換えた。
サーバ管理からFTPサービスを止め、root 権限で、上記directory で
#cp ftp.plist ftp.plist.2007.4
と、コピーしておいて
ftp.plist ファイルの
6行目 ftpd → xftpd
8行目 ftpd → xftpd
11行目 ftpd → xftpd
12行目 -l → -a
18行目 Bonjour → SockPassive
とそれぞれ書き換えて、さらに
21行目と22行目の間に
1 2 |
<xmp> <key>SockType</key> <string>SOCK_STREAM</string></xmp> |
を挿入する。
20074ftpplist.txtが2007.4のSecurity Update で代った ftp.plist。
xftpplist.txtが以前の ftp.plist。
サーバ管理からFTP開始。
ちなみにftpd だとファイルをアップロードするとパーミッションが ファイル → 640
ディレクトリ → 750 となってしまう。これを防ぐには、
/etc/ 以下に
ftpd.conf という名のファイルを作る
テキストエディタで編集し
umask all 022
と一行記述 。FTP再起動。
どうしようもないな
生理セミナーの演題と要旨は1週間前までに提出/掲示することになっている。
前回の私が当番だったときは、セミナー係に2週間前にとどけたが、メールでの連絡は当日午後4時。
本日の演者は、セミナー係に何も連絡していない。
Mon, 23 Apr 2007 03:15:58 +0900 (JST)(演者のパソコンの時計が正しければ)送信した。
Mon, 23 Apr 2007 03:16:52 +0900 (JST)に www.kanseiがInitiative.kanseiから受け取って、
Mon, 23 Apr 2007 05:46:19 +0900 (JST)にkiban がInitiative.kanseiから受け取って、
Mon, 23 Apr 2007 05:46:19 +0900 (JST)にmike がkibanから受け取った。
Mon, 23 Apr 2007 05:46:42 +0900 (JST)にmike が内部処理して、
Mon, 23 Apr 2007 05:48:29 +0900 (JST)に「投稿が許されていない者からのメールだから処理しなさい」というメールをメーリングリストの管理者に送付している。
管理者が朝出勤して、メールを見て承認して
Mon, 23 Apr 2007 08:53:35 +0900 (JST)にメーリングリストが配信を始めた。
というわkで、本人は当日午前3時にようやく論文のAbstractを日本語にしてメーリングリストに投稿したのはいいけど、登録していないアドレスなので、配信されなかった。
kansei のDNSはこの前のトラブルで修正されたはずだが、おざなりの訂正なのでkibanに来るのに2時間もかかる。
セミナー係に連絡がないのでブログには掲載されない。メーリングリストの仕組みがわかってないからメーリングリストでの配信もできない。
という訳で、1週間前に掲示する という規則を遵守するためには
1)当番演者がちゃんと1週間前に論文を読みまとめる
2)セミナー係がちゃんと連絡する
3)メーリングリストが使える
という単純なことができないとだめですな。
Spam-その24
自動転送先がこっちのサーバだと...
メールの自動転送先をこっちのサーバに指定すると、なかなかこっちのサーバにとどかない。二日もかかる、自動転送先を他にするとすぐ届く というクレームが来た。
ま、こっちのサーバだけがおかしい→こっちのサーバがおかしい という結論になるだろうな。
こっちのサーバのせいではないと、メールのヘッダーを表示させて、そっちのサーバのせいだと、説いてそっちのサーバの管理者にメールヘッダーを印刷したのを持っていかせた。
その結果、原因はこっちのサーバではないのが判明した。そっち(どっちだ?名誉のために書かない)のDNSサーバの設定ミスというか、設定しそこないであった。
で、解決したのだろうか?解決するとクレーマーはなにも言ってこない。これが世の常だ。
Spam-その23
昨晩の打率 .647 三振 0 通算打率 .446 三振4
Apr 20 01:01:35 – spamtrainer Version 1.6.1
0.000 0 413 0 non-token data: ham
0.000 0 1014 0 non-token data: spam
Spam-その22
昨晩の打率 .640 三振 0 通算打率 .439 三振4
Apr 19 01:04:00 – spamtrainer Version 1.6.1
0.000 0 362 0 non-token data: ham
0.000 0 1004 0 non-token data: spam
Spam-その21
昨晩の打率 .696 三振 1 通算打率 .428 三振4
Apr 18 01:04:00 – spamtrainer Version 1.6.1
0.000 0 313 0 non-token data: ham
0.000 0 993 0 non-token data: spam
やっぱし、Apple が悪い。ちゃんと学習できるように設定していないんだ。
打率はどんどん上昇するだろう。
spam-その20
昨晩の打率 .519 三振無し 通算打率 .413 三振3
Apr 17 01:04:00 – spamtrainer Version 1.6.1
0.000 0 258 0 non-token data: ham
0.000 0 965 0 non-token data: spam
Spam-その19
好調になってきた。打率の行方は上昇しかない!!
spamtrainer のログを見ると
# cat spamtrainer.log
Apr 14 01:01:55 – spamtrainer Version 1.6.1
0.000 0 191 0 non-token data: ham
0.000 0 929 0 non-token data: spam
Apr 15 01:00:13 – spamtrainer Version 1.6.1
0.000 0 203 0 non-token data: ham
0.000 0 929 0 non-token data: spam
Apr 16 01:00:57 – spamtrainer Version 1.6.1
0.000 0 213 0 non-token data: ham
0.000 0 937 0 non-token data: spam
#
とある。読み方がわからん。ま、午前1時になにかやっていることは確実だ。
SpamAssassin Training Error
によると、
Apparently everyone agrees that Apple’s SA implementation is either messed up or deliberately hobbled.
I ended up creating the symbolic link as described in several places:
sudo -s
cd /var/amavis
mv .spamassassin .spamassassin.old
su clamav
ln -s /var/clamav/.spamassassin /var/amavis/.spamassassin
…then fixing the /etc/mail/spamassassin/local.cf file:
change ‘auto_learn’ to ‘bayes_auto_learn’
change ‘safe_reporting’ to ‘report_safe’
comment out ‘use_terse_report 0’
comment out ‘subject_tag’ and ‘rewrite_subject’
(note that it is “report_safe” and not “safe_report” as indicated in some places)
…then setting up the junkmail and notjunkmail accounts as Apple recommends
…then using spamtrainer
Now, after scanning 200+ spams and 200+ non-spams (which takes quite a long time with spamtrainer), Bayesian scanning appears to be working. I can tell because the X-Spam-Status tag in my mail headers now contains a BAYES tag:
X-Spam-Status: Yes, hits=5.33 tagged_above=-999 required=5 tests=BAYES_50, HELO_DYNAMIC_IPADDR2, HTML_40_50, HTML_MESSAGE, MIME_HTML_ONLY
That was NOT trivial (considering that this is supposed to already be a feature of Tiger). The discussion in the afp548 thread starts on 10.4.2. This misconfiguration (deliberate hobbling?) persists in 10.4.6. wtf?
だそうで、結局、いままで学習されていないかったのではないかと思う今日この頃、皆さん、いかがお過ごしですか?(きっこ風)
Spamassassin その2
Spamassassin の自動学習プログラム Spamtrainer はうまく動作しているみたいだ。
午前1時すぎると、junkmail, notjunkmail にたまったメールを読んで(多分)、廃棄している。廃棄しているのは確実だ。学習がうまくいっているのかは不明。
spamassassin training
OSXのspamメール対策にはspamassassin があって、マニュアルによれば自動的に学習するが、学習したメールを廃棄しない となっている。やってられないので Spamtrainer を導入した。
解凍して、素直にインストールした。
spammail notspammail のアカウントははマニュアル通りに作ってあったから、
まず、Spamtrainer のマニュアルにしたがって、root 権限で、spamtrainer -fを実行。
root# /usr/sbin/spamtrainer -f
If necessary, this will create the missing symbolic link in OS X 10.4.x.
It will also fix other configuration issues in the default installation,
which prevent spamassassin from properly working with additional domains.
All files modified by this routine will be first backed up in their
respective directories
Read the ‘Caveats’ chapter in the included documentation for more information.
Would you like to proceed? (yes/no)
yes
Stopping amavisd…
If you use 10.4.7 or 10.4.8, this may produce:
‘Workaround Bonjour: Unknown error: 0’.
It is safe to ignore it.
The symbolic link from
/var/amavisd/.spamassassin to /var/clamav/.spamassassin
has been created
The existing directory /var/amavisd/.spamassassin has been
backed up to /var/amavis/.spamassassin_04132007-130258
The existing file /etc/amavisd.conf has been
backed up to /etc/amavisd.conf_back_04132007-130258
@local_domains_maps = ( 1 ); was added to amavisd.conf
This ensures that additional domains will get processed
by the content filter as well.
The existing file /etc/local.cf has been
backed up to /private/etc/mail/spamassassin/local.cf_back_04132007-130300
local.cf was fixed
This ensures the settings are correct for your system.
Starting amavisd…
If you use 10.4.7 or 10.4.8, this may produce:
‘Workaround Bonjour: Unknown error: 0’.
It is safe to ignore it.
root#Workaround Bonjour: Unknown error: 0
次に、読み込むメールと実施する時間を設定するため
/usr/sbin/spamtrainer -i を実行
root# /usr/sbin/spamtrainer -i
Checking if there is a startup item for ‘learn_junk_mail’ or ‘spamtrainer’
There IS NO plist for learn_junk_mail
There IS a cron job for learn_junk_mail
If you want to use ‘spamtrainer’ it IS RECOMMENDED that this cron be disabled
Would you like me to disable it for you (yes/no)
yes
‘learn_junk_mail’ cron job has been disabled’
There IS NO plist for spamtrainer
There IS NO cron job for spamtrainer
if you want to use ‘spamtrainer’ it is recommended that this be added
Would you like me to enable it for you (yes/no)
yes
What time would you like the job to run (24-hour format)?
Please enter the hour (1)
1
Please enter the minutes (0)
0
Would you like SPAM/HAM messages to be deleted after the learn process? (n)
y
Would you like to log bayes stats into /var/log/spamtrainer.log? (n)
y
Enter name of mail store with SPAM/HAM mailboxes? Enter for default (default)
default
Enter name of mailbox with SPAM? Enter for default (junkmail)
junkmail
Enter name of mailbox with HAM? Enter for default (notjunkmail)
notjunkmail
The following cron job for ‘spamtrainer’ has been prepared
0 1 * * * /usr/sbin/spamtrainer -p default -j junkmail -n notjunkmail -d -l
Would you like to add it? (yes/no)
yes
The following cron job for ‘spamtrainer’ has been enabled’
0 1 * * * /usr/sbin/spamtrainer -p default -j junkmail -n notjunkmail -d -l
root#
これで junkmail, notjunkmail を毎日午前1時に読み込み、消去するはず...
spam-その18
spam mail-その17
4月10日の結果
総メール数50通
迷惑メール数32通
mikeがjunk と判定した迷惑メール8通
positeve failuar0
打率 .250
通算打率 .400
通算三振数 2
11日の結果
総メール数31通
迷惑メール数32通
mikeがjunk と判定した迷惑メール3通
positeve failuar 0
打率 .094
通算打率 .366
通算三振数 2
学習したメール(通算)
spam 1263通
ham 190通
絶不調、立ち直れるか?
spam mail-その16
週末の結果
総メール数140通
迷惑メール数86通
mikeがjunk と判定した迷惑メール33通
positeve failuar 1
打率 .384
通算打率 .422
通算三振数 2
学習したメール(通算)
spam 1171通
ham 186通
spam mail-その15
昨日の結果
総メール数92通
迷惑メール数12通
mikeがjunk と判定した迷惑メール6通
positeve failuar なし
打率 .500
通算打率 .445
通算三振数 1
学習したメール
spam 1115通
ham 178通
打率上昇に転向??