ブログ
ブログ一覧
新サーバPOSTFIXにS25Rスパム対策を導入
S25Rスパム対策は、現メールサーバに導入し高いスパム阻止効果を上げています。
Dovecot+Postfixの新サーバにも導入しました。その覚書です。
上記サイトのPostfixでの設定方法を参考にwhite_list、rejections、helo_restrictions三つのファイルを作成します。
今回white_listは上記サイト様のものがすばらしいので(更新もされているようです)簡単なphpスクリプトで
月一回取り込ませていただく事としました。(感謝!)
以下の簡単なスクリプトをcronで月一回実行させます。
<?php
$url=”http://www.gabacho-net.jp/anti-spam/white-list.txt“;
$white_list=”/home/****/white_list”; ユーザーディレクトリの適当な場所に保存
$read=@fopen($url,”r”);
$write=@fopen($white_list,”w”);
while($line=@fgets($read,1024)){
fputs($write_fp,$line);
}
fclose($read);
fclose($write);
?>
ユーザーディレクトリに保存したwhite_listを/etc/postfix/white_listへリンク
次に /etc/postfix/main.cfに追加設定
heloが必要
smtpd_helo_required = yes
HELO コマンドの送信制限
smtpd_helo_restrictions =
permit_mynetworks,
reject_invalid_hostname,
check_helo_access regexp:/etc/postfix/helo_restrictions
差出人アドレスの制限
smtpd_sender_restrictions =
permit_mynetworks,
reject_non_fqdn_sender,
reject_unknown_sender_domain
ホワイトリストは許可
smtpd_client_restrictions =
permit_mynetworks,
check_client_access regexp:/etc/postfix/white_list,
check_client_access regexp:/etc/postfix/rejections
以上で設定完了です。
拒絶ログソーティングスクリプト も大変便利なので使用します。
次はいよいよDKIMproxyです。前回大変だったので心配です。
DOVECOT+POSTFIXでメールサーバ構築
Postfix+Cyrusでメールサーバを運用しておりましたが、新メールサーバのDevecotを使っての
構築テストです。Version 2.0.21
Dovecotをsslを使用しない設定で起動させると以下のエラーを吐く
doveconf: Warning: Obsolete setting in /etc/dovecot/dovecot.conf:93: protocol { ssl_listen } has been replaced by service { inet_listener { address } }
/etc/dovecot/dovecot.conf
”ssl_listen = *”をコメントアウトすると起動しました。特に他の設定いじらなくても良いようです。
/etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:~/Maildir
これでpop3受信の確認が出来ました
しかし・・・saslauthデーモンを起動させたとたん
Jan 27 18:07:20 dns postfix/smtpd[23217]: connect from unknown[113.78.39.85]
Jan 27 18:07:23 dns postfix/smtpd[23217]: warning: unknown[113.78.39.85]: SASL LOGIN authentication failed: authentication failure
Jan 27 18:07:24 dns postfix/smtpd[23217]: warning: unknown[113.78.39.85]: SASL LOGIN authentication failed: authentication failure
Jan 27 18:07:25 dns postfix/smtpd[23217]: warning: unknown[113.78.39.85]: SASL LOGIN authentication failed: authentication failure
Jan 27 18:07:26 dns postfix/smtpd[23217]: warning: unknown[113.78.39.85]: SASL LOGIN authentication failed: authentication failure
Jan 27 18:07:27 dns postfix/smtpd[23217]: warning: unknown[113.78.39.85]: SASL LOGIN authentication failed: authentication failure
Jan 27 18:07:28 dns postfix/smtpd[23217]: warning: unknown[113.78.39.85]: SASL LOGIN authentication failed: authentication failure
Jan 27 18:07:29 dns postfix/smtpd[23217]: warning: unknown[113.78.39.85]: SASL LOGIN authentication failed: authentication failure
Jan 27 18:07:29 dns postfix/smtpd[23217]: warning: unknown[113.78.39.85]: SASL LOGIN authentication failed: authentication failure
Jan 27 18:07:30 dns postfix/smtpd[23217]: warning: unknown[113.78.39.85]: SASL LOGIN authentication failed: authentication failure
Jan 27 18:07:31 dns postfix/smtpd[23217]: warning: unknown[113.78.39.85]: SASL LOGIN authentication failed: authentication failure
Jan 27 18:07:35 dns postfix/smtpd[23217]: warning: unknown[113.78.39.85]: SASL LOGIN authentication failed: authentication failure
Jan 27 18:07:39 dns postfix/smtpd[23217]: warning: unknown[113.78.39.85]: SASL LOGIN authentication failed: authentication failure
Jan 27 18:07:43 dns postfix/smtpd[23217]: warning: unknown[113.78.39.85]: SASL LOGIN authentication failed: authentication failure
Jan 27 18:07:47 dns postfix/smtpd[23217]: warning: unknown[113.78.39.85]: SASL LOGIN authentication failed: authentication failure
Jan 27 18:07:51 dns postfix/smtpd[23217]: warning: unknown[113.78.39.85]: SASL LOGIN authentication failed: authentication failure
Jan 27 18:07:55 dns postfix/smtpd[23217]: warning: unknown[113.78.39.85]: SASL LOGIN authentication failed: authentication failure
Jan 27 18:07:59 dns postfix/smtpd[23217]: warning: unknown[113.78.39.85]: SASL LOGIN authentication failed: authentication failure
Jan 27 18:08:03 dns postfix/smtpd[23217]: warning: unknown[113.78.39.85]: SASL LOGIN authentication failed: authentication failure
Jan 27 18:08:07 dns postfix/smtpd[23217]: warning: unknown[113.78.39.85]: SASL LOGIN authentication failed: authentication failure
Jan 27 18:08:10 dns postfix/smtpd[23217]: warning: unknown[113.78.39.85]: SASL LOGIN authentication failed: authentication failure
Jan 27 18:08:12 dns postfix/smtpd[23217]: too many errors after AUTH from unknown[113.78.39.85]
Jan 27 18:08:12 dns postfix/smtpd[23217]: disconnect from unknown[113.78.39.85]
Jan 27 18:11:32 dns postfix/anvil[23218]: statistics: max connection rate 1/60s for (smtp:113.78.39.85) at Jan 27 18:07:20
Jan 27 18:11:32 dns postfix/anvil[23218]: statistics: max connection count 1 for (smtp:113.78.39.85) at Jan 27 18:07:20
Jan 27 18:11:32 dns postfix/anvil[23218]: statistics: max cache size 1 at Jan 27 18:07:20
またもや中国からのアクセスです。いやになりますね。
覚えきれないので書き留めます。サーバー構築覚書
新規サーバーインストールで、あい変わらず同じところでつまづくのでマジな覚書です。
自分以外に参考にはならないでしょうが、稼動まで逐次書き留めます。
1日目 OSインストール
◎VNC設定ファイルの修正 .vnc/xstartup 変更箇所赤字
#!/bin/sh
vncconfig -iconic &
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
twm &
◎apacheの設定変更
起動時以下のエラーを吐くので設定変更
[crit] Apache is running a threaded MPM, but your PHP Module is not compiled
to be threadsafe. You need to recompile PHP. Pre-configuration failed
変更箇所
Apache2をprefork MPMで起動するよう設定する
# /sbin/update-alternatives –config apache2 を実行
選択 コマンド ———————————————–
+ 1 /usr/sbin/apache2.worker
* 2 /usr/sbin/apache2.prefork
Enter を押して現在の選択 [+] を保持するか、選択番号を入力します:
2を選択しpreforkに変更する。その後apache2を起動
新春お気楽スキー初め
ハンタマで初すべり

スキー靴の初履かたがたハンタマへ行ってきました。
道路はごらんのように雪はあまりありませんでした。
ゲレンデは、きれいにピステンがかけられ圧雪状態です。

この次期この地方でこれだけのゲレンデが滑走できるのは、人口降雪設備の完備した
ここだけでしょう。ゲレンデ上部には高速レーサーやイントラの足慣らしがほとんどで
我々のようなお気楽スキーヤーはほとんどいません。なんか場違いな感じです。
ハードパックスノーはお気楽スキーヤー向きではないので早々にあがりました。




