<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>仙人の心得 &#187; postfix</title>
	<atom:link href="http://blog.mktime.com/archive/category/postfix/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.mktime.com</link>
	<description>修行の日々を淡々と</description>
	<lastBuildDate>Thu, 05 May 2011 07:39:25 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Linux：ソースからインストール＆パッケージ作成</title>
		<link>http://blog.mktime.com/archive/69.html</link>
		<comments>http://blog.mktime.com/archive/69.html#comments</comments>
		<pubDate>Sat, 11 Apr 2009 04:13:51 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[checkinstall]]></category>
		<category><![CDATA[rpm]]></category>

		<guid isPermaLink="false">http://blog.mktime.com/?p=69</guid>
		<description><![CDATA[checkinstallなるものでソースからインストールしつつパッケージを作成できるらしいので試してみた。 まずはcheckinstallをインストールする。 wget http://asic-linux.com.mx/~izto/checkinstall/files/rpm/checkinstall-1.6.1-1.i386.rpm rpm -ihv checkinstall-1.6.1 どこに入ったかわからなくなったので・・・＾＾； rpm -ql checkinstall どうやら/usr/local/sbin/checkinstall -h でヘルプ表示 /usr/local/sbin/checkinstall -h checkinstall 1.6.1, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran This software is released under the GNU GPL. Usage: checkinstall [options] [command [command arguments]] Options: *Package type selection* -t,&#8211;type= Choose packaging system -S Build a Slackware package -R Build a [...]]]></description>
			<content:encoded><![CDATA[<p>checkinstallなるものでソースからインストールしつつパッケージを作成できるらしいので試してみた。</p>
<p>まずはcheckinstallをインストールする。</p>
<div class="console">
wget http://asic-linux.com.mx/~izto/checkinstall/files/rpm/checkinstall-1.6.1-1.i386.rpm<br />
rpm -ihv checkinstall-1.6.1
</div>
<p>どこに入ったかわからなくなったので・・・＾＾；</p>
<div class="console">
rpm -ql checkinstall
</div>
<p>どうやら/usr/local/sbin/checkinstall</p>
<p>-h でヘルプ表示</p>
<div class="console">
/usr/local/sbin/checkinstall -h</p>
<p>checkinstall 1.6.1, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran<br />
           This software is released under the GNU GPL.</p>
<p>Usage: checkinstall [options] [command [command arguments]]<br />
Options:<br />
*Package type selection*<br />
-t,&#8211;type=<slackware|rpm|debian> Choose packaging system<br />
-S                               Build a Slackware package<br />
-R                               Build a RPM package<br />
-D                               Build a Debian package<br />
*Install options*<br />
&#8211;install=<yes|no>             Toggle created package installation<br />
&#8211;fstrans=<yes|no>             Enable/disable the filesystem translation code<br />
*Scripting options*<br />
-y, &#8211;default                  Accept default answers to all questions<br />
&#8211;pkgname=<name>               Set name<br />
&#8211;pkgversion=<version>         Set version<br />
-A, &#8211;arch, &#8211;pkgarch=<arch>   Set architecture<br />
&#8211;pkgrelease=<release>         Set release<br />
&#8211;pkglicense=
<license>         Set license<br />
&#8211;pkggroup=<group>             Set software group<br />
&#8211;pkgsource=<source>           Set source location<br />
&#8211;pkgaltsource=<altsource>     Set alternate source location<br />
&#8211;pakdir=<directory>           The new package will be saved here<br />
&#8211;maintainer=<email addr>      The package maintainer (.deb)<br />
&#8211;provides=
<list>              Features provided by this package (.rpm)<br />
&#8211;requires=
<list>              Features required by this package<br />
&#8211;rpmflags=<flags>             Pass this flags to the rpm installer<br />
&#8211;rpmi                         Use the -i flag for rpm when installing a .rpm<br />
&#8211;rpmu                         Use the -U flag for rpm when installing a .rpm<br />
&#8211;dpkgflags=<flags>            Pass this flags to the dpkg installer<br />
&#8211;spec=
<path>                  .spec file location<br />
&#8211;nodoc                        Do not include documentation files</p>
<p>*Info display options*</p>
<p>-d<0|1|2>                      Set debug level<br />
-si                            Run an interactive install command<br />
&#8211;showinstall=<yes|no>         Toggle interactive install command<br />
-ss                            Run an interactive Slackware installation script<br />
&#8211;showslack=<yes|no>           Toggle interactive Slackware installation script</p>
<p>*Package tuning options*</p>
<p>&#8211;autodoinst=<yes|no>          Toggle the creation of a doinst.sh script<br />
&#8211;strip=<yes|no>               Strip any ELF binaries found inside the package<br />
&#8211;stripso=<yes|no>             Strip any ELF binary libraries (.so files)<br />
&#8211;addso=<yes|no>               Search for any shared libs and add<br />
                               them to /etc/ld.so.conf<br />
&#8211;reset-uids=<yes|no>          Reset perms for all files/dirs to 755 and<br />
                               the owner/group for all dirs to root.root<br />
&#8211;gzman=<yes|no>               Compress any man pages found inside the package<br />
&#8211;docdir=
<path>                Where to put documentation files<br />
&#8211;umask=<mask>                 Set the umask value<br />
&#8211;exclude=<file|dir[,...]>     Exclude these files/directories from the package<br />
&#8211;include=
<listfile>           Force the inclusion in the package of the<br />
                               files/dirs listed in &#8220;listfile&#8221;<br />
&#8211;inspect                      Inspect the package&#8217;s file list<br />
&#8211;review-spec                  Review the spec file before creating a .rpm<br />
&#8211;review-control               Review the control file before creating a .deb<br />
&#8211;newslack                     Use the new (8.1+) Slackware description format<br />
                               (&#8220;&#8211;newslack&#8221; implies &#8220;-S&#8221;)<br />
&#8211;with-tar=/path/to/tar        Manually set the path to the tar binary<br />
                               in this system</p>
<p>*Cleanup options*</p>
<p>&#8211;deldoc=<yes|no>              Delete doc-pak upon termination<br />
&#8211;deldesc=<yes|no>             Delete description-pak upon termination<br />
&#8211;delspec=<yes|no>             Delete spec file upon termination<br />
&#8211;bk                           Backup any overwritten files<br />
&#8211;backup=<yes|no>              Toggle backup</p>
<p>*About CheckInstall*</p>
<p>&#8211;help, -h                     Show this message<br />
&#8211;copyright                    Show Copyright information<br />
&#8211;version                      Show version information
</p></div>
<p>RPMは-Rか。</p>
<p>何かのソースからパッケージを作ってみたい。<br />
今回試すのはsquidにしてみる。</p>
<div class="console">
wget http://www.squid-cache.org/Versions/v3/3.0/squid-3.0.STABLE13.tar.gz<br />
tar zxfv squid-3.0.STABLE13.tar.gz<br />
cd squid-3.0.STABLE13<br />
./configure<br />
make<br />
make install<br />
/usr/local/sbin/checkinstall -R
</div>
<p>途中の入力は全部パスして進めると、最後にこう表示される。ＯＫか？</p>
<div class="console">
**********************************************************************</p>
<p> Done. The new package has been saved to</p>
<p> /usr/src/redhat/RPMS/i386/squid-3.0.STABLE13-1.i386.rpm<br />
 You can install it in your system anytime using:</p>
<p>      rpm -i squid-3.0.STABLE13-1.i386.rpm</p>
<p>**********************************************************************
</p></div>
<p>とりあえず/usr/src/redhat/RPMS/i386/にrpmができているのは確認した。<br />
しかし、このパッケージからインストールしようとするとgrepの競合というエラーが出る。<br />
ソースからすでにインストールしたからかな？</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mktime.com/archive/69.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>postfix：インストールとmtaの切り替え</title>
		<link>http://blog.mktime.com/archive/11.html</link>
		<comments>http://blog.mktime.com/archive/11.html#comments</comments>
		<pubDate>Wed, 09 Jul 2008 12:39:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[postfix]]></category>
		<category><![CDATA[mta]]></category>
		<category><![CDATA[sendmail]]></category>

		<guid isPermaLink="false">http://blog.mktime.com/?p=9</guid>
		<description><![CDATA[sendmailが入っているサーバにpostfixを入れるメモ。 まず、postfixのインストール # yum install postfix 次に設定。/etc/postfix/main.cfに記述する。 # cp /etc/postfix/main.cf /etc/postfix/main.cf.org # vi /etc/postfix/main.cf /etc/postfix/main.cf myhostname = 自ホスト名 mydomain = $mydomain myorigin = $mydomain #inet_interfaces = all inet_interfaces = localhost mynetworks_style = host mynetworks = xxx.xxx.xxx.xxx smtpd_banner = $myhostname ESMTP home_mailbox = Maildir/ main.cfのパラメタ抜粋 パラメータ名 説明 myhostname 自ホスト名DNSで引けるドメイン名であること。 mydomain 自ドメイン名postfixの名前解決に使用する。ホスト名を省略したとき、このlocalhost.$mydomainに送信される。 mynetworks_style 信頼できるSMTPクライアントアドレスhost,subnet,classが指定できる。 mynetworks 信頼できるSMTPクライアントアドレスmynetworks_styleよりも詳細に設定するときに使う。,（カンマ）またはスペースで区切ってsabunetをいくつも設定できる。ここを設定するとmynetworks_styleは無視される。 home_mailbox [...]]]></description>
			<content:encoded><![CDATA[<p>sendmailが入っているサーバにpostfixを入れるメモ。</p>
<p>まず、postfixのインストール</p>
<pre class="console">
# yum install postfix
</pre>
<p>次に設定。/etc/postfix/main.cfに記述する。</p>
<pre class="console">
# cp /etc/postfix/main.cf /etc/postfix/main.cf.org
# vi /etc/postfix/main.cf
</pre>
<div class="caption">/etc/postfix/main.cf</div>
<pre class="file">
myhostname = 自ホスト名
mydomain = $mydomain
myorigin = $mydomain
#inet_interfaces = all
inet_interfaces = localhost
mynetworks_style = host
mynetworks = xxx.xxx.xxx.xxx
smtpd_banner = $myhostname ESMTP
home_mailbox = Maildir/
</pre>
<table class="t-left">
<caption>main.cfのパラメタ抜粋</caption>
<tr>
<th>パラメータ名</th>
<th>説明</th>
</tr>
<tr>
<td>myhostname</td>
<td>自ホスト名<br />DNSで引けるドメイン名であること。</td>
</tr>
<tr>
<td>mydomain</td>
<td>自ドメイン名<br />postfixの名前解決に使用する。ホスト名を省略したとき、このlocalhost.$mydomainに送信される。</td>
</tr>
<tr>
<td>mynetworks_style</td>
<td>信頼できるSMTPクライアントアドレス<br />host,subnet,classが指定できる。</td>
</tr>
<tr>
<td>mynetworks</td>
<td>信頼できるSMTPクライアントアドレス<br />mynetworks_styleよりも詳細に設定するときに使う。,（カンマ）またはスペースで区切ってsabunetをいくつも設定できる。ここを設定するとmynetworks_styleは無視される。</td>
</tr>
<tr>
<td>home_mailbox</td>
<td>mailboxの形式</td>
</tr>
</table>
<p>mtaの切り替え。</p>
<pre class="console">
# /usr/sbin/alternatives --config mta

There are 2 programs which provide 'mta'.

  Selection    Command
-----------------------------------------------
*+ 1           /usr/sbin/sendmail.sendmail
   2           /usr/sbin/sendmail.postfix

Enter to keep the current selection[+], or type selection number:
</pre>
<p>ここでpostfix・・・2を選ぶ。</p>
<p>設定したらpostfixを起動＆initスクリプトの登録。</p>
<pre class="console">
# /etc/init.d/postfix start
# /sbin/chkconfig postfix on
</pre>
<p>sendmailは止める。</p>
<pre class="console">
# /etc/init.d/sendmail stop
# /sbin/chkconfig sendmail off
</pre>
<p>必ず不正中継のテストをすること。　<a href="http://www.abuse.net/relay.html">Mail relay testing</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mktime.com/archive/11.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>postfix:メールの保存形式と設定方法</title>
		<link>http://blog.mktime.com/archive/296.html</link>
		<comments>http://blog.mktime.com/archive/296.html#comments</comments>
		<pubDate>Mon, 07 Jul 2008 13:12:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[postfix]]></category>

		<guid isPermaLink="false">http://blog.mktime.com/?p=3</guid>
		<description><![CDATA[postfixはメールをmbox、MailDir形式、cyrus形式で保存できる。デフォルトの設定ではmbox形式。 mbox、MailDirの違いはざっと↓。 mbox 全てのメールを1ファイルで保存する。 ファイルサイズは非常に大きくなる。サイズの大きくなったmboxにアクセスするとサーバ負荷は高くなる。 全てのメールが1ファイルで保存されているのでファイルが壊れたときの影響が大きい。また排他処理も同様の理由で不利である。 MailDir ユーザディレクトリのMailDirフォルダ以下に1メールを1ファイルで保存する。 mbox形式の弱点が解消されるほか、MailDirフォルダに容量制限をかけることが出来る。 欠点はファイル増加によるパフォーマンス低下。 cyrus（よく解りません・・・） ユーザディレクトリ以外の場所に1メールを1ファイルで保存する。 連携できるアプリが多いのが長所みたい。 設定方法 1.main.cfを編集してメールの保存方法を設定します。 /etc/postfix/main.cf #home_mailbox = Mailbox #home_mailbox = Maildir/ mbox形式ならMailbox、MailDir、cyrus形式ならMaildir/をコメントアウトする ※Maildir/は&#8221;/まで&#8221;必要！ 2.postfixを再起動する /etc/init.d/postfix restart 参考サイト：　posyfixのぺーじ]]></description>
			<content:encoded><![CDATA[<p>postfixはメールをmbox、MailDir形式、cyrus形式で保存できる。デフォルトの設定ではmbox形式。</p>
<p>mbox、MailDirの違いはざっと↓。</p>
<p><strong>mbox</strong><br />
全てのメールを1ファイルで保存する。<br />
ファイルサイズは非常に大きくなる。サイズの大きくなったmboxにアクセスするとサーバ負荷は高くなる。<br />
全てのメールが1ファイルで保存されているのでファイルが壊れたときの影響が大きい。また排他処理も同様の理由で不利である。</p>
<p><strong>MailDir</strong><br />
ユーザディレクトリのMailDirフォルダ以下に1メールを1ファイルで保存する。<br />
mbox形式の弱点が解消されるほか、MailDirフォルダに容量制限をかけることが出来る。<br />
欠点はファイル増加によるパフォーマンス低下。</p>
<p><strong>cyrus</strong>（よく解りません・・・）<br />
ユーザディレクトリ以外の場所に1メールを1ファイルで保存する。<br />
連携できるアプリが多いのが長所みたい。</p>
<p><strong>設定方法</strong><br />
1.main.cfを編集してメールの保存方法を設定します。</p>
<p>/etc/postfix/main.cf<br />
#home_mailbox = Mailbox<br />
#home_mailbox = Maildir/<br />
mbox形式ならMailbox、MailDir、cyrus形式ならMaildir/をコメントアウトする<br />
※Maildir/は&#8221;/まで&#8221;必要！</p>
<p>2.postfixを再起動する<br />
/etc/init.d/postfix restart</p>
<p>参考サイト：　<a title="postfixのページ" href="http://www.postfix-jp.info/">posyfixのぺーじ</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mktime.com/archive/296.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

