<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-7413915724903932137</id><updated>2024-09-07T05:51:55.029+09:00</updated><title type='text'>日々のこと</title><subtitle type='html'>CentOS上での各種設定やTips、PHPやDB関係のこと、趣味のDIYのことなど。</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>23</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-5124671716495834117</id><published>2012-08-28T10:32:00.006+09:00</published><updated>2012-08-28T10:32:56.351+09:00</updated><title type='text'>Google用にサイトマップ（sitemap.xml）を作成する</title><content type='html'>&lt;br /&gt;
サイトのページ数が１０００件未満だと&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.sitemapxml.jp/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://www.sitemapxml.jp/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
のようなオンラインの無料サービスを使うと楽なんだけど、今回は１０００件以上なので、&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://gsitecrawler.com/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://gsitecrawler.com/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
にあるGSiteCrawlerを使うことにしました。&lt;br /&gt;
約４５０００件あり、作成に丸１日かかりました。&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/5124671716495834117/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2012/08/googlesitemapxml.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/5124671716495834117'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/5124671716495834117'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2012/08/googlesitemapxml.html' title='Google用にサイトマップ（sitemap.xml）を作成する'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-826262414114690586</id><published>2012-08-27T14:18:00.000+09:00</published><updated>2012-08-27T14:18:17.033+09:00</updated><title type='text'>redmineの「メールによるチケットの登録」でハマったのでメモしておく</title><content type='html'>&lt;br /&gt;
redmine2.0.3をインストール後、&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://redmine.jp/guide/RedmineReceivingEmails/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://redmine.jp/guide/RedmineReceivingEmails/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
の「メールサーバからメールを転送」に従い、Postfixのaliasに以下のように設定しました。&lt;br /&gt;
&lt;br /&gt;
redmine: &quot;|/var/lib/redmine/extra/mail_handler/rdm-mailhandler.rb -u http://redmine.example.co.jp/ -k LHdYz6oQ1PH3fDGVgtnt -p neomaster -t bug -o project,tracker,priority&quot;&lt;br /&gt;
&lt;br /&gt;
また、redmineの設定項目「受信メール」では、「受信メール用のWebサービスを有効にする」にチェックし、「APIキー」には「LHdYz6oQ1PH3fDGVgtnt」を登録しています。&lt;br /&gt;
&lt;br /&gt;
この状態で、メール経由でチケットの登録しようとすると&lt;br /&gt;
&lt;br /&gt;
&amp;lt;redmine@example.co.jp&amp;gt;: permission denied. Command output: Request was denied&lt;br /&gt;
&amp;nbsp; &amp;nbsp; by your Redmine server. Make sure that &#39;WS for incoming emails&#39; is enabled&lt;br /&gt;
&amp;nbsp; &amp;nbsp; in application settings and that you provided the correct API key.&lt;br /&gt;
&lt;br /&gt;
というエラーメールが帰ってきます。&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://redmine.jp/faq/issue/mail-handler-errors/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://redmine.jp/faq/issue/mail-handler-errors/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
を見ても、「受信メール」のことしか書いていないので、原因がわからず。&lt;br /&gt;
２，３時間設定を見なおしたり、redmineのソースを見たりして悩んだ末、ふと、先日設定したアクセス制限が原因かもと思い、Locationディレクティブに&lt;br /&gt;
&lt;br /&gt;
allow from redmine設置サーバのIP&lt;br /&gt;
&lt;br /&gt;
を設定したところ、無事解決しました。&lt;br /&gt;
&lt;br /&gt;
なんだか、とても疲れました。（＾＾；）&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/826262414114690586/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2012/08/redmine.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/826262414114690586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/826262414114690586'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2012/08/redmine.html' title='redmineの「メールによるチケットの登録」でハマったのでメモしておく'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-8225007209190169820</id><published>2012-08-22T09:38:00.002+09:00</published><updated>2012-08-22T09:38:33.329+09:00</updated><title type='text'>ソフトバンクのガラケーへのデコレメールでハマる。</title><content type='html'>&lt;br /&gt;
サーバのプログラムから、各種キャリアのケータイにHTMLメール（デコメール、デコレメールなど）を送信していたのだが、１ヶ月ほど前から、ソフトバンクのデコレメールだけ画像が表示されなくなったという報告を頂いた。&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://creation.mb.softbank.jp/mc/tech/doc/A-089-011-Mail_ContentDevelopmentGuide_1.0.1.pdf&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://creation.mb.softbank.jp/mc/tech/doc/A-089-011-Mail_ContentDevelopmentGuide_1.0.1.pdf&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
を見ながら、文字コードやエンコーディング、メールの構成、メールのサイズ、インラインオブジェクトの数などいろいろとチェックしたのだが問題なし。&lt;br /&gt;
&lt;br /&gt;
数時間悩み、なにげに Content-ID の長さを短くしてみたところ、あっけなく問題は解消してしまった。&lt;br /&gt;
うーーーん。以前までは問題なかったし、PDFにも長さについての記述はなかったのになぁ。&lt;br /&gt;
参りました。&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/8225007209190169820/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2012/08/blog-post_22.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/8225007209190169820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/8225007209190169820'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2012/08/blog-post_22.html' title='ソフトバンクのガラケーへのデコレメールでハマる。'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-1274613166042675179</id><published>2012-08-22T09:06:00.000+09:00</published><updated>2012-08-22T09:21:57.892+09:00</updated><title type='text'>redmineとpassengerでアクセス制限にハマる</title><content type='html'>redmineとpassengerを導入したのだが、アクセス制限でハマったので記録しておく。&lt;br /&gt;
&lt;br /&gt;
普段、apacheでのアクセス制限は&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory /var/lib/redmine&amp;gt;&lt;br /&gt;
Order deny,allow&lt;br /&gt;
deny from all&lt;br /&gt;
allow from xxx.xxx.xxx.xxx&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
のような感じで書くのだが、mod_passengerが優先されるようで、この設定ではうまくいかない。
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Directoryディレクティブの代わりにLocationディレクティブを使って&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;location redmine=&quot;redmine&quot;&gt;&lt;/location&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&amp;lt;Location /redmine&amp;gt;&lt;br /&gt;
Order Deny,Allow&lt;br /&gt;
Deny from all&lt;br /&gt;
allow from xxx.xxx.xxx.xxx&lt;br /&gt;
&amp;lt;/Location&amp;gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
のようにするとうまくいきました。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
なお、「/redmine」はredmineへのURLとなります。&lt;/div&gt;
&lt;div&gt;
なので、この場合は、http://xxx.xxx.xxx/redmineというURLの場合です。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/1274613166042675179/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2012/08/redminepassenger.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/1274613166042675179'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/1274613166042675179'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2012/08/redminepassenger.html' title='redmineとpassengerでアクセス制限にハマる'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-9062352703088403728</id><published>2012-08-17T13:35:00.000+09:00</published><updated>2012-08-17T13:35:25.777+09:00</updated><title type='text'>centos6.3にredmine2.0をインストールする</title><content type='html'>&lt;a href=&quot;http://blog.redmine.jp/articles/redmine-2_0-installation_centos/&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://blog.redmine.jp/articles/redmine-2_0-installation_centos/&lt;/a&gt;&lt;br /&gt;
を参考に、centos6.3にredmine2.0をインストールする。&lt;br /&gt;
&lt;br /&gt;
&lt;h3&gt;
●各種ツールをインストールする。&lt;/h3&gt;
&lt;br /&gt;
・開発ツール(Cコンパイラ等)&lt;br /&gt;
　# yum groupinstall &quot;Development Tools&quot;&lt;br /&gt;
&lt;br /&gt;
・RubyとPassengerのビルドに必要なヘッダファイルなど&lt;br /&gt;
　# yum install openssl-devel readline-devel zlib-devel curl-devel libyaml-devel&lt;br /&gt;
&lt;br /&gt;
・MySQLとヘッダファイル&lt;br /&gt;
　# yum install mysql-server mysql-devel&lt;br /&gt;
&lt;br /&gt;
・Apacheとヘッダファイル&lt;br /&gt;
　# yum install httpd httpd-devel&lt;br /&gt;
&lt;br /&gt;
・ImageMagickとヘッダファイル&lt;br /&gt;
　# yum install ImageMagick ImageMagick-devel&lt;br /&gt;
&lt;br /&gt;
のインストールを行う。&lt;br /&gt;
&lt;br /&gt;
rubyについては、まずrubyのバージョン管理ツールrvmをインストールし、rvm経由でrubyをインストールする。&lt;br /&gt;
&lt;br /&gt;
　# bash -s stable &amp;lt; &amp;lt;(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)&lt;br /&gt;
&lt;br /&gt;
でrvmのインストールが完了すると、&lt;br /&gt;
&lt;br /&gt;
　# rvm list known&lt;br /&gt;
&lt;br /&gt;
でインストールできるrubyのバージョンを確認できる。&lt;br /&gt;
&lt;br /&gt;
　# rvm install 1.9.3&lt;br /&gt;
&lt;br /&gt;
で、ruby 1.9.3をインストールする。&lt;br /&gt;
他のバージョンのrubyを利用していない場合は、ruby 1.9.3が利用できる状態になっている。&lt;br /&gt;
他のバージョンを利用している場合は、&lt;br /&gt;
&lt;br /&gt;
　# rvm use 1.9.3&lt;br /&gt;
&lt;br /&gt;
で、切り替える必要がある。&lt;br /&gt;
最後にgem&lt;span style=&quot;color: #333333; font-family: メイリオ, Meiryo, &#39;ＭＳ Ｐゴシック&#39;, &#39;ヒラギノ角ゴ Pro W3&#39;, &#39;Hiragino Kaku Gothic Pro&#39;, sans-serif; font-size: 15px; line-height: 24px;&quot;&gt;を一括インストールするためのツール、bundlerをインストールする。&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
　# gem install bundler --no-rdoc --no-ri&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h3&gt;
●redmineで利用するMySQLの設定をする。&lt;/h3&gt;
&lt;div&gt;
デフォルトキャラクタセットをutf8に設定するために、my.confに以下を追加する。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
[mysql]&lt;/div&gt;
&lt;div&gt;
default-character-set = utf8&lt;/div&gt;
&lt;div&gt;
[mysqld]&lt;/div&gt;
&lt;div&gt;
default-character-set = utf8&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
次に、redmine用データベースとユーザーの作成を行う。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
# mysql -uroot -pxxxx&lt;/div&gt;
&lt;div&gt;
mysql&amp;gt; create database db_redmine default character set utf8;&lt;/div&gt;
&lt;div&gt;
mysql&amp;gt; grant all on db_redmine.* to user_redmine identified by &#39;********&#39;;&lt;/div&gt;
&lt;div&gt;
mysql&amp;gt; flush privileges;&lt;/div&gt;
&lt;div&gt;
mysql&amp;gt; exit;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h3&gt;
●redmineのインストール。&lt;/h3&gt;
&lt;h4&gt;
redmineのインストール&lt;/h4&gt;
&lt;div&gt;
&lt;a href=&quot;http://rubyforge.org/frs/?group_id=1850&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://rubyforge.org/frs/?group_id=1850&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
からtar.gzを取得する。&lt;/div&gt;
&lt;div&gt;
解凍後、/var/lib/redmineにredmineを設置する。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
redmineの設定を行う&lt;/h4&gt;
&lt;div&gt;
データベースの接続設定として、&lt;/div&gt;
&lt;div&gt;
/var/lib/redmine/config/database.yml&lt;/div&gt;
&lt;div&gt;
に&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
production:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; adapter: mysql2&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; database: db_redmine&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; host: localhost&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; username: user_redmine&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; password:&amp;nbsp;********&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; encoding: utf8&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
を保存する。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
メールサーバへの接続設定として、&lt;/div&gt;
&lt;div&gt;
/var/lib/redmine/config/configuration.yml&lt;/div&gt;
&lt;div&gt;
に&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
production:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; email_delivery:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; delivery_method: :smtp&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; smtp_settings:&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; address: &quot;localhost&quot;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; port: 25&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; domain: &#39;example.co.jp&#39;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
を保存する。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
redmineに必要なgemパッケージをインストールする&lt;/h4&gt;
&lt;div&gt;
　# bundle install --without development test postgresql sqlite&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
セッションデータ暗号化用鍵の生成とテーブル作成を行う&lt;/h4&gt;
&lt;div&gt;
コマンド実行は/var/lib/redmine/で行う。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
　# rake generate_secret_token&lt;/div&gt;
&lt;div&gt;
　# RAILS_ENV=production rake db:migrate&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;h3&gt;
●apacheの設定&lt;/h3&gt;
&lt;h4&gt;
Passengerのインストール&lt;/h4&gt;
&lt;div&gt;
・Passengerのインストール&lt;/div&gt;
&lt;div&gt;
　# gem install passenger --no-rdoc --no-ri&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
・PassengerのApache用モジュールのインストール&lt;/div&gt;
&lt;div&gt;
　# passenger-install-apache2-module&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
インストールが完了すると&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.15/ext/apache2/mod_passenger.so&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.15&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p194/ruby&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
のようなのが表示されるので控えておく。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
Passengerの設定&lt;/h4&gt;
&lt;div&gt;
/etc/httpd/conf.d/passenger.confに&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.15/ext/apache2/mod_passenger.so&lt;/div&gt;
&lt;div&gt;
PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.15&lt;/div&gt;
&lt;div&gt;
PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p194/ruby&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Header always unset &quot;X-Powered-By&quot;&lt;/div&gt;
&lt;div&gt;
Header always unset &quot;X-Rack-Cache&quot;&lt;/div&gt;
&lt;div&gt;
Header always unset &quot;X-Content-Digest&quot;&lt;/div&gt;
&lt;div&gt;
Header always unset &quot;X-Runtime&quot;&lt;/div&gt;
&lt;div&gt;
PassengerMaxPoolSize 20&lt;/div&gt;
&lt;div&gt;
PassengerMaxInstancesPerApp 4&lt;/div&gt;
&lt;div&gt;
PassengerPoolIdleTime 3600&lt;/div&gt;
&lt;div&gt;
PassengerUseGlobalQueue on&lt;/div&gt;
&lt;div&gt;
PassengerHighPerformance on&lt;/div&gt;
&lt;div&gt;
PassengerStatThrottleRate 10&lt;/div&gt;
&lt;div&gt;
RailsSpawnMethod smart&lt;/div&gt;
&lt;div&gt;
RailsAppSpawnerIdleTime 86400&lt;/div&gt;
&lt;div&gt;
RailsFrameworkSpawnerIdleTime 0&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
を保存する。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
ファイル所有権の変更&lt;/h4&gt;
&lt;div&gt;
apache上のPassengerでredmineを実行するために所有権を変更しておく。&lt;/div&gt;
&lt;div&gt;
　# chown -R apache:apache /var/lib/redmine&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4&gt;
バーチャルホストの設定&lt;/h4&gt;
&lt;div&gt;
バーチャルホストでredmineを実行できるようにhttpd.confに&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &lt;virtualhost&gt;&lt;/virtualhost&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ServerName redmine.example.co.jp&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; DocumentRoot &quot;/var/lib/redmine/public&quot;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;directory lib=&quot;lib&quot; public=&quot;public&quot; redmine=&quot;redmine&quot; var=&quot;var&quot;&gt;&lt;/directory&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# This relaxes Apache security settings.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;AllowOverride all&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;# MultiViews must be turned off.&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Options -MultiViews&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
のようなのを追加しておく。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
以上で、redmineのインストールは終了です。&lt;/div&gt;
&lt;div&gt;
あとは、apacheを再起動して、redmine.example.co.jpにアクセスできればOKです。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/9062352703088403728/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2012/08/centos63redmine20.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/9062352703088403728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/9062352703088403728'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2012/08/centos63redmine20.html' title='centos6.3にredmine2.0をインストールする'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-6451465398930096469</id><published>2012-08-16T10:51:00.000+09:00</published><updated>2012-08-16T10:51:01.814+09:00</updated><title type='text'>WebminのSSL化をまとめておく。</title><content type='html'>&lt;br /&gt;
WebminのSSL化の手順をまとめておきます。&lt;br /&gt;
&lt;br /&gt;
手順としては、&lt;br /&gt;
&lt;br /&gt;
１）PerlのNet::SSLeayをインストール&lt;br /&gt;
２）WebminでSSLの利用設定&lt;br /&gt;
&lt;br /&gt;
となります。&lt;br /&gt;
&lt;br /&gt;
１）&lt;br /&gt;
PerlのNet::SSLeayをインストールについて。&lt;br /&gt;
yumでモジュールをインストールします。&lt;br /&gt;
&lt;br /&gt;
yum -y install perl-Net-SSLeay&lt;br /&gt;
&lt;br /&gt;
２）&lt;br /&gt;
WebminでSSLの利用設定について。&lt;br /&gt;
&lt;br /&gt;
Webmin画面左カラムの「Webmin」→「Webmin 設定」と進む。&lt;br /&gt;
Webminの設定項目の一覧がでるので、「SSL 暗号化」を選ぶ。&lt;br /&gt;
&lt;br /&gt;
「可能であればSSLを使用可能にしますか?」で「はい」を選ぶ、「保存」ボタンを押す。&lt;br /&gt;
保存後、すぐに設定が効いてSSL接続以外をはじくようになるので、「Error - Bad Request」の&lt;br /&gt;
エラーメッセージが表示されます。&lt;br /&gt;
&lt;br /&gt;
これで設定は完了ですので、今後は、&lt;br /&gt;
https://ドメイン名:10000&lt;br /&gt;
でアクセスしなおします。&lt;br /&gt;
&lt;br /&gt;
ただし、認証については、オレオレ認証なので、セキュリティの警告画面が出ます。&lt;br /&gt;
が、気にせず進みましょう。&lt;br /&gt;
&lt;br /&gt;
</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/6451465398930096469/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2012/08/webminssl.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/6451465398930096469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/6451465398930096469'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2012/08/webminssl.html' title='WebminのSSL化をまとめておく。'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-227295110339794555</id><published>2012-08-16T10:38:00.001+09:00</published><updated>2012-08-16T10:38:47.182+09:00</updated><title type='text'>エクステリアの戸棚</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
お盆休みにエクステリアの戸棚を作成。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
扉の作成に手間取りました。&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitzmEDX67IaSFvsAfMKmJI4b35HgnisL4oTsGYItAgbmfNPHzBmTOs8HsLUrvIM_qeSYTgU3WqnT3gqc-KjiQTKfZtkTV-moN5Dn63o0w0LSfHT-nibUN9pEHalPlEHrd7yvpde7aooSI/s640/blogger-image-2009246657.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitzmEDX67IaSFvsAfMKmJI4b35HgnisL4oTsGYItAgbmfNPHzBmTOs8HsLUrvIM_qeSYTgU3WqnT3gqc-KjiQTKfZtkTV-moN5Dn63o0w0LSfHT-nibUN9pEHalPlEHrd7yvpde7aooSI/s640/blogger-image-2009246657.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/227295110339794555/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2012/08/blog-post_16.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/227295110339794555'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/227295110339794555'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2012/08/blog-post_16.html' title='エクステリアの戸棚'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEitzmEDX67IaSFvsAfMKmJI4b35HgnisL4oTsGYItAgbmfNPHzBmTOs8HsLUrvIM_qeSYTgU3WqnT3gqc-KjiQTKfZtkTV-moN5Dn63o0w0LSfHT-nibUN9pEHalPlEHrd7yvpde7aooSI/s72-c/blogger-image-2009246657.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-361953393441701240</id><published>2012-08-09T09:17:00.000+09:00</published><updated>2012-08-09T09:17:38.686+09:00</updated><title type='text'>花壇</title><content type='html'>ミモザの花壇を作りました。&lt;br /&gt;
レンガ40個で出来上がり(^o^)&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrzuEig7bPATJmG7DVBn7FI0uVCXTrUresFB7icKH_onS8jTYMkrfokrXy-yRB5WLzXI40QHRjM4Rt2BHrODe-sTFWFzuDN7BmfvUW8H0GOB2tVWkixheG4TQLr7hUtr6BUN-hthWzgeA/s640/blogger-image--82093853.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrzuEig7bPATJmG7DVBn7FI0uVCXTrUresFB7icKH_onS8jTYMkrfokrXy-yRB5WLzXI40QHRjM4Rt2BHrODe-sTFWFzuDN7BmfvUW8H0GOB2tVWkixheG4TQLr7hUtr6BUN-hthWzgeA/s640/blogger-image--82093853.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/361953393441701240/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2012/08/blog-post_9.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/361953393441701240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/361953393441701240'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2012/08/blog-post_9.html' title='花壇'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhrzuEig7bPATJmG7DVBn7FI0uVCXTrUresFB7icKH_onS8jTYMkrfokrXy-yRB5WLzXI40QHRjM4Rt2BHrODe-sTFWFzuDN7BmfvUW8H0GOB2tVWkixheG4TQLr7hUtr6BUN-hthWzgeA/s72-c/blogger-image--82093853.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-8793589023419686932</id><published>2012-08-07T12:24:00.000+09:00</published><updated>2012-08-07T12:24:14.341+09:00</updated><title type='text'>Apacheのdigest認証でハマった</title><content type='html'>&lt;a href=&quot;http://www.atmarkit.co.jp/flinux/rensai/linuxtips/699apachedigest.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;Apacheでユーザー認証を行うには（Digest認証編）&lt;/a&gt;&lt;br /&gt;
を参考に&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;directory html=&quot;html&quot; member=&quot;member&quot; var=&quot;var&quot; www=&quot;www&quot;&gt;&lt;/directory&gt;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; AuthType Digest&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; AuthName &quot;Secret Zone&quot;&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; AuthDigestDomain /member/&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; AuthDigestFile /etc/httpd/.htdigest&lt;/div&gt;
&lt;div&gt;
&amp;nbsp; &amp;nbsp; Require user secret&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
のような感じで設定するが、&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Invalid command &#39;AuthDigestFile&#39;, perhaps misspelled or defined by a module not included in the server configuration&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
というエラーがでる。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
いろいろ調べた結果、AuthDigestFile が AuthUserFile に変わったようだったので、&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
修正すると改善しました。&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
なお、したかったことは、php経由でdigest認証を通過すること。&lt;/div&gt;
&lt;div&gt;
php自体は以下のようなのでOKです。&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
$ch = curl_init();&lt;/div&gt;
&lt;div&gt;
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST);&lt;/div&gt;
&lt;div&gt;
curl_setopt($ch, CURLOPT_USERPWD, &quot;$username:$password&quot;);&lt;/div&gt;
&lt;div&gt;
curl_setopt($ch, CURLOPT_URL, $url);&lt;/div&gt;
&lt;div&gt;
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);&lt;/div&gt;
&lt;div&gt;
$str = curl_exec($ch);&lt;/div&gt;
&lt;div&gt;
curl_close($ch);&lt;/div&gt;
&lt;div&gt;
?&amp;gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/8793589023419686932/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2012/08/apachedigest.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/8793589023419686932'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/8793589023419686932'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2012/08/apachedigest.html' title='Apacheのdigest認証でハマった'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-4718977903556914344</id><published>2012-08-06T09:07:00.000+09:00</published><updated>2012-08-06T09:07:57.233+09:00</updated><title type='text'>Dovecotの再起動</title><content type='html'>Dovecotを再起動するには、&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/etc/rc.d/init.d/dovecot restart&lt;br /&gt;
&lt;br /&gt;
の他に&lt;br /&gt;
&lt;br /&gt;
/bin/kill -HUP `cat /var/run/dovecot/master.pid 2&amp;gt;/dev/null`&lt;br /&gt;
&lt;br /&gt;
というのもある。&lt;br /&gt;
ただし、後者の場合は、ログファイルが変わらないので注意が必要。&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/4718977903556914344/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2012/08/dovecot.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/4718977903556914344'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/4718977903556914344'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2012/08/dovecot.html' title='Dovecotの再起動'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-9107194539648393392</id><published>2012-08-03T09:08:00.001+09:00</published><updated>2012-08-06T09:07:10.554+09:00</updated><title type='text'>バーベキューコンロ用のテーブル</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2G_LrYp1w1Y-IwOl3RfVP9AukDHZ7730dkELRl0jZ8GZZXXB5p2LZ7EeBLd24cg9oYWqhOwXR4coIPDfOiOIdcI_Pye8q0kFPH_R-XOohykYncXNriA7jkDsW5dz1URsSI_3ZiMVzg3Y/s640/blogger-image-1544363196.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2G_LrYp1w1Y-IwOl3RfVP9AukDHZ7730dkELRl0jZ8GZZXXB5p2LZ7EeBLd24cg9oYWqhOwXR4coIPDfOiOIdcI_Pye8q0kFPH_R-XOohykYncXNriA7jkDsW5dz1URsSI_3ZiMVzg3Y/s640/blogger-image-1544363196.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy-TQ5HRqQCwXxWtq9Rc8YurUscFrST0n545_Q4PhkCOWlIqxkuBPKVujuaVdK1eEWWMKn5nEUbTnmosiZJQzTqvgMlKIrTI01FWxFNte93bO-TolRNjAgvwItglNUajzzVi8QgbiTYfU/s640/blogger-image-213809263.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgy-TQ5HRqQCwXxWtq9Rc8YurUscFrST0n545_Q4PhkCOWlIqxkuBPKVujuaVdK1eEWWMKn5nEUbTnmosiZJQzTqvgMlKIrTI01FWxFNte93bO-TolRNjAgvwItglNUajzzVi8QgbiTYfU/s640/blogger-image-213809263.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/9107194539648393392/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2012/08/blog-post_5129.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/9107194539648393392'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/9107194539648393392'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2012/08/blog-post_5129.html' title='バーベキューコンロ用のテーブル'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh2G_LrYp1w1Y-IwOl3RfVP9AukDHZ7730dkELRl0jZ8GZZXXB5p2LZ7EeBLd24cg9oYWqhOwXR4coIPDfOiOIdcI_Pye8q0kFPH_R-XOohykYncXNriA7jkDsW5dz1URsSI_3ZiMVzg3Y/s72-c/blogger-image-1544363196.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-6204277414613261817</id><published>2012-08-03T08:49:00.000+09:00</published><updated>2012-08-06T09:05:21.969+09:00</updated><title type='text'>McAfee SiteAdvisorで「閲覧は危険を伴う可能性があります」と出る</title><content type='html'>勤めてる会社が管理する、サイト「&lt;a href=&quot;http://www.mail-neo.com/?afid=4&quot; target=&quot;_blank&quot;&gt;メール配信(月500円～)・ステップメール NEO（ http://www.mail-neo.com/ ）&lt;/a&gt;&amp;nbsp;」が、McAfee SiteAdvisorで「閲覧は危険を伴う可能性があります」と出るという報告を利用者から頂いた。&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div&gt;
とりあえず、&lt;a href=&quot;https://www.siteadvisor.com/sites/www.mail-neo.com&quot; rel=&quot;nofollow&quot; style=&quot;background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 14px;&quot; target=&quot;_blank&quot;&gt;https://www.siteadvisor.com/&lt;wbr&gt;sites/www.mail-neo.com&lt;/wbr&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 14px;&quot;&gt;で原因を調べたんだけど、詳しいことが買いてないので、何もわからず。&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 14px;&quot;&gt;ちょっと不安になったので、念のため、&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://safeweb.norton.com/&quot; rel=&quot;nofollow&quot; style=&quot;background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 14px;&quot; target=&quot;_blank&quot;&gt;http://safeweb.norton.com/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.gred.jp/&quot; rel=&quot;nofollow&quot; style=&quot;background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 14px;&quot; target=&quot;_blank&quot;&gt;http://www.gred.jp/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.unmaskparasites.com/&quot; rel=&quot;nofollow&quot; style=&quot;background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 14px;&quot; target=&quot;_blank&quot;&gt;http://www.unmaskparasites.&lt;wbr&gt;com/&lt;/wbr&gt;&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.aguse.jp/&quot; rel=&quot;nofollow&quot; style=&quot;background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 14px;&quot; target=&quot;_blank&quot;&gt;http://www.aguse.jp/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 14px;&quot;&gt;のような他のチェックサイトでも調べてみたけど、&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 14px;&quot;&gt;すべて安全と出ます。&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 14px;&quot;&gt;McAfee SiteAdvisorのサイトを調べると、&lt;a href=&quot;http://www.siteadvisor.com/webmasters/index.html&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;http://www.siteadvisor.com/webmasters/index.html&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
に&lt;span style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 14px;&quot;&gt;「サイト評価に対するフィードバックを行う方法」という項目があったので、内容に従い、&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 14px;&quot;&gt;メールで調査と依頼しました。&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: arial, sans-serif; font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;翌日、McAfeeから以下のようなメールを頂きました。&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #222222; font-family: arial, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 14px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Candara, Verdana, Arial, Helvetica;&quot;&gt;Hello,&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Candara, Verdana, Arial, Helvetica;&quot;&gt;We have received your request. It will be reviewed and processed by our team in the order it was received. Any adjustment made based on the review will be published in&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.siteadvisor.com/&quot; style=&quot;background-color: white; color: #1155cc; font-family: Candara, Verdana, Arial, Helvetica;&quot; target=&quot;_blank&quot;&gt;http://www.siteadvisor.com&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #222222; font-family: Candara, Verdana, Arial, Helvetica;&quot;&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Candara, Verdana, Arial, Helvetica;&quot;&gt;Sincerely,&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Candara, Verdana, Arial, Helvetica;&quot;&gt;Kyoko&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; color: #222222; font-family: Candara, Verdana, Arial, Helvetica;&quot;&gt;McAfee GTI Customer Response Team - North America&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
とりあえず、処理を進めてくれる模様。&lt;br /&gt;
早く改善されるとよいんだけど。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
追記。&lt;br /&gt;
その後、３日ほどしてから&lt;br /&gt;
&lt;a href=&quot;https://www.siteadvisor.com/sites/www.mail-neo.com&quot; rel=&quot;nofollow&quot; style=&quot;background-color: white; color: #1155cc; font-family: arial, sans-serif; font-size: 14px;&quot; target=&quot;_blank&quot;&gt;https://www.siteadvisor.com/&lt;wbr&gt;sites/www.mail-neo.com&lt;/wbr&gt;&lt;/a&gt;
&lt;br /&gt;
を再度チェックしてみると、問題なしとなっていました。&lt;br /&gt;
&lt;br /&gt;
無事、解決できてよかった。(^^)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/6204277414613261817/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2012/08/mcafee-siteadvisor.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/6204277414613261817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/6204277414613261817'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2012/08/mcafee-siteadvisor.html' title='McAfee SiteAdvisorで「閲覧は危険を伴う可能性があります」と出る'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-1096781915764455626</id><published>2012-08-03T08:17:00.000+09:00</published><updated>2012-08-03T08:17:17.828+09:00</updated><title type='text'>エクステリアの水栓</title><content type='html'>レンガで作ってみました。&lt;br /&gt;
カエルとフクロウの蛇口がお気に入り。&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb2a9V8MBm7NLZKUzGBF0aRgwm_VyxV3awqtF5ZpaR5L0-hpb1O0jAFy653tFfQLB6iUbsoN66ZtwiIwyAtXzNRss7AJTqhLb6GwSzuD9zQ70TULesoLVG9NiXP1p9cpqQ6UiobF9DcNo/s640/blogger-image-1603549926.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb2a9V8MBm7NLZKUzGBF0aRgwm_VyxV3awqtF5ZpaR5L0-hpb1O0jAFy653tFfQLB6iUbsoN66ZtwiIwyAtXzNRss7AJTqhLb6GwSzuD9zQ70TULesoLVG9NiXP1p9cpqQ6UiobF9DcNo/s640/blogger-image-1603549926.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRk4YFJEJrluUvZhxNzBoCTqN522OAua6iwcgxc9ruP7N1gZoqf9j_Hw1ZOdos4U4G-L4SQBI88WIOLNWCw5ubAEzBjGCX37ET9zJ_zXFykS4Ey1b3uZ0EbK9BdhS5qucIfBFc8-0QAbc/s640/blogger-image--126277021.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRk4YFJEJrluUvZhxNzBoCTqN522OAua6iwcgxc9ruP7N1gZoqf9j_Hw1ZOdos4U4G-L4SQBI88WIOLNWCw5ubAEzBjGCX37ET9zJ_zXFykS4Ey1b3uZ0EbK9BdhS5qucIfBFc8-0QAbc/s640/blogger-image--126277021.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQGhrMz0AzWuD22Uphb5v7wlGJLKB4Ceo8dSoo8TOOxZwHvO6lGQ_rF9vzoVKmNGPYkL9JXnhMIhN36EDiIQSSPwwa0bLMLuL2LBR3A33MLA4p8GxCc-oVT8_d2B-n4rALcVmaTGZluts/s640/blogger-image--1153269050.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQGhrMz0AzWuD22Uphb5v7wlGJLKB4Ceo8dSoo8TOOxZwHvO6lGQ_rF9vzoVKmNGPYkL9JXnhMIhN36EDiIQSSPwwa0bLMLuL2LBR3A33MLA4p8GxCc-oVT8_d2B-n4rALcVmaTGZluts/s640/blogger-image--1153269050.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/1096781915764455626/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2012/08/blog-post_3.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/1096781915764455626'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/1096781915764455626'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2012/08/blog-post_3.html' title='エクステリアの水栓'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhb2a9V8MBm7NLZKUzGBF0aRgwm_VyxV3awqtF5ZpaR5L0-hpb1O0jAFy653tFfQLB6iUbsoN66ZtwiIwyAtXzNRss7AJTqhLb6GwSzuD9zQ70TULesoLVG9NiXP1p9cpqQ6UiobF9DcNo/s72-c/blogger-image-1603549926.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-2699378358657753453</id><published>2012-08-01T13:52:00.000+09:00</published><updated>2012-08-01T13:52:06.704+09:00</updated><title type='text'>CentOS 6.2 でpostfixにopendkimを導入する。</title><content type='html'>&lt;br /&gt;
CentOS 6.2 でpostfixにopendkimを導入する。&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
１）&lt;br /&gt;
epelにあるopendkimを利用するので、epelが使えない場合は&lt;br /&gt;
epelを使えるようにする。&lt;br /&gt;
&lt;br /&gt;
具体的には、CentOS 6.2で64bitなら以下のようなコマンドを発行する。&lt;br /&gt;
&lt;br /&gt;
wget http://ftp-srv2.kddilabs.jp/Linux/distributions/fedora/epel/6/x86_64/epel-release-6-5.noarch.rpm&lt;br /&gt;
rpm -ivh epel-release-6-5.noarch.rpm&lt;br /&gt;
&lt;br /&gt;
２）&lt;br /&gt;
yumを使ってopendkimを導入する。&lt;br /&gt;
&lt;br /&gt;
yum -y install opendkim&lt;br /&gt;
&lt;br /&gt;
３）&lt;br /&gt;
opendkim用のプライベートキーを用意する。&lt;br /&gt;
例えば、ドメインが hoge.co.jp とすると以下のようなコマンドを発行する。&lt;br /&gt;
&lt;br /&gt;
mkdir /etc/opendkim/keys/hoge.co.jp&lt;br /&gt;
/usr/bin/opendkim-genkey -D /etc/opendkim/keys/hoge.co.jp/ -d hoge.co.jp -s default&lt;br /&gt;
chown -R opendkim:opendkim /etc/opendkim/keys&lt;br /&gt;
mv /etc/opendkim/keys/hoge.co.jp/default.private /etc/opendkim/keys/hoge.co.jp/default&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
４）&lt;br /&gt;
opendkimまわりの設定ファイルを修正する。&lt;br /&gt;
関係するのは、&lt;br /&gt;
&lt;br /&gt;
/etc/opendkim.conf&lt;br /&gt;
/etc/opendkim/KeyTable&lt;br /&gt;
/etc/opendkim/TrustedHosts&lt;br /&gt;
/etc/opendkim/SigningTable&lt;br /&gt;
&lt;br /&gt;
の４つのファイル。&lt;br /&gt;
/etc/opendkim.confの変更内容は以下のとおり。&lt;br /&gt;
&lt;br /&gt;
Mode sv&lt;br /&gt;
#KeyFile /etc/opendkim/keys/default.private&lt;br /&gt;
KeyTable refile:/etc/opendkim/KeyTable&lt;br /&gt;
SigningTable refile:/etc/opendkim/SigningTable&lt;br /&gt;
ExternalIgnoreList refile:/etc/opendkim/TrustedHosts&lt;br /&gt;
InternalHosts refile:/etc/opendkim/TrustedHosts&lt;br /&gt;
&lt;br /&gt;
/etc/opendkim/KeyTableの変更内容は以下のとおり。&lt;br /&gt;
&lt;br /&gt;
default._domainkey.hoge.co.jp hoge.co.jp:default:/etc/opendkim/keys/hoge.co.jp/default&lt;br /&gt;
&lt;br /&gt;
/etc/opendkim/TrustedHostsの変更内容は以下のとおり。&lt;br /&gt;
&lt;br /&gt;
127.0.0.1&lt;br /&gt;
localhost&lt;br /&gt;
mail.hoge.co.jp&lt;br /&gt;
hoge.co.jp&lt;br /&gt;
&lt;br /&gt;
/etc/opendkim/SigningTableの変更内容は以下のとおり。&lt;br /&gt;
&lt;br /&gt;
hoge.co.jp default._domainkey.hoge.co.jp&lt;br /&gt;
&lt;br /&gt;
５）&lt;br /&gt;
Postfixの設定も変更する。&lt;br /&gt;
/etc/postfix/main.cfに以下を追記する。&lt;br /&gt;
&lt;br /&gt;
#opendkim&lt;br /&gt;
smtpd_milters = inet:127.0.0.1:8891&lt;br /&gt;
non_smtpd_milters = $smtpd_milters&lt;br /&gt;
milter_default_action = accept&lt;br /&gt;
&lt;br /&gt;
６）&lt;br /&gt;
DNSの設定も変更する。&lt;br /&gt;
&lt;br /&gt;
cat /etc/opendkim/keys/hoge.co.jp/default.txt&lt;br /&gt;
&lt;br /&gt;
で表示される内容をDNSサーバに設定する。&lt;br /&gt;
可能なら、以下のようなDKIMポリシーも設定する。&lt;br /&gt;
&lt;br /&gt;
_adsp._domainkey.example.com &amp;nbsp; &amp;nbsp;IN &amp;nbsp; &amp;nbsp;TXT &amp;nbsp; &amp;nbsp;&quot;dkim=unknown&quot;&lt;br /&gt;
&lt;br /&gt;
７）&lt;br /&gt;
opendkimの開始とpostfixの再起動。&lt;br /&gt;
&lt;br /&gt;
/etc/rc.d/init.d/opendkim start&lt;br /&gt;
/etc/rc.d/init.d/postfix restart&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
これで終わりです。&lt;br /&gt;
ついでに、上記の処理をシェルスクリプトにしてみました。&lt;br /&gt;
良かったら自己責任で使ってください。(^^;)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
&lt;br /&gt;
#DNS&lt;br /&gt;
#DNS=hoge.co.jp&lt;br /&gt;
&lt;br /&gt;
echo &quot;----&amp;gt; Start DKIM setting for ${DNS}&quot;&lt;br /&gt;
&lt;br /&gt;
####&lt;br /&gt;
# install epel&lt;br /&gt;
####&lt;br /&gt;
if [ ! -e /etc/yum.repos.d/epel.repo ]&lt;br /&gt;
then&lt;br /&gt;
&amp;nbsp;echo &#39;----&amp;gt; Install epel&#39;&lt;br /&gt;
&amp;nbsp;OSFILE=`ls /etc -F | grep &quot;release$\|version$&quot;`&lt;br /&gt;
&amp;nbsp;OS=`cat /etc/${OSFILE}`&lt;br /&gt;
&amp;nbsp;MACHINE=`uname -m`&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;if [[ &quot;$OS&quot; =~ &quot;CentOS release 6&quot; ]]; then&lt;br /&gt;
&amp;nbsp; OSVER=&quot;6&quot;&lt;br /&gt;
&amp;nbsp; RPM=&quot;epel-release-6-5.noarch.rpm&quot;&lt;br /&gt;
&amp;nbsp;else&lt;br /&gt;
&amp;nbsp; echo &#39;----&amp;gt;fail&#39;&lt;br /&gt;
&amp;nbsp; exit;&lt;br /&gt;
&amp;nbsp;fi&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;if [[ &quot;$MACHINE&quot; =~ &quot;x86_64&quot; ]]; then&lt;br /&gt;
&amp;nbsp; MACHINEVER=&quot;x86_64&quot;&lt;br /&gt;
&amp;nbsp;else&lt;br /&gt;
&amp;nbsp; MACHINEVER=&quot;i386&quot;&lt;br /&gt;
&amp;nbsp;fi&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;EPELURL=&quot;http://ftp-srv2.kddilabs.jp/Linux/distributions/fedora/epel/${OSVER}/${MACHINEVER}/${RPM}&quot;&lt;br /&gt;
&amp;nbsp;wget $EPELURL&lt;br /&gt;
&amp;nbsp;rpm -ivh $RPM&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
###&lt;br /&gt;
# install opendkim&lt;br /&gt;
###&lt;br /&gt;
echo &#39;----&amp;gt; Install opendkim&#39;&lt;br /&gt;
yum -y install opendkim&lt;br /&gt;
&lt;br /&gt;
if [ ! -e /etc/opendkim/keys/${DNS}/default ]&lt;br /&gt;
then&lt;br /&gt;
&amp;nbsp;mkdir /etc/opendkim/keys/${DNS}&lt;br /&gt;
&amp;nbsp;/usr/bin/opendkim-genkey -D /etc/opendkim/keys/${DNS}/ -d ${DNS} -s default&lt;br /&gt;
&amp;nbsp;chown -R opendkim:opendkim /etc/opendkim/keys&lt;br /&gt;
&amp;nbsp;mv /etc/opendkim/keys/${DNS}/default.private /etc/opendkim/keys/${DNS}/default&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;
DKIM_CONF=/etc/opendkim.conf&lt;br /&gt;
KEY_TABLE=/etc/opendkim/KeyTable&lt;br /&gt;
TRUSTED_HOSTS=/etc/opendkim/TrustedHosts&lt;br /&gt;
SIGNING_TABLE=/etc/opendkim/SigningTable&lt;br /&gt;
&lt;br /&gt;
POSTFIX_CONF=/etc/postfix/main.cf&lt;br /&gt;
&lt;br /&gt;
echo &#39;----&amp;gt; Eidt opendkim.conf&#39;&lt;br /&gt;
if [ -e $DKIM_CONF ]&lt;br /&gt;
then&lt;br /&gt;
&amp;nbsp;if [ -e ${DKIM_CONF}.org ]&lt;br /&gt;
&amp;nbsp;then&lt;br /&gt;
&amp;nbsp; cp ${DKIM_CONF}.org ${DKIM_CONF}&lt;br /&gt;
&amp;nbsp;else&lt;br /&gt;
&amp;nbsp; cp ${DKIM_CONF} ${DKIM_CONF}.org&lt;br /&gt;
&amp;nbsp;fi&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;sed -e &#39;s/^Mode.*/Mode sv/&#39; \&lt;br /&gt;
&amp;nbsp;-e &#39;s/^KeyFile/#KeyFile/&#39; \&lt;br /&gt;
&amp;nbsp;-e &#39;s/^#KeyTable/KeyTable/&#39; \&lt;br /&gt;
&amp;nbsp;-e &#39;s/^#SigningTable/SigningTable/&#39; \&lt;br /&gt;
&amp;nbsp;-e &#39;s/^#ExternalIgnoreList/ExternalIgnoreList/&#39; \&lt;br /&gt;
&amp;nbsp;-e &#39;s/^#InternalHosts/InternalHosts/&#39; \&lt;br /&gt;
&amp;nbsp;${DKIM_CONF} &amp;gt; ${DKIM_CONF}.tmp&lt;br /&gt;
&amp;nbsp;cp ${DKIM_CONF}.tmp ${DKIM_CONF}&lt;br /&gt;
&amp;nbsp;rm -f ${DKIM_CONF}.tmp&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;echo &#39;----&amp;gt; Eidt KeyTable&#39;&lt;br /&gt;
&amp;nbsp;if [ -e ${KEY_TABLE}.org ]&lt;br /&gt;
&amp;nbsp;then&lt;br /&gt;
&amp;nbsp; cp ${KEY_TABLE}.org ${KEY_TABLE}&lt;br /&gt;
&amp;nbsp;else&lt;br /&gt;
&amp;nbsp; cp ${KEY_TABLE} ${KEY_TABLE}.org&lt;br /&gt;
&amp;nbsp;fi&lt;br /&gt;
&amp;nbsp;echo &quot;default._domainkey.${DNS} ${DNS}:default:/etc/opendkim/keys/${DNS}/default&quot; &amp;gt;&amp;gt; ${KEY_TABLE}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;echo &#39;----&amp;gt; Eidt TrustedHosts&#39;&lt;br /&gt;
&amp;nbsp;if [ -e ${TRUSTED_HOSTS}.org ]&lt;br /&gt;
&amp;nbsp;then&lt;br /&gt;
&amp;nbsp; cp ${TRUSTED_HOSTS}.org ${TRUSTED_HOSTS}&lt;br /&gt;
&amp;nbsp;else&lt;br /&gt;
&amp;nbsp; cp ${TRUSTED_HOSTS} ${TRUSTED_HOSTS}.org&lt;br /&gt;
&amp;nbsp;fi&lt;br /&gt;
&amp;nbsp;echo &quot;localhost&quot; &amp;gt;&amp;gt; ${TRUSTED_HOSTS}&lt;br /&gt;
&amp;nbsp;echo &quot;mail.${DNS}&quot; &amp;gt;&amp;gt; ${TRUSTED_HOSTS}&lt;br /&gt;
&amp;nbsp;echo &quot;${DNS}&quot; &amp;gt;&amp;gt; ${TRUSTED_HOSTS}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;echo &#39;----&amp;gt; Eidt SigningTable&#39;&lt;br /&gt;
&amp;nbsp;if [ -e ${SIGNING_TABLE}.org ]&lt;br /&gt;
&amp;nbsp;then&lt;br /&gt;
&amp;nbsp; cp ${SIGNING_TABLE}.org ${SIGNING_TABLE}&lt;br /&gt;
&amp;nbsp;else&lt;br /&gt;
&amp;nbsp; cp ${SIGNING_TABLE} ${SIGNING_TABLE}.org&lt;br /&gt;
&amp;nbsp;fi&lt;br /&gt;
&amp;nbsp;echo &quot;${DNS} default._domainkey.${DNS}&quot; &amp;gt;&amp;gt; ${SIGNING_TABLE}&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;echo &#39;----&amp;gt; Eidt Postfix main.cf&#39;&lt;br /&gt;
&amp;nbsp;GRP=`cat ${POSTFIX_CONF}|grep &#39;smtpd_milters&#39;`&lt;br /&gt;
&amp;nbsp;if [ -z $GRP ]&lt;br /&gt;
&amp;nbsp;then&lt;br /&gt;
&amp;nbsp; echo &quot;&quot; &amp;gt;&amp;gt; ${POSTFIX_CONF}&lt;br /&gt;
&amp;nbsp; echo &quot;#opendkim&quot; &amp;gt;&amp;gt; ${POSTFIX_CONF}&lt;br /&gt;
&amp;nbsp; echo &quot;smtpd_milters = inet:127.0.0.1:8891&quot; &amp;gt;&amp;gt; ${POSTFIX_CONF}&lt;br /&gt;
&amp;nbsp; echo &#39;non_smtpd_milters = $smtpd_milters&#39; &amp;gt;&amp;gt; ${POSTFIX_CONF}&lt;br /&gt;
&amp;nbsp; echo &#39;milter_default_action = accept&#39; &amp;gt;&amp;gt; ${POSTFIX_CONF}&lt;br /&gt;
&amp;nbsp;fi&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;echo &#39;----&amp;gt; (re)start daemons&#39;&lt;br /&gt;
&amp;nbsp;if [ -e /etc/rc.d/init.d/opendkim ]&lt;br /&gt;
&amp;nbsp;then&lt;br /&gt;
&amp;nbsp; restatus=`/etc/rc.d/init.d/opendkim status`&lt;br /&gt;
&amp;nbsp; if [[ &quot;$restatus&quot; =~ stopped ]]; then&lt;br /&gt;
&amp;nbsp; &amp;nbsp;/etc/rc.d/init.d/opendkim start&lt;br /&gt;
&amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp;/etc/rc.d/init.d/opendkim restart&lt;br /&gt;
&amp;nbsp; fi&lt;br /&gt;
&amp;nbsp;else&lt;br /&gt;
&amp;nbsp; echo &#39;/etc/rc.d/init.d/opendkim not exists&#39;&lt;br /&gt;
&amp;nbsp; exit;&lt;br /&gt;
&amp;nbsp;fi&lt;br /&gt;
&amp;nbsp;/sbin/chkconfig opendkim on&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;if [ -e /etc/rc.d/init.d/postfix ]&lt;br /&gt;
&amp;nbsp;then&lt;br /&gt;
&amp;nbsp; restatus=`/etc/rc.d/init.d/postfix status`&lt;br /&gt;
&amp;nbsp; if [[ &quot;$restatus&quot; =~ stopped ]]; then&lt;br /&gt;
&amp;nbsp; &amp;nbsp;/etc/rc.d/init.d/postfix start&lt;br /&gt;
&amp;nbsp; else&lt;br /&gt;
&amp;nbsp; &amp;nbsp;/etc/rc.d/init.d/postfix restart&lt;br /&gt;
&amp;nbsp; fi&lt;br /&gt;
&amp;nbsp;else&lt;br /&gt;
&amp;nbsp; echo &#39;/etc/rc.d/init.d/postfix not exists&#39;&lt;br /&gt;
&amp;nbsp; exit;&lt;br /&gt;
&amp;nbsp;fi&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;echo &#39;#########################################&#39;&lt;br /&gt;
&amp;nbsp;echo &#39;INSTALL IS OVER&#39;&lt;br /&gt;
&amp;nbsp;echo &#39;#########################################&#39;&lt;br /&gt;
&amp;nbsp;echo &#39;&#39;&lt;br /&gt;
&amp;nbsp;echo &#39;Change DNS&#39;&lt;br /&gt;
&amp;nbsp;cat /etc/opendkim/keys/${DNS}/default.txt&lt;br /&gt;
&amp;nbsp;echo &quot;_adsp._domainkey&quot;&#39; IN TXT &quot;dkim=unknown&quot;&#39;&lt;br /&gt;
else&lt;br /&gt;
&amp;nbsp;echo &quot;----&amp;gt; FAIL: ${DKIM_CONF} is not exists!&quot;&lt;br /&gt;
&amp;nbsp;exit;&lt;br /&gt;
fi&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/2699378358657753453/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2012/08/centos-62-postfixopendkim.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/2699378358657753453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/2699378358657753453'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2012/08/centos-62-postfixopendkim.html' title='CentOS 6.2 でpostfixにopendkimを導入する。'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-6846579657047352858</id><published>2012-08-01T13:03:00.001+09:00</published><updated>2012-08-01T13:03:18.273+09:00</updated><title type='text'>レゴ</title><content type='html'>&lt;div class=&quot;separator&quot;style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK1WqQthJ9K2WMvoKaqpK_HN_LjNzL3-JWb2NOjE5gEtQqcgN_yW-Ukr8dQOBq7Nc99mS6zAItZqTtXhQ8pV3OzczgHT5F87av_pMcvIfYShX2AuJbfhhFThkdlenEUurcf3xeU0F-XMc/s640/blogger-image--2076613330.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK1WqQthJ9K2WMvoKaqpK_HN_LjNzL3-JWb2NOjE5gEtQqcgN_yW-Ukr8dQOBq7Nc99mS6zAItZqTtXhQ8pV3OzczgHT5F87av_pMcvIfYShX2AuJbfhhFThkdlenEUurcf3xeU0F-XMc/s640/blogger-image--2076613330.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class=&quot;separator&quot;style=&quot;clear: both; text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_UsnrnKMsBSWY-P4liPhv5QqllgfxEhLcoP0mftVXVOan3e4jDEkd7RNf8EVLDPL9-E3aWZPlj1MJb2DRSPcl2bX_De25o8bz8t0CATUMojJZovo6Fg2e2BhQ0qx-aBkID8YGpHOtwHU/s640/blogger-image-195789529.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_UsnrnKMsBSWY-P4liPhv5QqllgfxEhLcoP0mftVXVOan3e4jDEkd7RNf8EVLDPL9-E3aWZPlj1MJb2DRSPcl2bX_De25o8bz8t0CATUMojJZovo6Fg2e2BhQ0qx-aBkID8YGpHOtwHU/s640/blogger-image-195789529.jpg&quot; /&gt;&lt;/a&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/6846579657047352858/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2012/08/blog-post.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/6846579657047352858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/6846579657047352858'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2012/08/blog-post.html' title='レゴ'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgK1WqQthJ9K2WMvoKaqpK_HN_LjNzL3-JWb2NOjE5gEtQqcgN_yW-Ukr8dQOBq7Nc99mS6zAItZqTtXhQ8pV3OzczgHT5F87av_pMcvIfYShX2AuJbfhhFThkdlenEUurcf3xeU0F-XMc/s72-c/blogger-image--2076613330.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-2407853789162655210</id><published>2012-06-25T16:24:00.002+09:00</published><updated>2012-06-25T16:24:44.891+09:00</updated><title type='text'>gmailのバックアップ</title><content type='html'>&lt;br /&gt;
windows7でgmailをバックアップしたい。&lt;br /&gt;
が、Thunderbirdなどのメーラを使って手動で同期するなど、手間のかかる&lt;br /&gt;
方法は一切使いたくない方のために。&lt;br /&gt;
&lt;br /&gt;
１）&lt;br /&gt;
gmailの設定でPOPにアクセスできるようにする。&lt;br /&gt;
&lt;br /&gt;
２）&lt;br /&gt;
cygwinをインストールする。&lt;br /&gt;
インストールの際に、Mailの項目のfetchmailとprocmailにも&lt;br /&gt;
チェックしておく。&lt;br /&gt;
&lt;br /&gt;
３）&lt;br /&gt;
ログインユーザ名がnkdの場合、&lt;br /&gt;
C:\cygwin\home\nkd\&lt;br /&gt;
というディレクトリができている。&lt;br /&gt;
ここにメール関係の設定ファイルを置く。&lt;br /&gt;
&lt;br /&gt;
まず、fetchmailの設定。&lt;br /&gt;
fetchmailはgmailからメールを取り出す処理を行う。&lt;br /&gt;
&lt;br /&gt;
.fetchmailrcというファイルを作成し、以下のように記述する。&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
poll pop.gmail.com&lt;br /&gt;
protocol pop3&lt;br /&gt;
username &quot;user@gmail.com&quot; password &quot;mypass&quot;&lt;br /&gt;
keep ssl&lt;br /&gt;
mda &quot;/usr/bin/procmail -m /home/nkd/.procmailrc&quot;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
※user@gmail.comはgmailのメールアドレス。&lt;br /&gt;
※mypassはgmailのログインパスワード。&lt;br /&gt;
※nkdの部分は自分のログインユーザ名とする。&lt;br /&gt;
&lt;br /&gt;
次に、procmailの設定。&lt;br /&gt;
procmailは取り出したメールを振り分けて保存する処理を&lt;br /&gt;
行う。fetchmailだけだと１つのファイルにメールが書き込まれて&lt;br /&gt;
いくので、使い勝手が悪いのでメールごとに１つのファイルに&lt;br /&gt;
書き込むようにする。&lt;br /&gt;
&lt;br /&gt;
.prcomailrcというファイルを作成し、以下のように記述する。&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
MAILDIR=/home/nkd/&lt;br /&gt;
VERBOSE=on&lt;br /&gt;
&lt;br /&gt;
:0&lt;br /&gt;
Mail/&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
※nkdの部分は自分のログインユーザ名とする。&lt;br /&gt;
&lt;br /&gt;
４）&lt;br /&gt;
動作の確認。&lt;br /&gt;
cygwinのアイコンにアクセスし、&lt;br /&gt;
&lt;br /&gt;
fetchmai -vk&lt;br /&gt;
&lt;br /&gt;
と入力してみる。いろいろとログが出力されるので、ログを確認し&lt;br /&gt;
メールを取り込めているか確認する。&lt;br /&gt;
なお、ちゃんと取り込めている場合、&lt;br /&gt;
C:\cygwin\home\nkd\Mail\new&lt;br /&gt;
以下にメールごとのファイルが作成されている。&lt;br /&gt;
&lt;br /&gt;
５）&lt;br /&gt;
最後に、windowsのタスクスケジューラを使って定期的にgmailに&lt;br /&gt;
アクセスするようにする。&lt;br /&gt;
&lt;br /&gt;
ただし、&lt;br /&gt;
&lt;br /&gt;
fetchmai -vk&lt;br /&gt;
&lt;br /&gt;
を実行するだけのバッチファイルを登録すると、処理ごとに&lt;br /&gt;
ウィンドウが表示されるので煩わしいので、VBSファイルを利用して&lt;br /&gt;
ウィンドウを非表示とする。&lt;br /&gt;
&lt;br /&gt;
作成するのは、gmailbak.batとgmailbak.vbsの２つのファイル。&lt;br /&gt;
ともにC:\cygwin\home\nkd\以下に作成する。&lt;br /&gt;
&lt;br /&gt;
gmailbak.batの内容は以下のとおり。&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
c:/cygwin/bin/bash.exe --login -i -c &quot;fetchmail -k;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
gmailbak.vbsの内容は以下のとおり。&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
Set objWSHShell = CreateObject(&quot;WScript.Shell&quot;)&lt;br /&gt;
objWSHShell.Run &quot;cmd.exe /c C:\cygwin\home\nkd\gmailbak.bat&quot;, 7&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
※nkdの部分は自分のログインユーザ名とする。&lt;br /&gt;
&lt;br /&gt;
タスクスケジューラには、定期的にgmailbak.vbsを実行するように&lt;br /&gt;
設定すれば完了。&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/2407853789162655210/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2012/06/gmail.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/2407853789162655210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/2407853789162655210'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2012/06/gmail.html' title='gmailのバックアップ'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-5724119554882634864</id><published>2010-08-05T11:41:00.004+09:00</published><updated>2010-08-05T11:50:42.550+09:00</updated><title type='text'>webalizerのWarning</title><content type='html'>&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family:&#39;MS PGothic&#39;;font-size:medium;&quot;&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_0&quot;&gt;cron&lt;/span&gt;のログを見ていて&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family:&#39;MS PGothic&#39;;font-size:medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family:&#39;MS PGothic&#39;;font-size:medium;&quot;&gt;/etc/cron.daily/00webalizer:&lt;br /&gt;Warning: Truncating &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_1&quot;&gt;oversized&lt;/span&gt; referrer field [10033]&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family:&#39;MS PGothic&#39;;font-size:medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family:&#39;MS PGothic&#39;;font-size:medium;&quot;&gt;のようなログに気がついた。&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family:&#39;MS PGothic&#39;;font-size:medium;&quot;&gt;調べてみると&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family:&#39;MS PGothic&#39;;font-size:medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;MS PGothic&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-size:medium;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;MS PGothic&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-size:medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; &quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;blockquote&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;font-family:&#39;MS PGothic&#39;;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot;  style=&quot;-webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-size:medium;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; &quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;span&gt;&lt;span&gt;&lt;i&gt;このエラーはエラーメッセージにある通りaccess_logの行で1行あたりの文字数があまりにも多いものが存在したことが原因で起きます。&lt;br /&gt;このような長い行は、&lt;/i&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_2&quot;&gt;&lt;i&gt;IIS&lt;/i&gt;&lt;/span&gt;&lt;i&gt;を攻撃対象としているネットワークワーム(多分、&lt;/i&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_3&quot;&gt;&lt;i&gt;Nimda&lt;/i&gt;&lt;/span&gt;&lt;i&gt;)がバッファオーバーランを利用した攻撃を行うために非常に長いリクエストを発行し、それをApacheがaccess_logに保存することにより作成されます。&lt;br /&gt;&lt;br /&gt;対策は&lt;/i&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_4&quot;&gt;&lt;i&gt;webalizer&lt;/i&gt;&lt;/span&gt;&lt;i&gt;のソースコードをいじって長い行に対応できるようにするか、Apacheの設定でワームの攻撃をaccess_logに保存しないように設定するかだと思います。&lt;br /&gt;後者の方法については「Apache NULL.IDA」で検索するとたくさん見つかると思います。&lt;/i&gt;&lt;/span&gt;&lt;/span&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;  -webkit-border-horizontal-spacing: 1px; -webkit-border-vertical-spacing: 1px; font-family:&#39;MS PGothic&#39;;font-size:medium;&quot;&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;ということらしい。（参照：&lt;a href=&quot;http://home.k05.itscom.net/aperuto/webalizer.html&quot;&gt;http://home.k05.itscom.net/aperuto/webalizer.html&lt;/a&gt;）&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;で、さらに調べて、&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_5&quot;&gt;httpd&lt;/span&gt;のワームとかのログを別ファイルに保存するようにした。&lt;/div&gt;&lt;div&gt;（ついでに画像ファイルのログは記録しないようにした。）&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_6&quot;&gt;httpd&lt;/span&gt;.&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_7&quot;&gt;conf&lt;/span&gt;で&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_8&quot;&gt;CustomLog&lt;/span&gt; logs/access_log combined&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;となっているところを&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_9&quot;&gt;CustomLog&lt;/span&gt; logs/access_log combined&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_10&quot;&gt;SetEnvIf&lt;/span&gt; Request_URI &quot;\.(&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_11&quot;&gt;gif&lt;/span&gt;|&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_12&quot;&gt;jpg&lt;/span&gt;|&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_13&quot;&gt;png&lt;/span&gt;|&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_14&quot;&gt;ico&lt;/span&gt;)$&quot; no_log&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_15&quot;&gt;SetEnvIf&lt;/span&gt; Request_URI &quot;\.(&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_16&quot;&gt;ida&lt;/span&gt;|IDA|&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_17&quot;&gt;exe&lt;/span&gt;|printer|asp|&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_18&quot;&gt;dll&lt;/span&gt;)&quot; worm no_log&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_19&quot;&gt;SetEnvIf&lt;/span&gt; Request_URI &quot;^/_&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_20&quot;&gt;mem&lt;/span&gt;_bin/&quot; worm no_log&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_21&quot;&gt;SetEnvIf&lt;/span&gt; Request_URI &quot;^/_&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_22&quot;&gt;vti&lt;/span&gt;_bin/&quot; worm no_log&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_23&quot;&gt;SetEnvIf&lt;/span&gt; Request_URI &quot;^/c/&quot; worm no_log&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_24&quot;&gt;SetEnvIf&lt;/span&gt; Request_URI &quot;^/d/&quot; worm no_log&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_25&quot;&gt;SetEnvIf&lt;/span&gt; Request_URI &quot;^/&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_26&quot;&gt;msadc&lt;/span&gt;/&quot; worm no_log&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_27&quot;&gt;SetEnvIf&lt;/span&gt; Request_URI &quot;^/&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_28&quot;&gt;MSADC&lt;/span&gt;/&quot; worm no_log&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_29&quot;&gt;SetEnvIf&lt;/span&gt; Request_URI &quot;^/scripts/&quot; worm no_log&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_30&quot;&gt;SetEnvIf&lt;/span&gt; Request_URI &quot;^/default.&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_31&quot;&gt;ida&lt;/span&gt;&quot; worm no_log&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_32&quot;&gt;SetEnvIf&lt;/span&gt; Request_URI &quot;root\.&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_33&quot;&gt;exe&lt;/span&gt;&quot; worm no_log&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_34&quot;&gt;SetEnvIf&lt;/span&gt; Request_URI &quot;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_35&quot;&gt;cmd&lt;/span&gt;\.&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_36&quot;&gt;exe&lt;/span&gt;&quot; worm no_log&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_37&quot;&gt;SetEnvIf&lt;/span&gt; Request_URI &quot;NULL\.IDA&quot; worm no_log&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_38&quot;&gt;CustomLog&lt;/span&gt; logs/access.log combined &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_39&quot;&gt;env&lt;/span&gt;=!no_log&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_40&quot;&gt;CustomLog&lt;/span&gt; logs/worm.log combined &lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_41&quot;&gt;env&lt;/span&gt;=worm&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;のように修正。&lt;/div&gt;&lt;div&gt;修正後、&lt;span class=&quot;blsp-spelling-error&quot; id=&quot;SPELLING_ERROR_42&quot;&gt;httpd&lt;/span&gt;をリスタートして完了。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/5724119554882634864/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2010/08/webalizerwarning.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/5724119554882634864'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/5724119554882634864'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2010/08/webalizerwarning.html' title='webalizerのWarning'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-3058457498860472939</id><published>2010-08-05T10:35:00.000+09:00</published><updated>2010-08-05T10:39:53.043+09:00</updated><title type='text'>CentOS5.5 ログローテーションエラー duplicate log entry for /var/log/xferlog</title><content type='html'>&lt;div&gt;数日前から、&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/etc/cron.daily/logrotate:&lt;/div&gt;&lt;div&gt;error: vsftpd.log:7 duplicate log entry for /var/log/xferlog&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;というエラーが出ていた。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;/etc/logrotate.d 以下のFTP関係のファイルを確認してみるとvsftpdとproftpd&lt;/div&gt;&lt;div&gt;が競合していることが分かった。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;proftpdは利用していないので&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&gt; yum -y remove proftpd&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;でproftpdを削除。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&gt; /usr/sbin/logrotate -vd /etc/logrotate.conf&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;で問題が解消されたことを確認。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/3058457498860472939/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2010/08/centos55-duplicate-log-entry-for.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/3058457498860472939'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/3058457498860472939'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2010/08/centos55-duplicate-log-entry-for.html' title='CentOS5.5 ログローテーションエラー duplicate log entry for /var/log/xferlog'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-1773338894222058882</id><published>2010-07-30T07:26:00.003+09:00</published><updated>2010-07-30T07:28:23.903+09:00</updated><title type='text'>postfixでcannot update mailboxというエラーが出る</title><content type='html'>postfixのログを見ていて&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;cannot update mailbox /var/mail/webmaster for user webmaster. error writing message: File too large&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;というようなログがあることに気がつきました。&lt;/div&gt;&lt;div&gt;main.cfに&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;mailbox_size_limit = 1024000000&lt;/div&gt;&lt;div&gt;message_size_limit = 327680000&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;のような設定をし、とりあえず上限をあげてみた。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/1773338894222058882/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2010/07/postfixcannot-update-mailbox.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/1773338894222058882'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/1773338894222058882'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2010/07/postfixcannot-update-mailbox.html' title='postfixでcannot update mailboxというエラーが出る'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-1299697679079131497</id><published>2010-07-30T07:15:00.002+09:00</published><updated>2010-07-30T07:18:22.824+09:00</updated><title type='text'>BINDのnetwork unreachable resolving</title><content type='html'>logwatchを見ていると&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; &quot;&gt;network unreachable resolving &#39;&lt;a href=&quot;http://0120591714.com/MX/IN&quot; target=&quot;_blank&quot; style=&quot;color: rgb(42, 93, 176); &quot;&gt;xxx.com/MX/IN&lt;/a&gt;&#39;: 2001:503:a83e::2:30#53: 1 Time(s)&lt;br /&gt;network unreachable resolving &#39;x.x.x.x.in-addr.arpa/&lt;wbr&gt;PTR/IN&#39;: 2001:500:13::c7d4:35#53: 1 Time(s)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;font-family:arial, sans-serif;font-size:100%;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-size: 13px;&quot;&gt;のようなログが大量に出てる。&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;font-family:arial, sans-serif;font-size:100%;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-size: 13px;&quot;&gt;調べてみると &lt;/span&gt;&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 16px; &quot;&gt;/etc/sysconfig/named に&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 16px; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 16px; &quot;&gt;OPTION=”-4″&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 16px; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: &#39;Lucida Grande&#39;, Verdana, Arial, sans-serif; font-size: 13px; color: rgb(51, 51, 51); line-height: 16px; &quot;&gt;を追加して&lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana; font-size: 12px; line-height: 19px; &quot;&gt;IPv6 を明示的に使用しない設定にするとよいみたいなので&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana; font-size: 12px; line-height: 19px; &quot;&gt;設定してみた。&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: verdana; font-size: 12px; line-height: 19px; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;font-family:arial, sans-serif;font-size:100%;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot;   style=&quot;font-family:arial, sans-serif;font-size:100%;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;border-collapse: collapse; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/1299697679079131497/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2010/07/bindnetwork-unreachable-resolving.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/1299697679079131497'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/1299697679079131497'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2010/07/bindnetwork-unreachable-resolving.html' title='BINDのnetwork unreachable resolving'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-4953010695707645483</id><published>2010-07-28T13:27:00.002+09:00</published><updated>2010-07-28T13:29:51.840+09:00</updated><title type='text'>centos5.5でpostfixにDKIMを導入</title><content type='html'>&lt;div&gt;centos5.5でpostfixにDKIMを導入。&lt;/div&gt;&lt;div&gt;ドメインはhoge.com&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;１）&lt;/div&gt;&lt;div&gt;dkim-milter 2.8.3-4.el5 をyumでインストール&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;２）&lt;/div&gt;&lt;div&gt;&gt; dkim-genkey -d hoge.com -r -D /etc/mail/dkim-milter&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;で公開キーと秘密キーを作成。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;３）&lt;/div&gt;&lt;div&gt;&gt; chown dkim-milter:dkim-milter /etc/mail/dkim-milter/default.private&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;で秘密キーのパーミッションをdkim-milterにする。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;４）&lt;/div&gt;&lt;div&gt;/etc/mail/dkim-milter/dkim-filter.conf&lt;/div&gt;&lt;div&gt;を設定する。内容は以下のような感じ。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&gt; more /etc/mail/dkim-milter/dkim-filter.conf&lt;/div&gt;&lt;div&gt;::::::::::::::&lt;/div&gt;&lt;div&gt;/etc/mail/dkim-milter/dkim-filter.conf&lt;/div&gt;&lt;div&gt;::::::::::::::&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;## dkim-filter.conf -- configuration file for DKIM filter&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;## $Id: dkim-filter.conf.sample,v 1.27 2008/12/27 05:21:56 msk Exp $&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  ADSPDiscard { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Reject messages which are determined to be &quot;suspicious&quot; according to the&lt;/div&gt;&lt;div&gt;##  sending domain&#39;s published signing procedure (ADSP) record if that record&lt;/div&gt;&lt;div&gt;##  also recommends rejection of such messages.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# ADSPDiscard&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;No&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  ADSPNoSuchDomain { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Reject messages which are determined to be from nonexistent domains during&lt;/div&gt;&lt;div&gt;##  the Author Domain Signing Practises (ADSP) check.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# ADSPNoSuchDomain&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;No&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  AllowSHA1Only { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  By default, the filter will refuse to start if signing mode is enabled&lt;/div&gt;&lt;div&gt;##  but rsa-sha1 will be used (either because it is the only algorithm&lt;/div&gt;&lt;div&gt;##  available or because it was explicitly requested) since this violates&lt;/div&gt;&lt;div&gt;##  the strong recommendations of RFC4871 section 3.3.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# AllowSHA1Only&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;no&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  AlwaysAddARHeader { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Add an &quot;Authentication-Results:&quot; header even to unsigned messages&lt;/div&gt;&lt;div&gt;##  from domains with no &quot;signs all&quot; policy.  The reported DKIM result&lt;/div&gt;&lt;div&gt;##  will be &quot;none&quot; in such cases.  Normally unsigned mail from non-strict&lt;/div&gt;&lt;div&gt;##  domains does not cause the results header to be added.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# AlwaysAddARHeader&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;no&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  AlwaysSignHeaders header-list&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default (none)&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Specifies a list of headers whose names should appear in signatures&lt;/div&gt;&lt;div&gt;##  whether or not they were signed, preventing their later addition.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# AlwaysSignHeaders&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;header1,header2,...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  AuthservID string&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default (local host name)&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Defines the &quot;authserv-id&quot; token to be used when generating &lt;/div&gt;&lt;div&gt;##  Authentication-Results headers after message verification.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# AuthservID&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;example.com&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  AuthservIDWithJobID&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Appends a &quot;/&quot; followed by the MTA&#39;s job ID to the &quot;authserv-id&quot; token&lt;/div&gt;&lt;div&gt;##  when generating Authentication-Results headers after message verification.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# AuthservIDWithJobId&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;no&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  AutoRestart { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Indicate whether or not the filter should arrange to restart automatically&lt;/div&gt;&lt;div&gt;##  if it crashes.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# AutoRestart&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;No&lt;/div&gt;&lt;div&gt;AutoRestart yes&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  AutoRestartCount n&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default 0&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Sets the maximum automatic restart count.  After this number of&lt;/div&gt;&lt;div&gt;##  automatic restarts, the filter will give up and terminate.  A value of 0&lt;/div&gt;&lt;div&gt;##  implies no limit.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# AutoRestartCount&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  AutoRestartRate n/t[u]&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default (none)&lt;/div&gt;&lt;div&gt;## &lt;/div&gt;&lt;div&gt;##  Sets the maximum automatic restart rate.  See the dkim-filter.conf(5)&lt;/div&gt;&lt;div&gt;##  man page for the format of this parameter.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# AutoRestartRate&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;n/tu&lt;/div&gt;&lt;div&gt;AutoRestartRate 12/1h&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  Background { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;yes&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Indicate whether or not the filter should run in the background.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Background&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;Yes&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  BaseDirectory path&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default (none)&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Causes the filter to change to the named directory before beginning&lt;/div&gt;&lt;div&gt;##  operation.  Thus, cores will be dumped here and configuration files&lt;/div&gt;&lt;div&gt;##  are read relative to this location.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# BaseDirectory&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;/var/run/dkim-filter&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  BodyLengths { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Indicate whether or not signatures with body length tags should be&lt;/div&gt;&lt;div&gt;##  generated.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# BodyLengths&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;No&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  Canonicalization hdrcanon[/bodycanon]&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;simple/simple&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Select canonicalizations to use when signing.  If the &quot;bodycanon&quot; is&lt;/div&gt;&lt;div&gt;##  omitted, &quot;simple&quot; is used.  Valid values for each are &quot;simple&quot; and&lt;/div&gt;&lt;div&gt;##  &quot;relaxed&quot;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Canonicalization&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;simple/simple&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  ClockDrift n&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default 300&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Specify the tolerance range for expired signatures or signatures&lt;/div&gt;&lt;div&gt;##  which appear to have timestamps in the future, allowing for clock&lt;/div&gt;&lt;div&gt;##  drift.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# ClockDrift&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;300 &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  Diagnostics { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Specifies whether or not signatures with header diagnostic tags should&lt;/div&gt;&lt;div&gt;##  be generated.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Diagnostics&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;No&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  DNSTimeout n&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default 10&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Specify the time in seconds to wait for replies from the nameserver when&lt;/div&gt;&lt;div&gt;##  requesting keys or signing policies.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# DNSTimeout&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;10&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  Domain name[,...]&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default (none)&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Specify for which domain(s) signing should be done.  No default; must&lt;/div&gt;&lt;div&gt;##  be specified for signing.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Domain&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;   &lt;/span&gt;example.com&lt;/div&gt;&lt;div&gt;Domain hoge.com&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  DontSignMailTo&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;addrlist&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default (none)&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Gives a list of recipient addresses or address patterns whose mail should&lt;/div&gt;&lt;div&gt;##  not be signed.  Wildcard (&quot;*&quot;) characters are allowed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# DontSignMailTo&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;addr1,addr2,...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  EnableCoredumps { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  On systems which have support for such, requests that the kernel dump&lt;/div&gt;&lt;div&gt;##  core even though the process may change user ID during its execution.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# EnableCoredumps&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;no&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  ExternalIgnoreList filename&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Names a file from which a list of externally-trusted hosts is read.&lt;/div&gt;&lt;div&gt;##  These are hosts which are allowed to send mail through you for signing.&lt;/div&gt;&lt;div&gt;##  Automatically contains 127.0.0.1.  See man page for file format.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# ExternalIgnoreList&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;filename&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  FixCRLF { yes | no }&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Requests that the library convert &quot;naked&quot; CR and LF characters to&lt;/div&gt;&lt;div&gt;##  CRLFs during canonicalization.  The default is &quot;no&quot;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# FixCRLF &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;no&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  InternalHosts filename&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Names a file from which a list of internal hosts is read.  These are&lt;/div&gt;&lt;div&gt;##  hosts from which mail should be signed rather than verified.&lt;/div&gt;&lt;div&gt;##  Automatically contains 127.0.0.1.  See man page for file format.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# InternalHosts&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;filename&lt;/div&gt;&lt;div&gt;InternalHosts /etc/mail/dkim-milter/internalhosts&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  KeepTemporaryFiles { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  If set, causes temporary files generated during message signing or&lt;/div&gt;&lt;div&gt;##  verifying to be left behind for debugging use.  Not for normal operation;&lt;/div&gt;&lt;div&gt;##  can fill your disks quite fast on busy systems.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# KeepTemporaryFiles&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;no&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  KeyFile filename&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Specifies the path to the private key to use when signing.  Ignored if&lt;/div&gt;&lt;div&gt;##  Keylist is set.  No default; must be specified for signing.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# KeyFile&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;   &lt;/span&gt;/var/db/dkim/example.private&lt;/div&gt;&lt;div&gt;KeyFile /etc/mail/dkim-milter/default.private&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  KeyList filename&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Specifies the path to the list of keys and signing domains to be applied&lt;/div&gt;&lt;div&gt;##  by the signing filter.  The entries in this file should be of the form:&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;pattern:domain:keypath&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  ...where &quot;pattern&quot; is a pattern of user@host to match, with &quot;*&quot; being&lt;/div&gt;&lt;div&gt;##  allowed as a wildcard; &quot;domain&quot; is the signing domain; and &quot;keypath&quot;&lt;/div&gt;&lt;div&gt;##  is the path to the private key to use to generate signatures for such&lt;/div&gt;&lt;div&gt;##  users.  The selector used will be the filename portion of &quot;keypath&quot;.&lt;/div&gt;&lt;div&gt;##  Blank lines are ignored, and the hash (&quot;#&quot;) character is interpreted&lt;/div&gt;&lt;div&gt;##  as the beginning of a comment.  See dkim-filter.conf(5) for more&lt;/div&gt;&lt;div&gt;##  information.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#KeyList&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;/etc/mail/dkim-milter/keys/keylist&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  LocalADSP filename&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Allows specification of local ADSP overrides for domains.  This should be&lt;/div&gt;&lt;div&gt;##  a path to a file containing entries, one per line, with comments and&lt;/div&gt;&lt;div&gt;##  blank lines allowed.  An entry is of the form &quot;domain:policy&quot; where&lt;/div&gt;&lt;div&gt;##  &quot;domain&quot; is either a fully-qualified domain name (e.g. &quot;foo.example.com&quot;)&lt;/div&gt;&lt;div&gt;##  or a subdomain name preceded by a period (e.g. &quot;.example.com&quot;), and&lt;/div&gt;&lt;div&gt;##  &quot;policy&quot; is either &quot;unknown&quot;, &quot;all&quot;, or &quot;discardable&quot;, as per the current&lt;/div&gt;&lt;div&gt;##  ADSP draft specification.  This allows local overrides of policies to&lt;/div&gt;&lt;div&gt;##  enforce for domains which either don&#39;t publish ADSP or publish weaker&lt;/div&gt;&lt;div&gt;##  policies than the verifier would like to enforce.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# LocalADSP&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;/etc/mail/local-adsp-rules&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  LogWhy { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  If logging is enabled (see Syslog below), issues very detailed logging&lt;/div&gt;&lt;div&gt;##  about the logic behind the filter&#39;s decision to either sign a message&lt;/div&gt;&lt;div&gt;##  or verify it.  The logic behind the decision is non-trivial and can be&lt;/div&gt;&lt;div&gt;##  confusing to administrators not familiar with its operation.  A&lt;/div&gt;&lt;div&gt;##  description of how the decision is made can be found in the OPERATIONS&lt;/div&gt;&lt;div&gt;##  section of the dkim-filter(8) man page.  This causes a large increase&lt;/div&gt;&lt;div&gt;##  in the amount of log data generated for each message, so it should be&lt;/div&gt;&lt;div&gt;##  limited to debugging use and not enabled for general operation.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# LogWhy&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;no&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  MacroList macro[=value][,...]&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Gives a set of MTA-provided macros which should be checked to see&lt;/div&gt;&lt;div&gt;##  if the sender has been determined to be a local user and therefore&lt;/div&gt;&lt;div&gt;##  whether or not signing should be done.  See dkim-filter.conf(5) for&lt;/div&gt;&lt;div&gt;##  more information.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# MacroList&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;foo=bar,baz=blivit&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  MaximumHeaders n&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Disallow messages whose header blocks are bigger than &quot;n&quot; bytes.&lt;/div&gt;&lt;div&gt;##  Intended to detect and block a denial-of-service attack.  The default&lt;/div&gt;&lt;div&gt;##  is 65536.  A value of 0 disables this test.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# MaximumHeaders&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;n&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  MaximumSignedBytes n&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Don&#39;t sign more than &quot;n&quot; bytes of the message.  The default is to &lt;/div&gt;&lt;div&gt;##  sign the entire message.  Setting this implies &quot;BodyLengths&quot;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# MaximumSignedBytes&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;n&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  MilterDebug n&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Request a debug level of &quot;n&quot; from the milter library.  The default is 0.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# MilterDebug&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  Minimum n[% | +]&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default 0&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Sets a minimum signing volume; one of the following formats:&lt;/div&gt;&lt;div&gt;##&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;n&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;at least n bytes (or the whole message, whichever is less)&lt;/div&gt;&lt;div&gt;##&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;must be signed&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;n%&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;at least n% of the message must be signed&lt;/div&gt;&lt;div&gt;##&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;n+&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;if a length limit was presented in the signature, no more than&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;n bytes may have been added&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Minimum&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;n&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  Mode [sv]&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default sv&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Indicates which mode(s) of operation should be provided.  &quot;s&quot; means&lt;/div&gt;&lt;div&gt;##  &quot;sign&quot;, &quot;v&quot; means &quot;verify&quot;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Mode&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;   &lt;/span&gt;sv&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  MTA mtaname[,...]&lt;/div&gt;&lt;div&gt;##  &lt;/div&gt;&lt;div&gt;##  Specifies a list of MTAs whos mail should always be signed rather than&lt;/div&gt;&lt;div&gt;##  verified.  The &quot;mtaname&quot; is extracted from the DaemonPortOptions line&lt;/div&gt;&lt;div&gt;##  in effect.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# MTA&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;   &lt;/span&gt;name&lt;/div&gt;&lt;div&gt;MTA MSA&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  MustBeSigned&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default (none)&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Defines a list of headers which, if present on a message, must be&lt;/div&gt;&lt;div&gt;##  signed for the signature to be considered acceptable.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# MustBeSigned&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;header1,header2,...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  OmitHeaders headerlist&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default (none)&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Specifies a list of headers that should always be omitted when signing.&lt;/div&gt;&lt;div&gt;##  Header names should be separated by commas.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# OmitHeaders&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;header1,header2,...&lt;/div&gt;&lt;div&gt;OmitHeaders Authentication-Results&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  On-...&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Specifies what to do when certain error conditions are encountered.&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  See dkim-filter.conf(5) for more information.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# On-Default&lt;/div&gt;&lt;div&gt;# On-BadSignature&lt;/div&gt;&lt;div&gt;# On-DNSError&lt;/div&gt;&lt;div&gt;# On-InternalError&lt;/div&gt;&lt;div&gt;# On-NoSignature&lt;/div&gt;&lt;div&gt;# On-Security&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  PeerList filename&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Contains a list of IP addresses, CIDR blocks, hostnames or domain names&lt;/div&gt;&lt;div&gt;##  whose mail should be neither signed nor verified by this filter.  See man&lt;/div&gt;&lt;div&gt;##  page for file format.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# PeerList&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;filename&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  PidFile filename&lt;/div&gt;&lt;div&gt;## &lt;/div&gt;&lt;div&gt;##  Name of the file where the filter should write its pid before beginning&lt;/div&gt;&lt;div&gt;##  normal operations.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# PidFile&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;filename&lt;/div&gt;&lt;div&gt;PidFile                 /var/run/dkim-milter/dkim-milter.pid&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  POPDBFile filename&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Names a database which should be checked for &quot;POP before SMTP&quot; records&lt;/div&gt;&lt;div&gt;##  as a form of authentication of users who may be sending mail through&lt;/div&gt;&lt;div&gt;##  the MTA for signing.  Requires special compilation of the filter.&lt;/div&gt;&lt;div&gt;##  See dkim-filter.conf(5) for more information.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# POPDBFile&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;filename&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  Quarantine { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Indicates whether or not the filter should arrange to quarantine mail&lt;/div&gt;&lt;div&gt;##  which fails verification.  Intended for diagnostic use only.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Quarantine&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;No&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  QueryCache { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Instructs the DKIM library to maintain its own local cache of keys and&lt;/div&gt;&lt;div&gt;##  policies retrieved from DNS, rather than relying on the nameserver for&lt;/div&gt;&lt;div&gt;##  caching service.  Useful if the nameserver being used by the filter is&lt;/div&gt;&lt;div&gt;##  not local.  The filter must be compiled with the QUERY_CACHE flag to enable&lt;/div&gt;&lt;div&gt;##  this feature, since it adds a library dependency.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# QueryCache&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;No&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  RemoveARAll { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Remove all Authentication-Results: headers on all arriving mail.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# RemoveARAll&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;No&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  RemoveARFrom list&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default (none)&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Remove all Authentication-Results: headers on all arriving mail that&lt;/div&gt;&lt;div&gt;##  claim to have been added by hosts listed in this parameter.  The list&lt;/div&gt;&lt;div&gt;##  should be comma-separated.  Entire domains may be specified by preceding&lt;/div&gt;&lt;div&gt;##  the dopmain name by a single dot (&quot;.&quot;) character.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# RemoveARFrom&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;host1,host2,.domain1,.domain2,...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  RemoveOldSignatures { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Remove old signatures on messages, if any, when generating a signature.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# RemoveOldSignatures&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;No&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  ReportAddress addr&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default (executing user)&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Specifies the sending address to be used on From: headers of outgoing&lt;/div&gt;&lt;div&gt;##  failure reports.  By default, the e-mail address of the user executing&lt;/div&gt;&lt;div&gt;##  the filter is used.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# ReportAddress&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;postmaster@example.com&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  RequiredHeaders { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default no&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Rejects messages which don&#39;t conform to RFC2822 header count requirements.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# RequiredHeaders&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;No&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  Selector name&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  The name of the selector to use when signing.  No default; must be&lt;/div&gt;&lt;div&gt;##  specified for signing.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Selector&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;default&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  SendADSPReports { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Specifies whether or not the filter should generate report mail back&lt;/div&gt;&lt;div&gt;##  to senders when the ADSP (Author Domain Signing Practises) check fails for&lt;/div&gt;&lt;div&gt;##  a message.  See dkim-filter.conf(5) for details.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# SendADSPReports&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;No&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  SendReports { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Specifies whether or not the filter should generate report mail back&lt;/div&gt;&lt;div&gt;##  to senders when verification fails and an address for such a purpose&lt;/div&gt;&lt;div&gt;##  is provided.  See dkim-filter.conf(5) for details.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# SendReports&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;No&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  SignatureAlgorithm signalg&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;rsa-sha256&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Signature algorithm to use when generating signatures.  Must be either&lt;/div&gt;&lt;div&gt;##  &quot;rsa-sha1&quot; or &quot;rsa-sha256&quot;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# SignatureAlgorithm&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;rsa-sha256&lt;/div&gt;&lt;div&gt;SignatureAlgorithm        rsa-sha1&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  SignatureTTL seconds&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;0&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Specifies the lifetime in seconds of signatures generated by the&lt;/div&gt;&lt;div&gt;##  filter.  A value of 0 means no expiration time is included in the&lt;/div&gt;&lt;div&gt;##  signature.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# SignatureTTL&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;0&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  SignHeaders header-list&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default (none)&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Specifies the list of headers which should be included when generating&lt;/div&gt;&lt;div&gt;##  signatures.  The string should be a comma-separated list of header names.&lt;/div&gt;&lt;div&gt;##  See the dkim-filter.conf(5) man page for more information.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# SignHeaders&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;header1,header2,...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  Socket socketspec&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Names the socket where this filter should listen for milter connections&lt;/div&gt;&lt;div&gt;##  from the MTA.  Required.  Should be in one of these forms:&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  inet:port@address&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;to listen on a specific interface&lt;/div&gt;&lt;div&gt;##  inet:port&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;   &lt;/span&gt;to listen on all interfaces&lt;/div&gt;&lt;div&gt;##  local:/path/to/socket&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;to listen on a UNIX domain socket&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Socket&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;   &lt;/span&gt;inet:port@localhost&lt;/div&gt;&lt;div&gt;#Socket inet:8891@localhost&lt;/div&gt;&lt;div&gt;#Socket local:/var/run/dkim-milter/dkim-milter.sock&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  StrictTestMode { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Selects strict CRLF mode during testing (see the &quot;-t&quot; command line&lt;/div&gt;&lt;div&gt;##  flag in the dkim-filter(8) man page).  Messages for which all header&lt;/div&gt;&lt;div&gt;##  fields and body lines are not CRLF-terminated are considered malformed&lt;/div&gt;&lt;div&gt;##  and will produce an error.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# StrictTestMode&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;no&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  SubDomains { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Sign for subdomains as well?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# SubDomains&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;No&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  Syslog { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Log informational and error activity to syslog?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Syslog&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;No&lt;/div&gt;&lt;div&gt;Syslog Yes&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  SyslogFacility      facility&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;mail&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Valid values are :&lt;/div&gt;&lt;div&gt;##      auth cron daemon kern lpr mail news security syslog user uucp &lt;/div&gt;&lt;div&gt;##      local0 local1 local2 local3 local4 local5 local6 local7&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  syslog facility to be used&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# SyslogFacility&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;mail&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  SyslogSuccess { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Log success activity to syslog?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# SyslogSuccess&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;No&lt;/div&gt;&lt;div&gt;SyslogSuccess           yes&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  TemporaryDirectory path&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default /var/tmp&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Specifies which directory will be used for creating temporary files&lt;/div&gt;&lt;div&gt;##  during message processing.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# TemporaryDirectory&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;/var/tmp&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  TestPublicKeys filename&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default (none)&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Names a file from which public keys should be read.  Intended for use&lt;/div&gt;&lt;div&gt;##  only during automated testing.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# TestPublicKeys&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;/tmp/testkeys&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  UMask mask&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default (none)&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Change the process umask for file creation to the specified value.&lt;/div&gt;&lt;div&gt;##  The system has its own default which will be used (usually 022).&lt;/div&gt;&lt;div&gt;##  See the umask(2) man page for more information.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# UMask&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;   &lt;/span&gt;022&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  Userid userid&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default (none)&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Change to user &quot;userid&quot; before starting normal operation?  May include&lt;/div&gt;&lt;div&gt;##  a group ID as well, separated from the userid by a colon.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# UserID&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;userid&lt;/div&gt;&lt;div&gt;UserID dkim-milter:dkim-milter&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;##  X-Header { yes | no }&lt;/div&gt;&lt;div&gt;##  &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;default &quot;no&quot;&lt;/div&gt;&lt;div&gt;##&lt;/div&gt;&lt;div&gt;##  Add an X- header to messages passing through this filter to identify&lt;/div&gt;&lt;div&gt;##  messages it has processed.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# X-Header&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt;  &lt;/span&gt;No&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;５）&lt;/div&gt;&lt;div&gt;/etc/sysconfig/dkim-milter&lt;/div&gt;&lt;div&gt;を設定する。内容は以下のような感じ。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&gt; more /etc/sysconfig/dkim-milter&lt;/div&gt;&lt;div&gt;::::::::::::::&lt;/div&gt;&lt;div&gt;/etc/sysconfig/dkim-milter&lt;/div&gt;&lt;div&gt;::::::::::::::&lt;/div&gt;&lt;div&gt;# To sign only, use -bs&lt;/div&gt;&lt;div&gt;# EXTRA_FLAGS=-bs&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;USER=&quot;dkim-milter&quot;&lt;/div&gt;&lt;div&gt;#PORT=inet:8891@localhost&lt;/div&gt;&lt;div&gt;SIGNING_DOMAIN=&quot;hoge.com&quot;&lt;/div&gt;&lt;div&gt;SELECTOR_NAME=&quot;default&quot;&lt;/div&gt;&lt;div&gt;KEYFILE=&quot;/etc/mail/dkim-milter/default.private&quot;&lt;/div&gt;&lt;div&gt;SIGNER=yes&lt;/div&gt;&lt;div&gt;VERIFIER=yes&lt;/div&gt;&lt;div&gt;CANON=simple&lt;/div&gt;&lt;div&gt;SIGALG=rsa-sha1&lt;/div&gt;&lt;div&gt;REJECTION=&quot;bad=r,dns=t,int=t,no=a,miss=r&quot;&lt;/div&gt;&lt;div&gt;EXTRA_ARGS=&quot;-h -l -D&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;６）&lt;/div&gt;&lt;div&gt;/etc/rc.d/init.d/dkim-milter&lt;/div&gt;&lt;div&gt;のSOCKET,EXTRA_FLAGSの内容を修正する。内容は以下のような感じ。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&gt; more /etc/rc.d/init.d/dkim-milter&lt;/div&gt;&lt;div&gt;::::::::::::::&lt;/div&gt;&lt;div&gt;/etc/rc.d/init.d/dkim-milter&lt;/div&gt;&lt;div&gt;::::::::::::::&lt;/div&gt;&lt;div&gt;#!/bin/bash&lt;/div&gt;&lt;div&gt;#&lt;/div&gt;&lt;div&gt;# /etc/init.d/dkim-milter&lt;/div&gt;&lt;div&gt;#&lt;/div&gt;&lt;div&gt;# chkconfig:   - 79 21&lt;/div&gt;&lt;div&gt;# description: DomainKeys Identified Mail Milter&lt;/div&gt;&lt;div&gt;# processname: dkim-filter&lt;/div&gt;&lt;div&gt;# config:      /etc/mail/dkim-milter/dkim-milter.conf&lt;/div&gt;&lt;div&gt;# config:      /etc/sysconfig/dkim-milter&lt;/div&gt;&lt;div&gt;# pidfile:     /var/run/dkim-milter/dkim-milter.pid&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;# Source function library.&lt;/div&gt;&lt;div&gt;. /etc/init.d/functions&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;desc=&quot;DomainKeys Identified Mail Milter&quot;&lt;/div&gt;&lt;div&gt;name=dkim-milter&lt;/div&gt;&lt;div&gt;prog=dkim-filter&lt;/div&gt;&lt;div&gt;prog_with_path=/usr/sbin/${prog}&lt;/div&gt;&lt;div&gt;user=${name}&lt;/div&gt;&lt;div&gt;pidfile=/var/run/${name}/${name}.pid&lt;/div&gt;&lt;div&gt;config=/etc/mail/${name}/${prog}.conf&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#SOCKET=local:/var/run/${name}/${name}.sock&lt;/div&gt;&lt;div&gt;SOCKET=inet:8891@localhost&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#EXTRA_FLAGS=&quot;&quot;&lt;/div&gt;&lt;div&gt;TRUST=&quot;/etc/mail/dkim-milter/internalhosts&quot;&lt;/div&gt;&lt;div&gt;EXTRA_FLAGS=&quot;-h -l -D -i ${TRUST} -I ${TRUST}&quot;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;[ -r /etc/sysconfig/${name} ] &amp;amp;&amp;amp; . /etc/sysconfig/${name}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;start() {&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;echo -n &quot;Starting ${desc} (${prog}): &quot;&lt;/div&gt;&lt;div&gt;        daemon --user ${user} ${prog_with_path} -x ${config} -P ${pidfile} -p ${SOCKET} ${EXTRA_FLAGS}&lt;/div&gt;&lt;div&gt;        RETVAL=$?&lt;/div&gt;&lt;div&gt;        echo&lt;/div&gt;&lt;div&gt;        if [ ${RETVAL} -eq 0 ]; then&lt;/div&gt;&lt;div&gt;                touch /var/lock/subsys/${name}&lt;/div&gt;&lt;div&gt;                return 0&lt;/div&gt;&lt;div&gt;        else&lt;/div&gt;&lt;div&gt;                return 1&lt;/div&gt;&lt;div&gt;        fi&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;stop() {&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;echo -n &quot;Shutting down ${desc}: &quot;&lt;/div&gt;&lt;div&gt;        rm -f /var/lock/subsys/${name}&lt;/div&gt;&lt;div&gt;        killproc ${prog}&lt;/div&gt;&lt;div&gt;        RETVAL=$?&lt;/div&gt;&lt;div&gt;        echo&lt;/div&gt;&lt;div&gt;        if [ ${RETVAL} -eq 0 ]; then&lt;/div&gt;&lt;div&gt;                rm -f ${pidfile}&lt;/div&gt;&lt;div&gt;                return 0&lt;/div&gt;&lt;div&gt;        else&lt;/div&gt;&lt;div&gt;                return 1&lt;/div&gt;&lt;div&gt;        fi&lt;/div&gt;&lt;div&gt;}&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;case &quot;$1&quot; in&lt;/div&gt;&lt;div&gt;    start)&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;start&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;;;&lt;/div&gt;&lt;div&gt;    stop)&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;stop&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;;;&lt;/div&gt;&lt;div&gt;    status)&lt;/div&gt;&lt;div&gt;        status -p ${pidfile} ${prog}&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;;;&lt;/div&gt;&lt;div&gt;    restart|reload)&lt;/div&gt;&lt;div&gt;    &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;stop&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;start&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;;;&lt;/div&gt;&lt;div&gt;    condrestart)&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;[ -f /var/lock/subsys/${name} ] &amp;amp;&amp;amp; stop&lt;/div&gt;&lt;div&gt;        start&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;;;&lt;/div&gt;&lt;div&gt;    *)&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;echo &quot;Usage: ${name} {start|stop|status|reload|restart}&quot;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;exit 1&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space:pre&quot;&gt; &lt;/span&gt;;;&lt;/div&gt;&lt;div&gt;esac&lt;/div&gt;&lt;div&gt;exit $?&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;７）&lt;/div&gt;&lt;div&gt;Postfixの設定&lt;/div&gt;&lt;div&gt;/etc/postfix/main.cf に以下を追加する。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;#DKIM&lt;/div&gt;&lt;div&gt;smtpd_milters = inet:localhost:8891&lt;/div&gt;&lt;div&gt;non_smtpd_milters = inet:localhost:8891&lt;/div&gt;&lt;div&gt;milter_default_action = accept&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;８）&lt;/div&gt;&lt;div&gt;署名をつけるネットワークのリストを設定。&lt;/div&gt;&lt;div&gt;内容は以下のような感じ。&lt;/div&gt;&lt;div&gt;112.42.11.121は他のサーバのIP。このIPからのメールについても書名をつける。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&gt; more /etc/mail/dkim-milter/internalhosts&lt;/div&gt;&lt;div&gt;::::::::::::::&lt;/div&gt;&lt;div&gt;/etc/mail/dkim-milter/internalhosts&lt;/div&gt;&lt;div&gt;::::::::::::::&lt;/div&gt;&lt;div&gt;127.0.0.1&lt;/div&gt;&lt;div&gt;112.42.11.121&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;９）&lt;/div&gt;&lt;div&gt;dkim-milter、postfixの順番で稼動。&lt;/div&gt;&lt;div&gt;（停止の場合は、postfix、dkim-milterの順番）&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;１０）&lt;/div&gt;&lt;div&gt;DNSサーバに/etc/mail/dkim-milter/default.txtのレコードを登録して再起動。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;※&lt;/div&gt;&lt;div&gt;設定ファイルや起動スクリプトに結構な重複があるが気にしない。&lt;/div&gt;&lt;div&gt;たぶん、もっとエレガントにできるんだろうけど、現状動くのでよしとする。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/4953010695707645483/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2010/07/centos55postfixdkim.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/4953010695707645483'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/4953010695707645483'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2010/07/centos55postfixdkim.html' title='centos5.5でpostfixにDKIMを導入'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-2178015474827962506</id><published>2010-07-26T14:41:00.002+09:00</published><updated>2010-07-26T14:46:47.188+09:00</updated><title type='text'>postfixで中継設定</title><content type='html'>postfixで中継設定をした&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;hoge.comのメールをfoo.comに中継させたい場合。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;まず、foo.comでpostconfを利用して&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: 15px; white-space: pre-wrap; &quot;&gt;mynetworksの値を&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: 15px; white-space: pre-wrap; &quot;&gt;確かめる。&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: 15px; white-space: pre-wrap; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Arial; font-size: 15px; white-space: pre-wrap; &quot;&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: transparent; font-family: &#39;MS PGothic&#39;; white-space: normal; font-size: medium; &quot;&gt;&lt;span id=&quot;internal-source-marker_0.7984466934576631&quot; style=&quot;font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; &quot;&gt;mynetworks = 127.0.0.0/8 184.38.66.0/25&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: transparent; font-family: &#39;MS PGothic&#39;; white-space: normal; font-size: medium; &quot;&gt;&lt;span id=&quot;internal-source-marker_0.7984466934576631&quot; style=&quot;font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: transparent; font-family: &#39;MS PGothic&#39;; white-space: normal; font-size: medium; &quot;&gt;&lt;span id=&quot;internal-source-marker_0.7984466934576631&quot; style=&quot;font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; &quot;&gt;のような感じだとした場合、/etc/postfix/main.cfで&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: transparent; font-family: &#39;MS PGothic&#39;; white-space: normal; font-size: medium; &quot;&gt;&lt;span id=&quot;internal-source-marker_0.7984466934576631&quot; style=&quot;font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: transparent; font-family: &#39;MS PGothic&#39;; white-space: normal; font-size: medium; &quot;&gt;&lt;span id=&quot;internal-source-marker_0.7984466934576631&quot; style=&quot;font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; &quot;&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: transparent; font-family: &#39;MS PGothic&#39;; white-space: normal; font-size: medium; &quot;&gt;&lt;span id=&quot;internal-source-marker_0.7984466934576631&quot; style=&quot;font-size: 11pt; font-family: Arial; color: rgb(0, 0, 0); background-color: transparent; font-weight: normal; font-style: normal; text-decoration: none; vertical-align: baseline; white-space: pre-wrap; &quot;&gt;mynetworks = 127.0.0.0/8 184.38.66.0/25 &lt;/span&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: 16px; &quot;&gt;hoge.com&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: transparent; font-family: &#39;MS PGothic&#39;; white-space: normal; font-size: medium; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: 16px; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: transparent; font-family: &#39;MS PGothic&#39;; white-space: normal; font-size: medium; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: 16px; &quot;&gt;のように追加修正したらOK。&lt;/span&gt;&lt;/div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: transparent; font-family: &#39;MS PGothic&#39;; white-space: normal; font-size: medium; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: Georgia, serif; font-size: 16px; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/2178015474827962506/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2010/07/postfix_26.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/2178015474827962506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/2178015474827962506'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2010/07/postfix_26.html' title='postfixで中継設定'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-7413915724903932137.post-7432182092296676980</id><published>2010-07-26T14:28:00.002+09:00</published><updated>2010-07-26T14:39:30.338+09:00</updated><title type='text'>postfixでバウンスメール処理</title><content type='html'>postfixでバウンスメール処理の設定をした。&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;まず、メール配信部分で、&lt;/div&gt;&lt;div&gt;hoge.comからfoo@foo.comにメールを配信する場合、Return-Pathに&lt;/div&gt;&lt;div&gt;bounce+foo=foo.com@hoge.comが入るようにしておく。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;●postfixでの設定。&lt;/div&gt;&lt;div&gt;/etc/postfix/main.cf&lt;/div&gt;&lt;div&gt;に&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;recipient_delimiter = +&lt;/div&gt;&lt;div&gt;propagate_unmatched_extensions = canonical, virtual&lt;/div&gt;&lt;div&gt;local_recipient_maps =&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;を設定しておく。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;エラーメールを処理するスクリプトがhoge.plだとした場合、&lt;/div&gt;&lt;div&gt;エイリアスに&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;bounce | /path/to/hoge.pl&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;設定したらOK。&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div style=&quot;margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; background-color: transparent; font-family: &#39;MS PGothic&#39;; font-size: medium; &quot;&gt;&lt;span class=&quot;Apple-style-span&quot;    style=&quot;font-family:&#39;Trebuchet MS&#39;;font-size:180%;color:#333333;&quot;&gt;&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-size: 17px; white-space: pre-wrap; &quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linsyan.blogspot.com/feeds/7432182092296676980/comments/default' title='コメントの投稿'/><link rel='replies' type='text/html' href='http://linsyan.blogspot.com/2010/07/postfix.html#comment-form' title='0 件のコメント'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/7432182092296676980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/7413915724903932137/posts/default/7432182092296676980'/><link rel='alternate' type='text/html' href='http://linsyan.blogspot.com/2010/07/postfix.html' title='postfixでバウンスメール処理'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/16554993552840775562</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>