ナビゲーション
FrontPage
FreeBSD
Linux
Citrix XenServer
VMware ESXi
Unixコマンド
MySQL
PostgreSQL
Windows
CMS/CRM
クラウド
用語
PHPスクリプト
Bashシェルスクリプト
Rubyスクリプト
開発日記
検索
ツールボックス
新しいページの作成
バックアップの表示
外部のリンク元
最近更新したページ
全ページ
ヘルプ
凍結
アップロード
ページ名の変更
最新の40件
2016-08-17
Linux/NagiosQL
Linux/CentOSチューニング
2016-02-23
Linux/ソフトウェアRAID復旧手順
2016-02-18
FreeBSD/DHCP
FreeBSD/squid
2016-02-15
Unixコマンド/file
2016-02-05
FreeBSD/DynaBook
FreeBSD/Linux compatibility
2016-01-21
PHPスクリプト/PEAR DBインストールできない
PHPスクリプト/PEAR DB
2016-01-20
PHP/フレームワーク/Zend Framework
PHP/フレームワーク
FreeBSD/Postfix+amavisd+clamav
2016-01-15
FreeBSD/sl
2015-12-04
Unixコマンド/dig
Unixコマンド/nslookup
Unixコマンド/traceroute
Linux/rsync
FreeBSD/rsync
Unixコマンド/vipw
2015-11-25
Linux/Postfix+MySQL+Postfix AdminによるバーチャルSMTPサーバの構築
Linux/Postfix + postgrey
2015-11-24
Linux/Postfix + amavisd + clamav
2015-05-25
Unixコマンド/ifconfig
2015-05-23
Unixコマンド/netstat
Unixコマンド/route
Unixコマンド/lsof
Unixコマンド/disown
Unixコマンド/time
Unixコマンド/crontab
2015-05-22
Unixコマンド/nohup
Unixコマンド/fgとbg
Unixコマンド/nice
Unixコマンド/kill
Unixコマンド/jobs
Unixコマンド/restor
Unixコマンド/dump
Unixコマンド/uncompress
Unixコマンド/compress
Unixコマンド/zcat
total:
1378
today:
1
yesterday:
0
now:
1
本文
ノート
?
編集
差分
一覧
Linux/Postfix + postgrey の編集
*Postfix + postgrey [#w46fcad9] [[dokuwiki.fl8.jp掲載済>http://dokuwiki.fl8.jp/01_linux/03_mail/03_postfix_postgrey]] #contents http://centossrv.com/postfix-targrey.shtml [[最新版URL>http://apt.sw.be/redhat/el5/en/SRPMS.rpmforge/]] **インストール [#u60d8731] # wget http://apt.sw.be/redhat/el5/en/SRPMS.rpmforge/postgrey-1.32-1.rf.src.rpm # rpm -ivh postgrey-1.32-1.rf.src.rpm # cd /usr/src/redhat/SOURCES/ # tar zxvf postgrey-1.32.tar.gz # cd postgrey-1.32 # wget http://k2net.hakuba.jp/pub/targrey-0.31-postgrey-1.32.patch # patch -p0 < targrey-0.31-postgrey-1.32.patch # cd .. # rm -f postgrey-1.32.tar.gz && tar czvf postgrey-1.32.tar.gz postgrey-1.32 # rm -rf postgrey-1.32 # rpmbuild -bb --clean /usr/src/redhat/SPECS/postgrey.spec # yum -y install postgrey && rpm -e postgrey # rpm -ivh /usr/src/redhat/RPMS/noarch/postgrey-1.32-1.rf.noarch.rpm # rm -f /usr/src/redhat/RPMS/noarch/postgrey-* # rpmbuild --rmsource --rmspec /usr/src/redhat/SPECS/postgrey.spec # rm -f postgrey-1.32-1.rf.src.rpm **Postfix設定ファイル編集 [#a6c01218] # vi /etc/postfix/main.cf smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination −−追加(ここから)−− check_recipient_access hash:$config_directory/whitelist_recipient check_client_access hash:$config_directory/whitelist_client check_client_access regexp:$config_directory/permit_client_nots25r check_policy_service inet:60000 permit smtpd_data_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination check_recipient_access hash:$config_directory/whitelist_recipient check_client_access hash:$config_directory/whitelist_client check_client_access regexp:$config_directory/permit_client_nots25r check_policy_service inet:60000 permit −−追加(ここまで)−− **taRgrey用Postfix設定ファイルダウンロード [#e63eaebd] # wget http://k2net.hakuba.jp/spam/postfix.conf.2.tar.gz # tar zxvf postfix.conf.2.tar.gz # cp postfix.conf.2/whitelist_recipient /etc/postfix/ # cp postfix.conf.2/whitelist_client /etc/postfix/ # cp postfix.conf.2/permit_client_nots25r /etc/postfix/ # rm -rf postfix.conf.2 # rm -f postfix.conf.2.tar.gz # postmap /etc/postfix/whitelist_recipient ← whitelist_recipientのDB化 # postmap /etc/postfix/whitelist_client ← whitelist_clientのDB化 **Postgrey起動スクリプト編集 [#k678ce8a] # vi /etc/rc.d/init.d/postgrey OPTIONS="--unix=$SOCKET" ↓ OPTIONS="--dbdir=$DBPATH --inet=127.0.0.1:60000 --tarpit=125 --targrey --retry-count=2 --delay=3600" **Postgrey起動 [#e05293e2] # chkconfig postgrey on # /etc/rc.d/init.d/postgrey start **Postfix再起動(Postgrey連携有効化) [#nf09bc0d] # /etc/rc.d/init.d/postfix restart **ログ [#uac576d4] ◆遅延応答ログ # grep "NOQUEUE: warn" /var/log/maillog ◆遅延を待たずにDATAを送ってきたログ # grep "NOQUEUE: sleep" /var/log/maillog |grep pipelining ◆遅延を待たずに切断したログ # grep "NOQUEUE: sleep" /var/log/maillog |grep "lost connection"
タイムスタンプを変更しない
*Postfix + postgrey [#w46fcad9] [[dokuwiki.fl8.jp掲載済>http://dokuwiki.fl8.jp/01_linux/03_mail/03_postfix_postgrey]] #contents http://centossrv.com/postfix-targrey.shtml [[最新版URL>http://apt.sw.be/redhat/el5/en/SRPMS.rpmforge/]] **インストール [#u60d8731] # wget http://apt.sw.be/redhat/el5/en/SRPMS.rpmforge/postgrey-1.32-1.rf.src.rpm # rpm -ivh postgrey-1.32-1.rf.src.rpm # cd /usr/src/redhat/SOURCES/ # tar zxvf postgrey-1.32.tar.gz # cd postgrey-1.32 # wget http://k2net.hakuba.jp/pub/targrey-0.31-postgrey-1.32.patch # patch -p0 < targrey-0.31-postgrey-1.32.patch # cd .. # rm -f postgrey-1.32.tar.gz && tar czvf postgrey-1.32.tar.gz postgrey-1.32 # rm -rf postgrey-1.32 # rpmbuild -bb --clean /usr/src/redhat/SPECS/postgrey.spec # yum -y install postgrey && rpm -e postgrey # rpm -ivh /usr/src/redhat/RPMS/noarch/postgrey-1.32-1.rf.noarch.rpm # rm -f /usr/src/redhat/RPMS/noarch/postgrey-* # rpmbuild --rmsource --rmspec /usr/src/redhat/SPECS/postgrey.spec # rm -f postgrey-1.32-1.rf.src.rpm **Postfix設定ファイル編集 [#a6c01218] # vi /etc/postfix/main.cf smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination −−追加(ここから)−− check_recipient_access hash:$config_directory/whitelist_recipient check_client_access hash:$config_directory/whitelist_client check_client_access regexp:$config_directory/permit_client_nots25r check_policy_service inet:60000 permit smtpd_data_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination check_recipient_access hash:$config_directory/whitelist_recipient check_client_access hash:$config_directory/whitelist_client check_client_access regexp:$config_directory/permit_client_nots25r check_policy_service inet:60000 permit −−追加(ここまで)−− **taRgrey用Postfix設定ファイルダウンロード [#e63eaebd] # wget http://k2net.hakuba.jp/spam/postfix.conf.2.tar.gz # tar zxvf postfix.conf.2.tar.gz # cp postfix.conf.2/whitelist_recipient /etc/postfix/ # cp postfix.conf.2/whitelist_client /etc/postfix/ # cp postfix.conf.2/permit_client_nots25r /etc/postfix/ # rm -rf postfix.conf.2 # rm -f postfix.conf.2.tar.gz # postmap /etc/postfix/whitelist_recipient ← whitelist_recipientのDB化 # postmap /etc/postfix/whitelist_client ← whitelist_clientのDB化 **Postgrey起動スクリプト編集 [#k678ce8a] # vi /etc/rc.d/init.d/postgrey OPTIONS="--unix=$SOCKET" ↓ OPTIONS="--dbdir=$DBPATH --inet=127.0.0.1:60000 --tarpit=125 --targrey --retry-count=2 --delay=3600" **Postgrey起動 [#e05293e2] # chkconfig postgrey on # /etc/rc.d/init.d/postgrey start **Postfix再起動(Postgrey連携有効化) [#nf09bc0d] # /etc/rc.d/init.d/postfix restart **ログ [#uac576d4] ◆遅延応答ログ # grep "NOQUEUE: warn" /var/log/maillog ◆遅延を待たずにDATAを送ってきたログ # grep "NOQUEUE: sleep" /var/log/maillog |grep pipelining ◆遅延を待たずに切断したログ # grep "NOQUEUE: sleep" /var/log/maillog |grep "lost connection"
テキスト整形のルールを表示する
ログインまたはアカウント作成