<?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; sendmail</title>
	<atom:link href="http://blog.mktime.com/archive/tag/sendmail/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>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>
	</channel>
</rss>

