<?xml version="1.0" encoding="utf-8"?>
<!-- generator="FeedCreator 1.7.2-ppt DokuWiki" -->
<?xml-stylesheet href="https://tm.root-n.com/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel>
        <title>Tipsというかメモ server:postfix</title>
        <description></description>
        <link>https://tm.root-n.com/</link>
        <lastBuildDate>Wed, 19 Nov 2025 01:33:18 +0900</lastBuildDate>
        <generator>FeedCreator 1.7.2-ppt DokuWiki</generator>
        <image>
            <url>https://tm.root-n.com/lib/images/favicon.ico</url>
            <title>Tipsというかメモ</title>
            <link>https://tm.root-n.com/</link>
        </image>
        <item>
            <title>postfix :: aliases (エイリアス) の設定</title>
            <link>https://tm.root-n.com/server:postfix:aliases</link>
            <description>エイリアスとは「別名」という意味です。

ローカルパート(@の左側)に送信されたメールを転送したり、受信をトリガーとしてプログラムを起動したりする場合に設定を行います。

/etc/postfix/main.cf

/etc/postfix/aliases を設定ファイルとして有効にするには /etc/postfix/main.cf に以下の設定を書きます。</description>
        <category>server:postfix</category>
            <pubDate>Sun, 16 Mar 2008 22:48:27 +0900</pubDate>
        </item>
        <item>
            <title>postfix :: 取得できる環境変数</title>
            <link>https://tm.root-n.com/server:postfix:environment_variables</link>
            <description>「 jojo@example.com 」から「 hoge-fuga@example.com 」に送信した場合


array (
  'MAIL_CONFIG' =&gt; '/etc/postfix',
  'SENDER' =&gt; 'jojo@example.com',
  'RECIPIENT' =&gt; 'hoge@fuga.example.com',
  'CLIENT_PROTOCOL' =&gt; 'ESMTP',
  'USER' =&gt; 'hoge',
  'LOCAL' =&gt; 'hoge',
  'PATH' =&gt; '/usr/bin:/bin',
  'PWD' =&gt; '/var/spool/postfix',
  'DOMAIN' =&gt; 'fuga.example.com',
  'LANG' =&gt; 'C',
  'SHLVL' =&gt; '1',
  'CLIENT_HELO' =&gt; 'example.com',
  'CLIENT_ADDRESS' =&gt; '192.168.0.10',
  'CLIENT_HOSTNAME' =&gt; 'example.com',
  'LOGNAME…</description>
        <category>server:postfix</category>
            <pubDate>Sun, 16 Mar 2008 22:48:27 +0900</pubDate>
        </item>
        <item>
            <title>postfix :: メール受信をトリガーとしてプログラムを起動させる設定</title>
            <link>https://tm.root-n.com/server:postfix:execute_setting</link>
            <description>hoge@example.com 宛てのメールを php で処理する設定

	*  /etc/aliases の末行に以下のように書く


% sudo vi /etc/aliases



hoge: | &quot;/usr/bin/php /path/to/script.php &gt;&gt; /path/to/log.`date +\%Y-\%m`&quot;



ここではアペンドモードのリダイレクト「＞＞」でログを吐かせることを想定しています。

ログが必要ない、またはスクリプトがログを吐かない仕様であれば「＞＞」を含めた右側は必要ありません。</description>
        <category>server:postfix</category>
            <pubDate>Sun, 12 Oct 2008 16:47:40 +0900</pubDate>
        </item>
        <item>
            <title>postfix :: Mac の Postfix でリレーの設定</title>
            <link>https://tm.root-n.com/server:postfix:mac_relay</link>
            <description>今回、「Outbound Port 25 Blocking」の制約で、ローカルからメール配送できない事態が発生しました。

回避策として、Postfix のリレー設定を行い、gmail 経由でメール配送をした時のメモになります。</description>
        <category>server:postfix</category>
            <pubDate>Sat, 31 Oct 2015 20:28:42 +0900</pubDate>
        </item>
        <item>
            <title>postfix :: version の調べ方</title>
            <link>https://tm.root-n.com/server:postfix:version</link>
            <description>% postconf | grep mail_version
mail_version = 2.4.6</description>
        <category>server:postfix</category>
            <pubDate>Sun, 16 Mar 2008 22:48:27 +0900</pubDate>
        </item>
    </channel>
</rss>
