Postfix 3.2.0

Contents

Postfixについて


公式ページ:http://www.postfix.org/

用語



スプール


受信したメールを保存する場所のこと

バウンスメール


送信したメールが何らかの理由で送信先に正常に配信されなかった場合に、送信先メールサーバからその旨を送信元サーバに通知するメールのこと。

レシピエント(recipient)


メール受信者

ルーティング(配送)


メールサーバが発信要求がなされたメールを宛先に送ること。
自サーバ内のメールアドレスへの発信であれば、その宛先ユーザのメール保存場所へメールを格納し、そうでなければ、ふさわしいメールサーバへルーティングを依頼する。
すなわち、通常は宛先へのメール送達完了までに複数のメールサーバがそれぞれルーティングを行う。
ローカルユーザ宛のメールアドレスにルーティングすることを特に「配信」や「ローカル配送」と呼び、それ以外のメールアドレスにルーティングする為に他のメールサーバにメールを送ることを特に「転送」、「リモート配送」と呼び分けることがある。

オープンリレー


メールの発信要求を誰からでも受け付けるメールサーバ。
インターネットで公開すると不正なメール送信に利用されかねない。

ローカルパート


メールアドレスの@より前の部分のこと

ドメインパート


メールアドレスの@より後の部分のこと

パーセントハック(sender-specified routing)


メールを送信する際、宛先メールサーバへ最短でルーティングせずに、指定したメールサーバを中継してからメールを送るように指示する方法。
ローカルパートの後に%ホスト名を書くとそのホストが最終宛先となり、ドメインパートのホストが中継ホストとみなされる。
例えば、

user%hostA@hostB

と指定した場合、一旦hostBに転送され、改めて

user@hostA

のメールアドレスを宛先としたルーティングが行われる。
送信メールサーバがブラックリストに載っており、メールの転送を拒否されている際にそれを回避するために利用されることが多い。
その為、パーセントハックは利用できないように設定しておいたほうが良い。
主にこの方法には%が用いられるが、”@”や”!”が使用されることもある。
それら全てを含めて”sender-specified routing”と呼ぶ。
Postfixではデフォルトでパーセントハックは禁止となっている。

VERP(Variable envelope return path)


VERPとは送信時に宛先メールアドレスを改変して、バウンスメールが返ってきた際にどのメールアドレス宛てのメールが不達となったかメールヘッダから判別できるようにする方法。
主にメーリングリスト等で存在しない宛先メールアドレスを自動で検出、削除するために使用される。

例えば、mailinglist@my.example.comからsomeone@you.example.net宛にメールを送るとする。
その際、VERPを使用しない場合は、送信時は通常通り以下のようなヘッダとなる。

envelope sender: mailinglist@my.example.com
recipient: someone@you.example.net

someone@you.example.netのメールアドレスへメールが届かずにバウンスメールが返ってきたら、バウンスメールのヘッダは次のようになる。

envelope sender: 
recipient: mailinglist@my.example.com

そして本文にsomeone@you.example.net宛のメールアドレスが不達であった旨記載される。ただし、書式は必ずしも一定ではなく、自動で宛先メールアドレスを識別できない。
ここで、VERPを使用した場合は、送信時は以下のようなヘッダとなる。

envelope sender: mailinglist+someone=you.example.net@my.example.com
recipient: someone@you.example.net

someone@you.example.netのメールアドレスへメールが届かずにバウンスメールが返ってきたら、バウンスメールのヘッダは次のようになる。

envelope sender: 
recipient: mailinglist+someone=you.example.net@my.example.com

本文には同様の不達の内容が記載されるが、ヘッダからどのメールアドレス宛が不達であったかが容易に解析できるため、本文を確認する必要はない。

PostfixにVERP形式のメールアドレスへ送信時に変換させることが可能。

MIME (マイム : Multipurpose Internet Mail Extensions (多目的インターネットメール拡張))


文字コードがASCIIしか扱えないメールを拡張して、他の文字コードや添付ファイルによるバイナリデータを扱えるようにするためのヘッダ。
MIME-Version、Content-Type、Content-Transfer-Encodingの3種類のヘッダが存在する。

エンベロープアドレス


メールの送受信の際に利用するメールアドレスにはヘッダアドレスと(メッセージ)エンベロープアドレスが存在する。
ヘッダアドレスはメールそのものに記載されたメールアドレスで、メールクライアント(MUA)にて送受信者アドレスとして表示される。
しかし、実際のSMTPによるメール転送に使用されるのは別にあり、これをエンベロープアドレスという。
エンベロープアドレスの内、受信者アドレスを特にエンベロープ受信者アドレスと呼び、
送信者アドレスを特にエンベロープ送信者アドレスと呼ぶ。

拡張メールアドレス


通常のメールアドレスに任意の文字列を付加して作成した、配送先は同じだがローカルパートの異なるメールアドレスのこと。
拡張メールアドレスはローカルパートの最後に”+”をつけ、更に(メールアドレスで使用可能な文字で構成された)任意の文字列を加えることでできる。
例えば、以下のようなメールアドレスがあったとする。

abcde@example.com

拡張メールアドレスの一例として以下のようなものがある。

abcde+fghij@example.com
abcde+123@example.com

いずれもabcde@example.comと同じユーザへローカル配送される。

pseudo-cohort


1つの転送先サーバに同時に要求できるリクエスト数のこと。

トランスポート


Postfixはメールの転送方法によってそれぞれ独立したプログラム(配送エージェント)が用意されており、それらをトランスポートと呼ぶ。
他のSMTPサーバへのトランスポート、ローカル配送のトランスポートの他、バーチャルアドレス宛てのトランスポートなど、様々なトランスポートが存在する。

RBL(Real-time Blackhole List)


不正なメールの中継・発信元のIPアドレスをまとめたリスト。

owner alias (オーナーエイリアス)


特定のメールエイリアスの管理者アドレスのこと。
メールエイリアスで複数宛先アドレス設定することで、メーリングリストのように使用する際に使用される。

Delivered-Toヘッダ


メールの届け先を示す。メールを受信した際に受信したメールサーバが付加する。
ToやCCに記載のアドレスに必ずしもなるわけではなく、実際に受信したメールアドレスになる。

SMTPS / SMTP STARTTLS


SMTPSはSSLを使用したSMTPのこと。
TCP/465番ポートを使用する。

SMTP STARTTLSはSMTPで通信を開始するが、直後にTLSネゴシエーションを行い、以降はTLSを使用してSMTP通信を行う。
TCP/587番ポートを使用する。

また、TCP/587番ポートはサブミッションポートとしても使用されるため、TLSを使用せずに通信することも可能。

サブミッションポート


SMTPの通常のポート番号である、TCP/25番を使用せずに代わりに使用できるポートのこと。
TCP/587番ポートが通常使用される。
サブミッションポートによって、TCP/25番がブロックされている環境でもSMTPを使用できる。

機能

 

サービス


Postfixのメインプロセスであるmasterと多種類の子プロセスによって動作する。
この子プロセスのことをサービスと呼ぶ。
各サービスはmaster.cfという設定ファイルにより動作方法を設定できる。

データベース


Postfixはアクセス制御やアドレス書き換え、コンテンツフィルタリングのための情報の管理にデータベースを利用する。
デフォルトではローカルにファイルとして保存するが、外部のRDBMSやLDAPサーバを利用することも可能である。
データベースの作成・更新等を行うサブプログラムは、postmapコマンドpostaliasコマンドである。
基本的にpostmapコマンドを使用し、postaliasコマンドはバーチャルエイリアスを除くエイリアス用のテーブルを管理する場合にのみ使用する。
これは、postaliasコマンドはsendmail互換のエイリアスデータベース(エイリアステーブル)を出力できるためである。


エイリアステーブル


受信したメールをローカル配送する際に利用するユーザ名の別名データベース。
自ドメイン向けの、指定した名前のユーザ宛のメールを受信すると設定したユーザのメールとして保存する。

バーチャルメール


バーチャルメールとは実際のPostfixサーバのドメイン、実在するユーザを使用しなくとも受信したメールを正常に処理するための仕組みである。
この時の処理方法として3種類のローカル配送方式が選択できる。

共有ドメイン(バーチャルドメイン)


Postfixには自身のドメインとして設定した(正規ドメイン)以外のドメイン(バーチャルドメイン)についても、自身が最終宛先としてメールを処理することができる。
これによって、本来そのホストが設定されているドメインと異なるドメイン宛のメールを受信した場合でも、宛先ユーザを正規ドメイン宛のものと同様に、ローカルの実際のユーザのメールスプールに保存するローカル配送方式。
なお、バーチャルドメイン宛のメールが自身へ転送されてくるような仕組みが別途必要である。

バーチャルエイリアス


宛先ユーザを正規ドメイン宛のものと同様に、ローカルの実際のユーザのメールスプールに保存するが、その際ユーザ名の変換を行うローカル配送方式。
従って、バーチャルドメインのメールアドレスのユーザはLinuxのユーザとして存在している必要がある。

バーチャルメールボックス


バーチャルドメイン専用のユーザを作成し、そのユーザのメールスプールにメールを保存するローカル配送方式。
バーチャルメールボックスの所有者となるユーザはLinuxのユーザとして存在していなくてもよい。

.forwardファイル


Linuxのユーザのホームディレクトリ直下に”.forward”ファイルを設置することで、そのユーザが受信したメールを転送することができる。
.forwardファイルはPostfixのみならず、Sendmail等の他のSMTPソフト共通で使用されている。
パーミッションは”400″に設定しておく。度々編集をするなら”600″でも良い。
.forwardファイルの記法は以下のとおりである。

 

メールの保存形式

 

Mailbox(メールボックス)


ユーザ毎に1つのメール保存用ファイルを作成し、そこに全てのメールを連結して保存する方法。
保存したメールが溜まるにつれてファイルが巨大になり、排他制御に時間がかかったり、ファイルが破壊されれば多くのメールに影響が及ぶ。
Mailbox形式の場合も、受信したメールは一時スプールに保管され、その後に各ユーザのホームディレクトリ、もしくはその配下のパスにあるMailboxファイルに保存されることになる。

Maildir(メールディレクトリ)


ユーザ毎に1つのメール保存用ディレクトリを作成し、その内部で1メール1ファイルとして保存する方法。
メール保存用ディレクトリには更に”tmp”、”new”、”cur”の3つのディレクトリが作成され、受信したメールは一時”tmp”に保存され、後に”new”に移される。
ユーザがメールをメールソフト(MUA)でダウンロードして読むと”cur”に移される。

LMTP(Local Mail Transfer Protocol)


Postfixはメールの転送を「受信」→「解析/配送方法の決定」→「キューに一時格納/取り出し」→「配送」という流れで行う。
しかし、本来は「配送」までをつかさどるのがMTA(Mail Transfer Agent)であり、「配送」を司るのはMDA(Mail Delivery Agent)である。
PostfixはMTA、MDAの両方の機能を備えているのである。
LMTPはMDAとしての機能しか備えていないメールサーバへメールを転送するための、SMTPを拡張したプロトコルである。
LMTPにより、宛先メールサーバのキューを経由せずに直接配送のステップまでメールを渡すことができる。
加えて、転送先サーバでMTAとしての処理が不要となるため、高速にメールの転送を行える。
現在は主に、以下の目的で使用される。


参考:https://tools.ietf.org/html/rfc2033

スパムメールフィルタ


Postfixは標準でスパムメールフィルタ機能を提供している。
これをPostscreenと言う。
PostscreenはSMTPでPostfixに接続された場合に機能するが、信頼できる自ユーザからのメールは基本的にフィルタリングしないように設定したほうが良い。
Postscreenは初接続してきたSMTPクライアントからのメールを検査し、合格すれば一定の間はそのクライアントからのSMTP接続によるメール転送は検査を行わない。これによって検査による負荷を減少させている。

参考:http://www.postfix.org/POSTSCREEN_README.html


アドレスマスカレード


メールを送信する際、転送するメールアドレスのドメイン部を別のものに変換する機能。
これによってLAN内でのみ使用しているメールアドレスを、インターネット向けドメインに変換することができる。また、メール受信者は当該メールをPostfixから来たものと識別することができる。

SASL認証


SASL(Simple Authentication and Security Layer)認証とは、通信プロトコルに組み込んで使用することのできる認証用のフレームワークである。
SMTPにも対応しており、PostfixでもSASL対応が実装されている。
ただし、Postfix自体はSASLの機能は実装されておらず、別のSASLライブラリを使用することになる。
Cyrus SASLとDovecotに対応している。
Cyrus SASLはPostfixがサーバの時と、他のサーバに転送する際にクライアントとなる場合にも対応しているが、Dovecotはサーバとしてしか使用できない。
DovecotはIMAP4/POP3サーバが本来の製品であるので、ユーザ用の送信・受信メールサーバとして利用する際はDovecotを使用すれば構成が簡単で良い。

 

ユーザー追加


SASLを使用する場合、送信専用でも認証が必要になるので、ユーザー設定が必要である。


データベースにユーザーを追加する。追記するだけで反映される。

vi $DOVECOT_HOME/conf/dovecot/userdb

 

サーバー構築

 

構築環境

 

 

 

OS設定

 

ネットワーク

 

固定IPアドレス割り当て


次のファイルを編集する

# ifcfg-loはループバックインタフェースであるため、触らない
vi /etc/sysconfig/network-scripts/ifcfg-<インタフェース名>


以下では例として192.168.0.51/24を割り当てた

BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.0.51
NETMASK=255.255.255.0
NETWORK=192.168.0.0
GATEWAY=192.168.0.1


ネットワークを再起動する

systemctl restart network


ip addressコマンドにより、インタフェースが有効になっていることを確認する
これによりホストマシンなどからSSHでログイン可能となる


firewalld

 

SMTP


SMTP(TCP/25)を開ける場合、下記を行う。
※CentOS7.2以前のCentOS7場合はfirewalldのバージョン場古く、下記を実行できない。アップデートすること。

yum update firewalld -y

 

  1. ルールが定義されていることを確認
    firewall-cmd --permanent --info-service=smtp
  2. 現在ルールが適用されていないことを確認する
    firewall-cmd --list-services --zone=public --permanent | sed -e "s/ /\n/g" | grep smtp
  3. ルールを適用する
    firewall-cmd --add-service=smtp --zone=public --permanent
  4. ルールが適用されていることを確認する
    firewall-cmd --list-services --zone=public --permanent | sed -e "s/ /\n/g" | grep smtp
  5. 設定を再読み込みして反映させる
    firewall-cmd --reload

 

SMTP STARTTLS


SMTP STARTTLS(TCP/587)を開ける場合、下記を行う。
※CentOS7.2以前のCentOS7場合はfirewalldのバージョン場古く、下記を実行できない。アップデートすること。

yum update firewalld -y

 

  1. ルールが定義されていることを確認
    firewall-cmd --permanent --info-service=smtp-submission
  2. 現在ルールが適用されていないことを確認する
    firewall-cmd --list-services --zone=public --permanent | sed -e "s/ /\n/g" | grep smtp-submission
  3. ルールを適用する
    firewall-cmd --add-service=smtp-submission --zone=public --permanent
  4. ルールが適用されていることを確認する
    firewall-cmd --list-services --zone=public --permanent | sed -e "s/ /\n/g" | grep smtp-submission
  5. 設定を再読み込みして反映させる
    firewall-cmd --reload

 

SMTPS


SMTPS(TCP/465)を開ける場合、下記を行う。
※CentOS7.2以前のCentOS7場合はfirewalldのバージョン場古く、下記を実行できない。アップデートすること。

yum update firewalld -y

 

  1. ルールが定義されていることを確認
    firewall-cmd --permanent --info-service=smtps
  2. 現在ルールが適用されていないことを確認する
    firewall-cmd --list-services --zone=public --permanent | sed -e "s/ /\n/g" | grep smtps
  3. ルールを適用する
    firewall-cmd --add-service=smtps --zone=public --permanent
  4. ルールが適用されていることを確認する
    firewall-cmd --list-services --zone=public --permanent | sed -e "s/ /\n/g" | grep smtps
  5. 設定を再読み込みして反映させる
    firewall-cmd --reload

 

ホスト名


ホスト名としてmailを設定する

hostname mail.corp
# 再起動しても有効にする
echo mail.corp > /etc/hostname

再ログインすることで有効になる。

ユーザ作成


dovecot用のユーザを作成する

デーモン用ユーザ

 

useradd --user-group --no-create-home --shell /sbin/nologin postfix

 

ローカル配送用グループ


ユーザは属さない

groupadd postdrop

 

Postfixの構築


インストールに関するドキュメント:http://www.postfix.org/INSTALL.html

ソースインストール時のオプション

 

Makefile生成オプション



各種パス


インストール場所の指定のほか、各実行ファイルが関連ファイルを入出力する際のデフォルトパスとしても利用される。
このパスは実行時に明示的に指定することで変更可能である。
ただし、手間であるのでここで指定したほうが良い。
各パスは相対パスであり、インストール時に指定するPostfixのインストールパスからの相対パスとなる。
しかし、Makefile生成時以降で指定したパスは各実行ファイル中に書き込まれるデフォルト値には反映されないので、
ルート( / )からの相対パス、即ち、絶対パスとして指定しておき、インストール時に指定するインストールパスをデフォルトのルートのままとするのが良い。

command_directory


各種実行ファイルの保存場所

 

config_directory


設定ファイルの保存場所

 

daemon_directory


Postfixが専ら内部で使用する各プログラムの保存場所。
ここに配置される各プログラムはコンソールからは呼び出せないのでcommand_directoryと同じパスに置かない方が良い。

 

data_directory

 

 

html_directory


説明書きのHTMLファイル各種の配置場所

 

 

mail_spool_directory


全ユーザ共通の受信メールの保存パス(スプール)を指定する。
設定値の最後が”/”で終わるとMaildir形式となり、
そうでない場合はMailbox形式でメールが保存される。

 

mailq_path


mailqコマンドの配置場所

 

manpage_directory

 

 

meta_directory


Postfixのインスタンスを多重起動させる際に使用する設定ファイルの配置場所

 

 

newaliases_path


newaliasesコマンドの配置場所

 

queue_directory


メールを送る際に使用するキューの場所

 

readme_directory


readmeファイル各種の配置場所


noの場合はインストールされない

 

sendmail_path


sendmailコマンドの配置場所

 

shlib_directory

 

 

openssl_path


postfix-tlsコマンドで使用するopensslコマンドのパスのデフォルト値。
設定ファイルで明示的に指定しなかった場合にここで指定したものが有効となる。



その他

 

pie


位置独立実行形式(Postfix position-independent executables)として実行ファイルをコンパイルするかどうか。
これによって実行時にメモリ空間のどこに配置されても正しく動作するようになる。
他のプログラムとメモリ空間を共有することができるようになるので、共有ライブラリとして利用可能となったり、他の悪意のあるプログラムから侵害されないようにプログラムをランダムなアドレスに配置して実行するセキュアOSにおいて利用可能となる。
バージョン3より追加された機能である。

 

shared


他のプログラムから利用可能な共有ライブラリ(.soファイル)を生成するかどうか。
別途shlib_directoryオプションで出力パスを指定する必要がある。
指定しない場合、共有ライブラリは生成されない。
バージョン3より追加された機能である。

 

dynamicmaps


MySQL等のRDBMSに一部の設定を保存して、実行時に同的に変更できるようにするかどうか。
virtual tableaccess tablealiasesで利用可能である。
dynamicmapsオプションを有効にする場合、sharedオプションを有効にしなければならない。
バージョン3より追加された機能である。

 

default_database_type


newaliases、postalias、postmapコマンドで使用するデータベースの形式のデフォルト値。
設定ファイルで明示的に指定しなかった場合にここで指定したものが有効となる。

 

インストールオプション

 

各種パス


Makefile生成オプションに同名のオプションが存在する場合はそこで指定した値がデフォルト値となる。
それらは改めてこのタイミングで指定することも可能であるが、各実行ファイル中に書き込まれるデフォルト値は変更されないので、Makefile生成時に指定するべきである。

install_root


Postfixをインストールするパス。
他に実行ファイルや設定ファイルのパスを指定できるが、それらはここで指定したパスからの相対パスとなる。

 

tempdir


インストールの際に使用される一時ファイルの格納場所。



sample_directory


設定ファイルのサンプルのインストールパスであった。
現バージョンでは既に廃止されており、指定はできるが、サンプルはインストールされない。


その他



setgid_group


The group for mail submission and for queue management commands.
Its numerical group ID must not be used by any other accounts on the
system, not even by the mail_owner account.
The built-in default group name is postdrop.
This parameter setting is recorded in the installed main.cf file.

mail_owner


Postfixの各子プロセス、ファイル群の所有者のユーザ名。
ここで指定したユーザを別途作成しておく必要がある。
デフォルトの場合、「postfix」ユーザが使用されるが、ソースインストールの場合は自分で作成しておく。
なお、Postfixの各子プロセスはmasterプロセスから生成されるが、masterプロセス自身はrootユーザで動作する。
また、rootユーザ以外ではPostfixは起動させられない。


Postfixのインストール

 

パッケージからインストール

 

yum install postfix -y

ソースコードからインストール

 

  1. rootになる
    su -
  2. デフォルトのpostfixはアンインストールする
    yum remove postfix -y
  3. 関連パッケージをインストールする
    まとめてインストールする場合
    yum install epel-release
    yum install gcc make db4-devel -y
    1. db4-develをインストールする
      yum install epel-release
      yum install db4-devel
    2. コンパイラをインストールする
      yum install gcc
    3. makeをインストールする
      yum install make
  4. ダウンロードサイト:http://mirror.postfix.jp/postfix-release/index.htmlからアーカイブのURLを取得する
  5. ダウンロードする
    curl -O -s http://mirror.postfix.jp/postfix-release/official/postfix-3.2.0.tar.gz
  6. アーカイブファイルを展開する
    tar xzfv postfix-*.tar.gz
  7. ソースコードディレクトリへ移動する
    cd postfix-*
  8. Makefileを生成する
    ※標準のMakefileは既に存在するのでオプションを指定する場合のみ行う
    ※ここでインストールパスを指定するが、インストール時にも再度指定できる。
    ただし、ここで指定しない場合、インストールされる場所は変更できるが、
    実行ファイル中に書き込まれた標準パスまでは変更されないので、ここでインストールパスを指定するのが良い。
    1. インストールパスを環境変数に入れておく
      PF_PATH=/usr/local/`pwd | sed "s/.*\///"`
      • 確認
        echo $PF_PATH
    2. コンパイル最適化設定を行う
      export CFLAGS="-O3 -m64"
    3. オプションを指定してMakefileを生成する
      オプション”mail_spool_directory”の末尾に”/”を付けないとMailDir形式にならないので注意。
      • オプション
        次のオプションを加える場合はmake makefilesの前に付けて一緒に実行する
        • Dovecotで送信者認証を行う
          CCARGS='-DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\"' \
        • TLSを使用する
          CCARGS="-DUSE_TLS" AUXLIBS="-lssl -lcrypto" \
        • 上記全て使用する
          CCARGS='-DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\" -DUSE_TLS'  AUXLIBS="-lssl -lcrypto" \
      • 実行する
        make makefiles \
         command_directory=$PF_PATH/bin \
         config_directory=$PF_PATH/conf \
         daemon_directory=$PF_PATH/lib \
         data_directory=$PF_PATH/data \
         html_directory=$PF_PATH/html \
         mail_spool_directory=/usr/local/data/mail/ \
         mailq_path=$PF_PATH/bin/mailq \
         manpage_directory=$PF_PATH/man \
         meta_directory=$PF_PATH/conf \
         newaliases_path=$PF_PATH/bin/newaliases \
         queue_directory=$PF_PATH/queue \
         readme_directory=$PF_PATH/readme \
         sendmail_path=$PF_PATH/bin/sendmail \
         shlib_directory=$PF_PATH/lib \
         shared=yes \
         dynamicmaps=yes \
         2>&1 | tee make_makefiles.log.`date +"%Y%m%d"`
        次のようなエラーが表示された場合、インストールしたdb4のヘッダファイルをインクルードパスにコピーする。
        No <db.h> include file found.
        1. パスを検索する
          find / -name db.h
        2. ヘッダファイルのリンクを作成する
          ln -s <パス>/db.h /usr/include/db.h

          ln -s /usr/include/libdb4/db.h /usr/include/db.h
        3. ライブラリもリンクを作成する
          ln -s /usr/lib64/libdb4/libdb.so /usr/lib64/libdb.so
          ldconfig
        4. 再度make makefilesを行う
  9. コンパイルする
    make 2>&1 | tee make.log.`date +"%Y%m%d"`
  10. 既存のコマンドを退避させる
    sendmail、mailq、newaliasesコマンドは既にインストールされているであろうが、同じパスにpostfixのものをインストールすると上書きされてしまう。
    念のためこれらを残しておくので、名前変更して退避しておく。同じパスにインストールしない場合でも名前変更しておく。
    Sendmailを利用する他のプログラムがある可能性があることを考慮してPostfixにはSendmail互換プログラムが含まれている。
    この退避は今回インストールする互換プログラムをSendmailがインストールされていた位置へ配置するためである。
    1. 確認
      TMP_SENDMAIL_DEFAULT_PATH=`which sendmail`
      TMP_MAILQ_DEFAULT_PATH=`which mailq`
      TMP_NEWALIASES_DEFAULT_PATH=`which newaliases`
      echo $TMP_SENDMAIL_DEFAULT_PATH
      echo $TMP_MAILQ_DEFAULT_PATH
      echo $TMP_NEWALIASES_DEFAULT_PATH
    2. 退避
      mv $TMP_SENDMAIL_DEFAULT_PATH   $TMP_SENDMAIL_DEFAULT_PATH.sendmail_original
      mv $TMP_MAILQ_DEFAULT_PATH      $TMP_MAILQ_DEFAULT_PATH.sendmail_original
      mv $TMP_NEWALIASES_DEFAULT_PATH $TMP_NEWALIASES_DEFAULT_PATH.sendmail_original
  11. インストールを行う。
    ※makeのターゲットをupgradeでなくinstallとすることで、対話式にインストールオプションを指定することができる。
    make upgrade \
     mail_owner=postfix \
     setgid_group=postdrop \
     2>&1 | tee make_upgrade.log.`date +"%Y%m%d"`
    • make installの場合
      • 実行コマンド
        # make install \
        # 2>&1 | tee make_install.log.`date +"%Y%m%d"`0
      • 対話式に設定する
        makefile生成時に設定している場合はデフォルト値としてその値が入っているのでそのままエンターを押せばよい
        # install_root: [/]   <-- 変更がなければそのままエンター(以下同じ)
        # tempdir: [/root/postfix-3.2.0]
        # config_directory: [/usr/local/postfix-3.2.0/conf]
        # command_directory: [/usr/local/postfix-3.2.0/bin]
        # daemon_directory: [/usr/local/postfix-3.2.0/lib]
        # data_directory: [/usr/local/postfix-3.2.0/data]
        # html_directory: [/usr/local/postfix-3.2.0/html]
        # mail_owner: [postfix]   <-- 任意の値に設定する(デフォルトでも可)
        # mailq_path: [/usr/local/postfix-3.2.0/bin/mailq]
        # manpage_directory: [/usr/local/postfix-3.2.0/man]
        # newaliases_path: [/usr/local/postfix-3.2.0/bin/newaliases]
        # queue_directory: [/usr/local/postfix-3.2.0/queue]
        # readme_directory: [/usr/local/postfix-3.2.0/readme]
        # sendmail_path: [/usr/local/postfix-3.2.0/bin/sendmail]
        # setgid_group: [postdrop]   <-- 任意の値に設定する(デフォルトでも可)
        # shlib_directory: [/usr/local/postfix-3.2.0/lib]
        # meta_directory: [/usr/local/postfix-3.2.0/conf]
      • ログ
        [root@postfix postfix-3.2.0]# make install
        set -e; for i in src/util src/global src/dns src/tls src/xsasl src/master src/milter src/postfix src/fsstone src/smtpstone src/sendmail src/error src/pickup src/cleanup src/smtpd src/local src/trivial-rewrite src/qmgr src/oqmgr src/smtp src/bounce src/pipe src/showq src/postalias src/postcat src/postconf src/postdrop src/postkick src/postlock src/postlog src/postmap src/postqueue src/postsuper src/qmqpd src/spawn src/flush src/verify src/virtual src/proxymap src/anvil src/scache src/discard src/tlsmgr src/postmulti src/postscreen src/dnsblog src/tlsproxy src/posttls-finger; do \
                 (set -e; echo "[$i]"; cd $i; make 'WARN=-Wmissing-prototypes -Wformat -Wno-comment' update MAKELEVEL=) || exit 1; \
                done
        [src/util]
        for i in postfix-pcre.so; \
                do \
                  for type in dev_urandom; do \
                      case $i in postfix-$type.so) \
                          cmp -s $i ../../lib/$i 2>/dev/null || cp $i ../../lib; \
                          continue 2;; \
                      esac; \
                  done; \
                  rm -f ../../lib/$i; \
                done
        for i in dict_cdb.o dict_lmdb.o dict_sdbm.o slmdb.o; \
                do \
                  cmp -s $i ../../lib/$i 2>/dev/null || cp $i ../../lib; \
                done
        for i in argv.h attr.h attr_clnt.h auto_clnt.h base64_code.h binhash.h chroot_uid.h cidr_match.h clean_env.h connect.h ctable.h dict.h dict_cdb.h dict_cidr.h dict_db.h dict_dbm.h dict_env.h dict_ht.h dict_lmdb.h dict_ni.h dict_nis.h dict_nisplus.h dict_pcre.h dict_regexp.h dict_sdbm.h dict_static.h dict_tcp.h dict_unix.h dir_forest.h events.h exec_command.h find_inet.h fsspace.h fullname.h get_domainname.h get_hostname.h hex_code.h hex_quote.h host_port.h htable.h inet_addr_host.h inet_addr_list.h inet_addr_local.h inet_proto.h iostuff.h line_wrap.h listen.h lstat_as.h mac_expand.h mac_parse.h make_dirs.h mask_addr.h match_list.h msg.h msg_output.h msg_syslog.h msg_vstream.h mvect.h myaddrinfo.h myflock.h mymalloc.h myrand.h name_code.h name_mask.h netstring.h nvtable.h open_as.h open_lock.h percentm.h posix_signals.h readlline.h ring.h safe.h safe_open.h sane_accept.h sane_connect.h sane_fsops.h load_lib.h sane_socketpair.h sane_time.h scan_dir.h set_eugid.h set_ugid.h sigdelay.h sock_addr.h spawn_command.h split_at.h stat_as.h stringops.h sys_defs.h timed_connect.h timed_wait.h trigger.h username.h valid_hostname.h vbuf.h vbuf_print.h vstream.h vstring.h vstring_vstream.h watchdog.h format_tv.h load_file.h killme_after.h edit_file.h dict_cache.h dict_thash.h ip_match.h nbbio.h base32_code.h dict_fail.h warn_stat.h dict_sockmap.h line_number.h timecmp.h slmdb.h compat_va_copy.h dict_pipe.h dict_random.h valid_utf8_hostname.h midna_domain.h dict_union.h dict_inline.h check_arg.h; \
                do \
                  cmp -s $i ../../include/$i 2>/dev/null || cp $i ../../include; \
                done
        cd ../../include; chmod 644 argv.h attr.h attr_clnt.h auto_clnt.h base64_code.h binhash.h chroot_uid.h cidr_match.h clean_env.h connect.h ctable.h dict.h dict_cdb.h dict_cidr.h dict_db.h dict_dbm.h dict_env.h dict_ht.h dict_lmdb.h dict_ni.h dict_nis.h dict_nisplus.h dict_pcre.h dict_regexp.h dict_sdbm.h dict_static.h dict_tcp.h dict_unix.h dir_forest.h events.h exec_command.h find_inet.h fsspace.h fullname.h get_domainname.h get_hostname.h hex_code.h hex_quote.h host_port.h htable.h inet_addr_host.h inet_addr_list.h inet_addr_local.h inet_proto.h iostuff.h line_wrap.h listen.h lstat_as.h mac_expand.h mac_parse.h make_dirs.h mask_addr.h match_list.h msg.h msg_output.h msg_syslog.h msg_vstream.h mvect.h myaddrinfo.h myflock.h mymalloc.h myrand.h name_code.h name_mask.h netstring.h nvtable.h open_as.h open_lock.h percentm.h posix_signals.h readlline.h ring.h safe.h safe_open.h sane_accept.h sane_connect.h sane_fsops.h load_lib.h sane_socketpair.h sane_time.h scan_dir.h set_eugid.h set_ugid.h sigdelay.h sock_addr.h spawn_command.h split_at.h stat_as.h stringops.h sys_defs.h timed_connect.h timed_wait.h trigger.h username.h valid_hostname.h vbuf.h vbuf_print.h vstream.h vstring.h vstring_vstream.h watchdog.h format_tv.h load_file.h killme_after.h edit_file.h dict_cache.h dict_thash.h ip_match.h nbbio.h base32_code.h dict_fail.h warn_stat.h dict_sockmap.h line_number.h timecmp.h slmdb.h compat_va_copy.h dict_pipe.h dict_random.h valid_utf8_hostname.h midna_domain.h dict_union.h dict_inline.h check_arg.h
        [src/global]
        for i in postfix-ldap.so postfix-mysql.so postfix-pgsql.so postfix-sqlite.so postfix-lmdb.so postfix-cdb.so postfix-sdbm.so; \
                do \
                  for type in dev_urandom; do \
                      case $i in postfix-$type.so) \
                          cmp -s $i ../../lib/$i 2>/dev/null || cp $i ../../lib; \
                          continue 2;; \
                      esac; \
                  done; \
                  rm -f ../../lib/$i; \
                done
        for i in abounce.h anvil_clnt.h been_here.h bounce.h bounce_log.h canon_addr.h cfg_parser.h cleanup_user.h clnt_stream.h config.h conv_time.h db_common.h debug_peer.h debug_process.h defer.h deliver_completed.h deliver_flock.h deliver_pass.h deliver_request.h dict_ldap.h dict_mysql.h dict_pgsql.h dict_proxy.h dict_sqlite.h domain_list.h dot_lockfile.h dot_lockfile_as.h dsb_scan.h dsn.h dsn_buf.h dsn_mask.h dsn_print.h dsn_util.h ehlo_mask.h ext_prop.h file_id.h flush_clnt.h header_opts.h header_token.h input_transp.h int_filt.h is_header.h lex_822.h log_adhoc.h mail_addr.h mail_addr_crunch.h mail_addr_find.h mail_addr_map.h mail_conf.h mail_copy.h mail_date.h mail_dict.h mail_error.h mail_flush.h mail_open_ok.h mail_params.h mail_proto.h mail_queue.h mail_run.h mail_scan_dir.h mail_stream.h mail_task.h mail_version.h maps.h mark_corrupt.h match_parent_style.h mbox_conf.h mbox_open.h mime_state.h mkmap.h msg_stats.h mynetworks.h mypwd.h namadr_list.h off_cvt.h opened.h own_inet_addr.h pipe_command.h post_mail.h qmgr_user.h qmqp_proto.h quote_821_local.h quote_822_local.h quote_flags.h rcpt_buf.h rcpt_print.h rec_attr_map.h rec_streamlf.h rec_type.h recipient_list.h record.h resolve_clnt.h resolve_local.h rewrite_clnt.h scache.h sent.h smtp_stream.h split_addr.h string_list.h strip_addr.h sys_exits.h timed_ipc.h tok822.h trace.h user_acl.h valid_mailhost_addr.h verify.h verify_clnt.h verp_sender.h wildcard_inet_addr.h xtext.h delivered_hdr.h fold_addr.h header_body_checks.h data_redirect.h match_service.h addr_match_list.h smtp_reply_footer.h safe_ultostr.h verify_sender_addr.h dict_memcache.h memcache_proto.h server_acl.h haproxy_srvr.h dsn_filter.h dynamicmaps.h uxtext.h smtputf8.h attr_override.h mail_parm_split.h midna_adomain.h mail_addr_form.h; \
                do \
                  cmp -s $i ../../include/$i 2>/dev/null || cp $i ../../include; \
                done
        cd ../../include; chmod 644 abounce.h anvil_clnt.h been_here.h bounce.h bounce_log.h canon_addr.h cfg_parser.h cleanup_user.h clnt_stream.h config.h conv_time.h db_common.h debug_peer.h debug_process.h defer.h deliver_completed.h deliver_flock.h deliver_pass.h deliver_request.h dict_ldap.h dict_mysql.h dict_pgsql.h dict_proxy.h dict_sqlite.h domain_list.h dot_lockfile.h dot_lockfile_as.h dsb_scan.h dsn.h dsn_buf.h dsn_mask.h dsn_print.h dsn_util.h ehlo_mask.h ext_prop.h file_id.h flush_clnt.h header_opts.h header_token.h input_transp.h int_filt.h is_header.h lex_822.h log_adhoc.h mail_addr.h mail_addr_crunch.h mail_addr_find.h mail_addr_map.h mail_conf.h mail_copy.h mail_date.h mail_dict.h mail_error.h mail_flush.h mail_open_ok.h mail_params.h mail_proto.h mail_queue.h mail_run.h mail_scan_dir.h mail_stream.h mail_task.h mail_version.h maps.h mark_corrupt.h match_parent_style.h mbox_conf.h mbox_open.h mime_state.h mkmap.h msg_stats.h mynetworks.h mypwd.h namadr_list.h off_cvt.h opened.h own_inet_addr.h pipe_command.h post_mail.h qmgr_user.h qmqp_proto.h quote_821_local.h quote_822_local.h quote_flags.h rcpt_buf.h rcpt_print.h rec_attr_map.h rec_streamlf.h rec_type.h recipient_list.h record.h resolve_clnt.h resolve_local.h rewrite_clnt.h scache.h sent.h smtp_stream.h split_addr.h string_list.h strip_addr.h sys_exits.h timed_ipc.h tok822.h trace.h user_acl.h valid_mailhost_addr.h verify.h verify_clnt.h verp_sender.h wildcard_inet_addr.h xtext.h delivered_hdr.h fold_addr.h header_body_checks.h data_redirect.h match_service.h addr_match_list.h smtp_reply_footer.h safe_ultostr.h verify_sender_addr.h dict_memcache.h memcache_proto.h server_acl.h haproxy_srvr.h dsn_filter.h dynamicmaps.h uxtext.h smtputf8.h attr_override.h mail_parm_split.h midna_adomain.h mail_addr_form.h
        [src/dns]
        for i in dns.h; \
                do \
                  cmp -s $i ../../include/$i 2>/dev/null || cp $i ../../include; \
                done
        cd ../../include; chmod 644 dns.h
        [src/tls]
        for i in tls.h tls_prng.h tls_scache.h tls_mgr.h tls_proxy.h; \
                do \
                  cmp -s $i ../../include/$i 2>/dev/null || cp $i ../../include; \
                done
        cd ../../include; chmod 644 tls.h tls_prng.h tls_scache.h tls_mgr.h tls_proxy.h
        [src/xsasl]
        for i in xsasl.h; \
                do \
                  cmp -s $i ../../include/$i 2>/dev/null || cp $i ../../include; \
                done
        cd ../../include; chmod 644 xsasl.h
        [src/master]
        for i in mail_server.h master_proto.h mail_flow.h; \
                do \
                  cmp -s $i ../../include/$i 2>/dev/null || cp $i ../../include; \
                done
        cd ../../include; chmod 644 mail_server.h master_proto.h mail_flow.h
        [src/milter]
        for i in milter.h; \
                do \
                  cmp -s $i ../../include/$i 2>/dev/null || cp $i ../../include; \
                done
        cd ../../include; chmod 644 milter.h
        [src/postfix]
        make: Nothing to be done for `update'.
        [src/fsstone]
        make: Nothing to be done for `update'.
        [src/smtpstone]
        make: Nothing to be done for `update'.
        [src/sendmail]
        make: Nothing to be done for `update'.
        [src/error]
        make: Nothing to be done for `update'.
        [src/pickup]
        make: Nothing to be done for `update'.
        [src/cleanup]
        make: Nothing to be done for `update'.
        [src/smtpd]
        make: Nothing to be done for `update'.
        [src/local]
        make: Nothing to be done for `update'.
        [src/trivial-rewrite]
        make: Nothing to be done for `update'.
        [src/qmgr]
        make: Nothing to be done for `update'.
        [src/oqmgr]
        make: Nothing to be done for `update'.
        [src/smtp]
        make: Nothing to be done for `update'.
        [src/bounce]
        make: Nothing to be done for `update'.
        [src/pipe]
        make: Nothing to be done for `update'.
        [src/showq]
        make: Nothing to be done for `update'.
        [src/postalias]
        make: Nothing to be done for `update'.
        [src/postcat]
        make: Nothing to be done for `update'.
        [src/postconf]
        make: Nothing to be done for `update'.
        [src/postdrop]
        make: Nothing to be done for `update'.
        [src/postkick]
        make: Nothing to be done for `update'.
        [src/postlock]
        make: Nothing to be done for `update'.
        [src/postlog]
        make: Nothing to be done for `update'.
        [src/postmap]
        make: Nothing to be done for `update'.
        [src/postqueue]
        make: Nothing to be done for `update'.
        [src/postsuper]
        make: Nothing to be done for `update'.
        [src/qmqpd]
        make: Nothing to be done for `update'.
        [src/spawn]
        make: Nothing to be done for `update'.
        [src/flush]
        make: Nothing to be done for `update'.
        [src/verify]
        make: Nothing to be done for `update'.
        [src/virtual]
        make: Nothing to be done for `update'.
        [src/proxymap]
        make: Nothing to be done for `update'.
        [src/anvil]
        make: Nothing to be done for `update'.
        [src/scache]
        make: Nothing to be done for `update'.
        [src/discard]
        make: Nothing to be done for `update'.
        [src/tlsmgr]
        make: Nothing to be done for `update'.
        [src/postmulti]
        make: Nothing to be done for `update'.
        [src/postscreen]
        make: Nothing to be done for `update'.
        [src/dnsblog]
        make: Nothing to be done for `update'.
        [src/tlsproxy]
        make: Nothing to be done for `update'.
        [src/posttls-finger]
        make: Nothing to be done for `update'.
        SHLIB_ENV_VAR= SHLIB_ENV_VAL= \
                LD_LIBRARY_PATH=/root/postfix-3.2.0/lib shlib_directory=${shlib_directory:-`LD_LIBRARY_PATH=/root/postfix-3.2.0/lib bin/postconf -dhx shlib_directory`} /bin/sh \
                        postfix-install
        bin/postconf: warning: open /usr/local/postfix-3.2.0/conf/master.cf: No such file or directory
        
            Warning: if you use this script to install Postfix locally,
            this script will replace existing sendmail or Postfix programs.
            Make backups if you want to be able to recover.
        
            Before installing files, this script prompts you for some definitions.
            Most definitions will be remembered, so you have to specify them
            only once. All definitions should have a reasonable default value.
        
        Please specify the prefix for installed file names. Specify this ONLY
        if you are building ready-to-install packages for distribution to OTHER
        machines. See PACKAGE_README for instructions.
        install_root: [/]
        
        Please specify a directory for scratch files while installing Postfix. You
        must have write permission in this directory.
        tempdir: [/root/postfix-3.2.0]
        
        Please specify the final destination directory for installed Postfix
        configuration files.
        config_directory: [/usr/local/postfix-3.2.0/conf]
        
        Please specify the final destination directory for installed Postfix
        administrative commands. This directory should be in the command search
        path of adminstrative users.
        command_directory: [/usr/local/postfix-3.2.0/bin]
        
        Please specify the final destination directory for installed Postfix
        daemon programs. This directory should not be in the command search path
        of any users.
        daemon_directory: [/usr/local/postfix-3.2.0/lib]
        
        Please specify the final destination directory for Postfix-writable
        data files such as caches or random numbers. This directory should not
        be shared with non-Postfix software.
        data_directory: [/usr/local/postfix-3.2.0/data]
        
        Please specify the final destination directory for the Postfix HTML
        files. Specify "no" if you do not want to install these files.
        html_directory: [/usr/local/postfix-3.2.0/html]
        
        Please specify the owner of the Postfix queue. Specify an account with
        numerical user ID and group ID values that are not used by any other
        accounts on the system.
        mail_owner: [postfix]
        
        Please specify the final destination pathname for the installed Postfix
        mailq command. This is the Sendmail-compatible mail queue listing command.
        mailq_path: [/usr/local/postfix-3.2.0/bin/mailq]
        
        Please specify the final destination directory for the Postfix on-line
        manual pages. You can no longer specify "no" here.
        manpage_directory: [/usr/local/postfix-3.2.0/man]
        
        Please specify the final destination pathname for the installed Postfix
        newaliases command. This is the Sendmail-compatible command to build
        alias databases for the Postfix local delivery agent.
        newaliases_path: [/usr/local/postfix-3.2.0/bin/newaliases]
        
        Please specify the final destination directory for Postfix queues.
        queue_directory: [/usr/local/postfix-3.2.0/queue]
        
        Please specify the final destination directory for the Postfix README
        files. Specify "no" if you do not want to install these files.
        readme_directory: [/usr/local/postfix-3.2.0/readme]
        
        Please specify the final destination pathname for the installed Postfix
        sendmail command. This is the Sendmail-compatible mail posting interface.
        sendmail_path: [/usr/local/postfix-3.2.0/bin/sendmail]
        
        Please specify the group for mail submission and for queue management
        commands. Specify a group name with a numerical group ID that is
        not shared with other accounts, not even with the Postfix mail_owner
        account. You can no longer specify "no" here.
        setgid_group: [postdrop]
        
        Please specify the final destination directory for Postfix shared-library
        files.
        shlib_directory: [/usr/local/postfix-3.2.0/lib]
        
        Please specify the final destination directory for non-executable files
        that are shared among multiple Postfix instances, such as postfix-files,
        dynamicmaps.cf, as well as the multi-instance template files main.cf.proto
        and master.cf.proto.
        meta_directory: [/usr/local/postfix-3.2.0/meta]
        Updating /usr/local/postfix-3.2.0/lib/libpostfix-util.so...
        Updating /usr/local/postfix-3.2.0/lib/libpostfix-global.so...
        Updating /usr/local/postfix-3.2.0/lib/libpostfix-dns.so...
        Updating /usr/local/postfix-3.2.0/lib/libpostfix-tls.so...
        Updating /usr/local/postfix-3.2.0/lib/libpostfix-master.so...
        Updating /usr/local/postfix-3.2.0/meta/dynamicmaps.cf...
        Updating /usr/local/postfix-3.2.0/meta/main.cf.proto...
        Updating /usr/local/postfix-3.2.0/meta/makedefs.out...
        Updating /usr/local/postfix-3.2.0/meta/master.cf.proto...
        Updating /usr/local/postfix-3.2.0/meta/postfix-files...
        Updating /usr/local/postfix-3.2.0/lib/anvil...
        Updating /usr/local/postfix-3.2.0/lib/bounce...
        Updating /usr/local/postfix-3.2.0/lib/cleanup...
        Updating /usr/local/postfix-3.2.0/lib/discard...
        Updating /usr/local/postfix-3.2.0/lib/dnsblog...
        Updating /usr/local/postfix-3.2.0/lib/error...
        Updating /usr/local/postfix-3.2.0/lib/flush...
        Updating /usr/local/postfix-3.2.0/lib/local...
        Updating /usr/local/postfix-3.2.0/lib/master...
        Updating /usr/local/postfix-3.2.0/lib/oqmgr...
        Updating /usr/local/postfix-3.2.0/lib/pickup...
        Updating /usr/local/postfix-3.2.0/lib/pipe...
        Updating /usr/local/postfix-3.2.0/lib/post-install...
        Updating /usr/local/postfix-3.2.0/lib/postfix-script...
        Updating /usr/local/postfix-3.2.0/lib/postfix-tls-script...
        Updating /usr/local/postfix-3.2.0/lib/postfix-wrapper...
        Updating /usr/local/postfix-3.2.0/lib/postmulti-script...
        Updating /usr/local/postfix-3.2.0/lib/postscreen...
        Updating /usr/local/postfix-3.2.0/lib/proxymap...
        Updating /usr/local/postfix-3.2.0/lib/qmgr...
        Updating /usr/local/postfix-3.2.0/lib/qmqpd...
        Updating /usr/local/postfix-3.2.0/lib/scache...
        Updating /usr/local/postfix-3.2.0/lib/showq...
        Updating /usr/local/postfix-3.2.0/lib/smtp...
        Updating /usr/local/postfix-3.2.0/lib/smtpd...
        Updating /usr/local/postfix-3.2.0/lib/spawn...
        Updating /usr/local/postfix-3.2.0/lib/tlsproxy...
        Updating /usr/local/postfix-3.2.0/lib/tlsmgr...
        Updating /usr/local/postfix-3.2.0/lib/trivial-rewrite...
        Updating /usr/local/postfix-3.2.0/lib/verify...
        Updating /usr/local/postfix-3.2.0/lib/virtual...
        Updating /usr/local/postfix-3.2.0/lib/nqmgr...
        Updating /usr/local/postfix-3.2.0/lib/lmtp...
        Updating /usr/local/postfix-3.2.0/bin/postalias...
        Updating /usr/local/postfix-3.2.0/bin/postcat...
        Updating /usr/local/postfix-3.2.0/bin/postconf...
        Updating /usr/local/postfix-3.2.0/bin/postfix...
        Updating /usr/local/postfix-3.2.0/bin/postkick...
        Updating /usr/local/postfix-3.2.0/bin/postlock...
        Updating /usr/local/postfix-3.2.0/bin/postlog...
        Updating /usr/local/postfix-3.2.0/bin/postmap...
        Updating /usr/local/postfix-3.2.0/bin/postmulti...
        Updating /usr/local/postfix-3.2.0/bin/postsuper...
        Updating /usr/local/postfix-3.2.0/bin/postdrop...
        Updating /usr/local/postfix-3.2.0/bin/postqueue...
        Updating /usr/local/postfix-3.2.0/bin/sendmail...
        Updating /usr/local/postfix-3.2.0/bin/newaliases...
        Updating /usr/local/postfix-3.2.0/bin/mailq...
        Updating /usr/local/postfix-3.2.0/conf/LICENSE...
        Updating /usr/local/postfix-3.2.0/conf/TLS_LICENSE...
        Updating /usr/local/postfix-3.2.0/conf/access...
        Updating /usr/local/postfix-3.2.0/conf/aliases...
        Updating /usr/local/postfix-3.2.0/conf/bounce.cf.default...
        Updating /usr/local/postfix-3.2.0/conf/canonical...
        Updating /usr/local/postfix-3.2.0/conf/generic...
        Updating /usr/local/postfix-3.2.0/conf/header_checks...
        Updating /usr/local/postfix-3.2.0/conf/main.cf.default...
        Updating /usr/local/postfix-3.2.0/conf/main.cf...
        Updating /usr/local/postfix-3.2.0/conf/master.cf...
        Updating /usr/local/postfix-3.2.0/conf/relocated...
        Updating /usr/local/postfix-3.2.0/conf/transport...
        Updating /usr/local/postfix-3.2.0/conf/virtual...
        Updating /usr/local/postfix-3.2.0/man/man1/mailq.1...
        Updating /usr/local/postfix-3.2.0/man/man1/newaliases.1...
        Updating /usr/local/postfix-3.2.0/man/man1/postalias.1...
        Updating /usr/local/postfix-3.2.0/man/man1/postcat.1...
        Updating /usr/local/postfix-3.2.0/man/man1/postconf.1...
        Updating /usr/local/postfix-3.2.0/man/man1/postdrop.1...
        Updating /usr/local/postfix-3.2.0/man/man1/postfix.1...
        Updating /usr/local/postfix-3.2.0/man/man1/postfix-tls.1...
        Updating /usr/local/postfix-3.2.0/man/man1/postkick.1...
        Updating /usr/local/postfix-3.2.0/man/man1/postlock.1...
        Updating /usr/local/postfix-3.2.0/man/man1/postlog.1...
        Updating /usr/local/postfix-3.2.0/man/man1/postmap.1...
        Updating /usr/local/postfix-3.2.0/man/man1/postmulti.1...
        Updating /usr/local/postfix-3.2.0/man/man1/postqueue.1...
        Updating /usr/local/postfix-3.2.0/man/man1/postsuper.1...
        Updating /usr/local/postfix-3.2.0/man/man1/sendmail.1...
        Updating /usr/local/postfix-3.2.0/man/man5/access.5...
        Updating /usr/local/postfix-3.2.0/man/man5/aliases.5...
        Updating /usr/local/postfix-3.2.0/man/man5/body_checks.5...
        Updating /usr/local/postfix-3.2.0/man/man5/bounce.5...
        Updating /usr/local/postfix-3.2.0/man/man5/canonical.5...
        Updating /usr/local/postfix-3.2.0/man/man5/cidr_table.5...
        Updating /usr/local/postfix-3.2.0/man/man5/generic.5...
        Updating /usr/local/postfix-3.2.0/man/man5/header_checks.5...
        Updating /usr/local/postfix-3.2.0/man/man5/ldap_table.5...
        Updating /usr/local/postfix-3.2.0/man/man5/lmdb_table.5...
        Updating /usr/local/postfix-3.2.0/man/man5/master.5...
        Updating /usr/local/postfix-3.2.0/man/man5/memcache_table.5...
        Updating /usr/local/postfix-3.2.0/man/man5/mysql_table.5...
        Updating /usr/local/postfix-3.2.0/man/man5/socketmap_table.5...
        Updating /usr/local/postfix-3.2.0/man/man5/sqlite_table.5...
        Updating /usr/local/postfix-3.2.0/man/man5/nisplus_table.5...
        Updating /usr/local/postfix-3.2.0/man/man5/pcre_table.5...
        Updating /usr/local/postfix-3.2.0/man/man5/pgsql_table.5...
        Updating /usr/local/postfix-3.2.0/man/man5/postconf.5...
        Updating /usr/local/postfix-3.2.0/man/man5/postfix-wrapper.5...
        Updating /usr/local/postfix-3.2.0/man/man5/regexp_table.5...
        Updating /usr/local/postfix-3.2.0/man/man5/relocated.5...
        Updating /usr/local/postfix-3.2.0/man/man5/tcp_table.5...
        Updating /usr/local/postfix-3.2.0/man/man5/transport.5...
        Updating /usr/local/postfix-3.2.0/man/man5/virtual.5...
        Updating /usr/local/postfix-3.2.0/man/man8/bounce.8...
        Updating /usr/local/postfix-3.2.0/man/man8/cleanup.8...
        Updating /usr/local/postfix-3.2.0/man/man8/anvil.8...
        Updating /usr/local/postfix-3.2.0/man/man8/defer.8...
        Updating /usr/local/postfix-3.2.0/man/man8/discard.8...
        Updating /usr/local/postfix-3.2.0/man/man8/dnsblog.8...
        Updating /usr/local/postfix-3.2.0/man/man8/error.8...
        Updating /usr/local/postfix-3.2.0/man/man8/flush.8...
        Updating /usr/local/postfix-3.2.0/man/man8/lmtp.8...
        Updating /usr/local/postfix-3.2.0/man/man8/local.8...
        Updating /usr/local/postfix-3.2.0/man/man8/master.8...
        Updating /usr/local/postfix-3.2.0/man/man8/oqmgr.8...
        Updating /usr/local/postfix-3.2.0/man/man8/pickup.8...
        Updating /usr/local/postfix-3.2.0/man/man8/pipe.8...
        Updating /usr/local/postfix-3.2.0/man/man8/postscreen.8...
        Updating /usr/local/postfix-3.2.0/man/man8/proxymap.8...
        Updating /usr/local/postfix-3.2.0/man/man8/qmgr.8...
        Updating /usr/local/postfix-3.2.0/man/man8/qmqpd.8...
        Updating /usr/local/postfix-3.2.0/man/man8/scache.8...
        Updating /usr/local/postfix-3.2.0/man/man8/showq.8...
        Updating /usr/local/postfix-3.2.0/man/man8/smtp.8...
        Updating /usr/local/postfix-3.2.0/man/man8/smtpd.8...
        Updating /usr/local/postfix-3.2.0/man/man8/spawn.8...
        Updating /usr/local/postfix-3.2.0/man/man8/tlsproxy.8...
        Updating /usr/local/postfix-3.2.0/man/man8/tlsmgr.8...
        Updating /usr/local/postfix-3.2.0/man/man8/trace.8...
        Updating /usr/local/postfix-3.2.0/man/man8/trivial-rewrite.8...
        Updating /usr/local/postfix-3.2.0/man/man8/verify.8...
        Updating /usr/local/postfix-3.2.0/man/man8/virtual.8...
        Updating /usr/local/postfix-3.2.0/readme/AAAREADME...
        Updating /usr/local/postfix-3.2.0/readme/ADDRESS_CLASS_README...
        Updating /usr/local/postfix-3.2.0/readme/ADDRESS_REWRITING_README...
        Updating /usr/local/postfix-3.2.0/readme/ADDRESS_VERIFICATION_README...
        Updating /usr/local/postfix-3.2.0/readme/BACKSCATTER_README...
        Updating /usr/local/postfix-3.2.0/readme/BASIC_CONFIGURATION_README...
        Updating /usr/local/postfix-3.2.0/readme/BUILTIN_FILTER_README...
        Updating /usr/local/postfix-3.2.0/readme/CDB_README...
        Updating /usr/local/postfix-3.2.0/readme/COMPATIBILITY_README...
        Updating /usr/local/postfix-3.2.0/readme/CONNECTION_CACHE_README...
        Updating /usr/local/postfix-3.2.0/readme/CONTENT_INSPECTION_README...
        Updating /usr/local/postfix-3.2.0/readme/DATABASE_README...
        Updating /usr/local/postfix-3.2.0/readme/DB_README...
        Updating /usr/local/postfix-3.2.0/readme/DEBUG_README...
        Updating /usr/local/postfix-3.2.0/readme/DSN_README...
        Updating /usr/local/postfix-3.2.0/readme/ETRN_README...
        Updating /usr/local/postfix-3.2.0/readme/FILTER_README...
        Updating /usr/local/postfix-3.2.0/readme/FORWARD_SECRECY_README...
        Updating /usr/local/postfix-3.2.0/readme/INSTALL...
        Updating /usr/local/postfix-3.2.0/readme/IPV6_README...
        Updating /usr/local/postfix-3.2.0/readme/LDAP_README...
        Updating /usr/local/postfix-3.2.0/readme/LINUX_README...
        Updating /usr/local/postfix-3.2.0/readme/LMDB_README...
        Updating /usr/local/postfix-3.2.0/readme/LOCAL_RECIPIENT_README...
        Updating /usr/local/postfix-3.2.0/readme/MAILDROP_README...
        Updating /usr/local/postfix-3.2.0/readme/MEMCACHE_README...
        Updating /usr/local/postfix-3.2.0/readme/MILTER_README...
        Updating /usr/local/postfix-3.2.0/readme/MULTI_INSTANCE_README...
        Updating /usr/local/postfix-3.2.0/readme/MYSQL_README...
        Updating /usr/local/postfix-3.2.0/readme/SQLITE_README...
        Updating /usr/local/postfix-3.2.0/readme/NFS_README...
        Updating /usr/local/postfix-3.2.0/readme/OVERVIEW...
        Updating /usr/local/postfix-3.2.0/readme/PACKAGE_README...
        Updating /usr/local/postfix-3.2.0/readme/PCRE_README...
        Updating /usr/local/postfix-3.2.0/readme/PGSQL_README...
        Updating /usr/local/postfix-3.2.0/readme/POSTSCREEN_README...
        Updating /usr/local/postfix-3.2.0/readme/QSHAPE_README...
        Updating /usr/local/postfix-3.2.0/readme/RELEASE_NOTES...
        Updating /usr/local/postfix-3.2.0/readme/RESTRICTION_CLASS_README...
        Updating /usr/local/postfix-3.2.0/readme/SASL_README...
        Updating /usr/local/postfix-3.2.0/readme/SCHEDULER_README...
        Updating /usr/local/postfix-3.2.0/readme/SMTPD_ACCESS_README...
        Updating /usr/local/postfix-3.2.0/readme/SMTPD_POLICY_README...
        Updating /usr/local/postfix-3.2.0/readme/SMTPD_PROXY_README...
        Updating /usr/local/postfix-3.2.0/readme/SOHO_README...
        Updating /usr/local/postfix-3.2.0/readme/STANDARD_CONFIGURATION_README...
        Updating /usr/local/postfix-3.2.0/readme/STRESS_README...
        Updating /usr/local/postfix-3.2.0/readme/TLS_LEGACY_README...
        Updating /usr/local/postfix-3.2.0/readme/TLS_README...
        Updating /usr/local/postfix-3.2.0/readme/TUNING_README...
        Updating /usr/local/postfix-3.2.0/readme/ULTRIX_README...
        Updating /usr/local/postfix-3.2.0/readme/UUCP_README...
        Updating /usr/local/postfix-3.2.0/readme/VERP_README...
        Updating /usr/local/postfix-3.2.0/readme/VIRTUAL_README...
        Updating /usr/local/postfix-3.2.0/readme/XCLIENT_README...
        Updating /usr/local/postfix-3.2.0/readme/XFORWARD_README...
        Updating /usr/local/postfix-3.2.0/html/ADDRESS_CLASS_README.html...
        Updating /usr/local/postfix-3.2.0/html/ADDRESS_REWRITING_README.html...
        Updating /usr/local/postfix-3.2.0/html/ADDRESS_VERIFICATION_README.html...
        Updating /usr/local/postfix-3.2.0/html/BACKSCATTER_README.html...
        Updating /usr/local/postfix-3.2.0/html/BASIC_CONFIGURATION_README.html...
        Updating /usr/local/postfix-3.2.0/html/BUILTIN_FILTER_README.html...
        Updating /usr/local/postfix-3.2.0/html/CDB_README.html...
        Updating /usr/local/postfix-3.2.0/html/COMPATIBILITY_README.html...
        Updating /usr/local/postfix-3.2.0/html/CONNECTION_CACHE_README.html...
        Updating /usr/local/postfix-3.2.0/html/CONTENT_INSPECTION_README.html...
        Updating /usr/local/postfix-3.2.0/html/DATABASE_README.html...
        Updating /usr/local/postfix-3.2.0/html/DB_README.html...
        Updating /usr/local/postfix-3.2.0/html/DEBUG_README.html...
        Updating /usr/local/postfix-3.2.0/html/DSN_README.html...
        Updating /usr/local/postfix-3.2.0/html/ETRN_README.html...
        Updating /usr/local/postfix-3.2.0/html/FILTER_README.html...
        Updating /usr/local/postfix-3.2.0/html/FORWARD_SECRECY_README.html...
        Updating /usr/local/postfix-3.2.0/html/INSTALL.html...
        Updating /usr/local/postfix-3.2.0/html/IPV6_README.html...
        Updating /usr/local/postfix-3.2.0/html/LDAP_README.html...
        Updating /usr/local/postfix-3.2.0/html/LINUX_README.html...
        Updating /usr/local/postfix-3.2.0/html/LMDB_README.html...
        Updating /usr/local/postfix-3.2.0/html/LOCAL_RECIPIENT_README.html...
        Updating /usr/local/postfix-3.2.0/html/MAILDROP_README.html...
        Updating /usr/local/postfix-3.2.0/html/MILTER_README.html...
        Updating /usr/local/postfix-3.2.0/html/MULTI_INSTANCE_README.html...
        Updating /usr/local/postfix-3.2.0/html/MYSQL_README.html...
        Updating /usr/local/postfix-3.2.0/html/SQLITE_README.html...
        Updating /usr/local/postfix-3.2.0/html/NFS_README.html...
        Updating /usr/local/postfix-3.2.0/html/OVERVIEW.html...
        Updating /usr/local/postfix-3.2.0/html/PACKAGE_README.html...
        Updating /usr/local/postfix-3.2.0/html/PCRE_README.html...
        Updating /usr/local/postfix-3.2.0/html/PGSQL_README.html...
        Updating /usr/local/postfix-3.2.0/html/POSTSCREEN_README.html...
        Updating /usr/local/postfix-3.2.0/html/QSHAPE_README.html...
        Updating /usr/local/postfix-3.2.0/html/RESTRICTION_CLASS_README.html...
        Updating /usr/local/postfix-3.2.0/html/SASL_README.html...
        Updating /usr/local/postfix-3.2.0/html/SCHEDULER_README.html...
        Updating /usr/local/postfix-3.2.0/html/SMTPD_ACCESS_README.html...
        Updating /usr/local/postfix-3.2.0/html/SMTPD_POLICY_README.html...
        Updating /usr/local/postfix-3.2.0/html/SMTPD_PROXY_README.html...
        Updating /usr/local/postfix-3.2.0/html/SOHO_README.html...
        Updating /usr/local/postfix-3.2.0/html/STANDARD_CONFIGURATION_README.html...
        Updating /usr/local/postfix-3.2.0/html/STRESS_README.html...
        Updating /usr/local/postfix-3.2.0/html/TLS_LEGACY_README.html...
        Updating /usr/local/postfix-3.2.0/html/TLS_README.html...
        Updating /usr/local/postfix-3.2.0/html/TUNING_README.html...
        Updating /usr/local/postfix-3.2.0/html/UUCP_README.html...
        Updating /usr/local/postfix-3.2.0/html/VERP_README.html...
        Updating /usr/local/postfix-3.2.0/html/VIRTUAL_README.html...
        Updating /usr/local/postfix-3.2.0/html/XCLIENT_README.html...
        Updating /usr/local/postfix-3.2.0/html/XFORWARD_README.html...
        Updating /usr/local/postfix-3.2.0/html/access.5.html...
        Updating /usr/local/postfix-3.2.0/html/aliases.5.html...
        Updating /usr/local/postfix-3.2.0/html/anvil.8.html...
        Updating /usr/local/postfix-3.2.0/html/bounce.8.html...
        Updating /usr/local/postfix-3.2.0/html/canonical.5.html...
        Updating /usr/local/postfix-3.2.0/html/cidr_table.5.html...
        Updating /usr/local/postfix-3.2.0/html/cleanup.8.html...
        Updating /usr/local/postfix-3.2.0/html/defer.8.html...
        Updating /usr/local/postfix-3.2.0/html/discard.8.html...
        Updating /usr/local/postfix-3.2.0/html/dnsblog.8.html...
        Updating /usr/local/postfix-3.2.0/html/error.8.html...
        Updating /usr/local/postfix-3.2.0/html/flush.8.html...
        Updating /usr/local/postfix-3.2.0/html/generic.5.html...
        Updating /usr/local/postfix-3.2.0/html/header_checks.5.html...
        Updating /usr/local/postfix-3.2.0/html/index.html...
        Updating /usr/local/postfix-3.2.0/html/ldap_table.5.html...
        Updating /usr/local/postfix-3.2.0/html/lmtp.8.html...
        Updating /usr/local/postfix-3.2.0/html/local.8.html...
        Updating /usr/local/postfix-3.2.0/html/mailq.1.html...
        Updating /usr/local/postfix-3.2.0/html/master.5.html...
        Updating /usr/local/postfix-3.2.0/html/master.8.html...
        Updating /usr/local/postfix-3.2.0/html/memcache_table.5.html...
        Updating /usr/local/postfix-3.2.0/html/mysql_table.5.html...
        Updating /usr/local/postfix-3.2.0/html/sqlite_table.5.html...
        Updating /usr/local/postfix-3.2.0/html/nisplus_table.5.html...
        Updating /usr/local/postfix-3.2.0/html/newaliases.1.html...
        Updating /usr/local/postfix-3.2.0/html/oqmgr.8.html...
        Updating /usr/local/postfix-3.2.0/html/pcre_table.5.html...
        Updating /usr/local/postfix-3.2.0/html/pgsql_table.5.html...
        Updating /usr/local/postfix-3.2.0/html/pickup.8.html...
        Updating /usr/local/postfix-3.2.0/html/pipe.8.html...
        Updating /usr/local/postfix-3.2.0/html/postalias.1.html...
        Updating /usr/local/postfix-3.2.0/html/postcat.1.html...
        Updating /usr/local/postfix-3.2.0/html/postconf.1.html...
        Updating /usr/local/postfix-3.2.0/html/postconf.5.html...
        Updating /usr/local/postfix-3.2.0/html/postdrop.1.html...
        Updating /usr/local/postfix-3.2.0/html/postfix-logo.jpg...
        Updating /usr/local/postfix-3.2.0/html/postfix-manuals.html...
        Updating /usr/local/postfix-3.2.0/html/postfix-wrapper.5.html...
        Updating /usr/local/postfix-3.2.0/html/postfix.1.html...
        Updating /usr/local/postfix-3.2.0/html/postkick.1.html...
        Updating /usr/local/postfix-3.2.0/html/postlock.1.html...
        Updating /usr/local/postfix-3.2.0/html/postlog.1.html...
        Updating /usr/local/postfix-3.2.0/html/postmap.1.html...
        Updating /usr/local/postfix-3.2.0/html/postmulti.1.html...
        Updating /usr/local/postfix-3.2.0/html/postqueue.1.html...
        Updating /usr/local/postfix-3.2.0/html/postscreen.8.html...
        Updating /usr/local/postfix-3.2.0/html/postsuper.1.html...
        Updating /usr/local/postfix-3.2.0/html/qshape.1.html...
        Updating /usr/local/postfix-3.2.0/html/proxymap.8.html...
        Updating /usr/local/postfix-3.2.0/html/qmgr.8.html...
        Updating /usr/local/postfix-3.2.0/html/qmqp-sink.1.html...
        Updating /usr/local/postfix-3.2.0/html/qmqp-source.1.html...
        Updating /usr/local/postfix-3.2.0/html/qmqpd.8.html...
        Updating /usr/local/postfix-3.2.0/html/regexp_table.5.html...
        Updating /usr/local/postfix-3.2.0/html/relocated.5.html...
        Updating /usr/local/postfix-3.2.0/html/sendmail.1.html...
        Updating /usr/local/postfix-3.2.0/html/showq.8.html...
        Updating /usr/local/postfix-3.2.0/html/smtp-sink.1.html...
        Updating /usr/local/postfix-3.2.0/html/smtp-source.1.html...
        Updating /usr/local/postfix-3.2.0/html/smtp.8.html...
        Updating /usr/local/postfix-3.2.0/html/smtpd.8.html...
        Updating /usr/local/postfix-3.2.0/html/spawn.8.html...
        Updating /usr/local/postfix-3.2.0/html/tlsproxy.8.html...
        Updating /usr/local/postfix-3.2.0/html/tcp_table.5.html...
        Updating /usr/local/postfix-3.2.0/html/trace.8.html...
        Updating /usr/local/postfix-3.2.0/html/transport.5.html...
        Updating /usr/local/postfix-3.2.0/html/trivial-rewrite.8.html...
        Updating /usr/local/postfix-3.2.0/html/verify.8.html...
        Updating /usr/local/postfix-3.2.0/html/virtual.5.html...
        Updating /usr/local/postfix-3.2.0/html/virtual.8.html...
        
            Warning: you still need to edit myorigin/mydestination/mynetworks
            parameter settings in /usr/local/postfix-3.2.0/conf/main.cf.
        
            See also http://www.postfix.org/STANDARD_CONFIGURATION_README.html
            for information about dialup sites or about sites inside a firewalled
            network.
        
            BTW: Check your /etc/aliases file and be sure to set up aliases
            that send mail for root and postmaster to a real person, then run
            /usr/local/postfix-3.2.0/bin/newaliases.

        実行ファイル中に書き込まれたデフォルトの設定ファイルパスと実際の設定ファイルのパスがことなれば、ここで最後に警告が出る。
        設定ファイルパスを明示的に指定することで回避可能だが、手間であるし、またこの様にコマンドを手動実行しない場合は設定ファイルパスを指定できないので、makefileを生成しなおしてインストールしたほうが良い。
  12. 環境設定を行う
    1. インストールディレクトリへのシンボリックリンクを作成する。
      これによって、複数のバージョンを同居させ、リンクを切り替えることで、バージョン変更が可能となる。
      各バージョンの実行ファイルはデフォルトでは各バージョンの設定ファイルを読み込むこととなる。
      rm -f /usr/local/postfix
      ln -s /usr/local/`pwd | sed "s/.*\///"` /usr/local/postfix
    2. 簡単にアクセスできるように環境変数を設定する
      export POSTFIX_HOME=/usr/local/postfix
    3. ツール類にパスを通す
      export PATH=$POSTFIX_HOME/bin:$PATH
    4. 環境変数を再起動後も有効にする
      echo "" >> /etc/bashrc
      echo "# POSTFIX ENVIRONMENT VARIABLE" >> /etc/bashrc
      echo "export POSTFIX_HOME=$POSTFIX_HOME" >> /etc/bashrc
      echo "export PATH=\$POSTFIX_HOME/bin:\$PATH" >> /etc/bashrc
    5. Sendmail互換プログラムを入れ替える
      1. 環境変数が設定されているか確認
        echo $TMP_SENDMAIL_DEFAULT_PATH
        echo $TMP_MAILQ_DEFAULT_PATH
        echo $TMP_NEWALIASES_DEFAULT_PATH
        • 出力例
          /usr/sbin/sendmail
          /usr/bin/mailq
          /usr/bin/newaliases
      2. リンクを作成する
        ln -s $POSTFIX_HOME/bin/sendmail $TMP_SENDMAIL_DEFAULT_PATH
        ln -s $POSTFIX_HOME/bin/mailq $TMP_MAILQ_DEFAULT_PATH
        ln -s $POSTFIX_HOME/bin/newaliases $TMP_NEWALIASES_DEFAULT_PATH
  13. インストールに使用したパッケージを削除する
    cd ../
    rm -rf postfix-*
  14. インストールパスへ移動する
    cd $POSTFIX_HOME
  15. 不要ファイルを削除する
    rm -f conf/access
    rm -f conf/aliases
    rm -f conf/bounce.cf.default
    rm -f conf/canonical
    rm -f conf/generic
    rm -f conf/LICENSE
    rm -f conf/main.cf.default
    rm -f conf/main.cf.proto
    rm -f conf/makedefs.out
    rm -f conf/master.cf.proto
    rm -f conf/TLS_LICENSE
    rm -f conf/header_checks
    rm -f conf/relocated
    rm -f conf/transport
    rm -f conf/virtual
    rm -rf conf/dynamicmaps.cf*
    rm -rf conf/postfix-files.d
    1. HTMLが不要なら削除する
      rm -rf html
    2. readmeが不要なら削除する
      rm -rf readme
  16. メールスプール(メールの保存場所)として使用するディレクトリを作成する
    インストール時に指定したパスか、変更する場合は新たなパスを指定する。
    ただし、各ユーザのホームディレクトリにメールを保存する場合は不要。
    mkdir -p /usr/local/data/mail
  17. Postfixユーザで使用するディレクトリのオーナー、権限変更
    chown -R postfix:postfix /usr/local/postfix*
    chown root:root $POSTFIX_HOME/queue
    chown -R root:root $POSTFIX_HOME/queue/pid
    chown -R root:root $POSTFIX_HOME/conf
    chown -R root:root $POSTFIX_HOME/lib
    chown postfix:postfix /usr/local/data/mail
    chown postfix:postdrop $POSTFIX_HOME/bin/postqueue
    chown postfix:postdrop $POSTFIX_HOME/bin/postdrop
    chown postfix:postdrop $POSTFIX_HOME/queue/public
    chown postfix:postdrop $POSTFIX_HOME/queue/maildrop
    chmod 2755 $POSTFIX_HOME/bin/postqueue
    chmod 2755 $POSTFIX_HOME/bin/postdrop
  18. 初期設定ファイルを作成する
    パラメータ”compatibility_level”設定は無くても問題ないが、”2″に設定しないと不要なログが出力されるので設定した方が良い。
    cat > conf/main.cf << EOT
    compatibility_level = 2
    EOT
  19. Postfixを起動する
    1. 起動コマンドを実行する
      postfix start
      既存のパッケージ版Postfixを何らかの理由で残したまま新しく今回構築した場合、次のようなエラーが出力される可能性がある。
      postfix/postfix-script: warning: /usr/lib/sendmail and /usr/sbin/sendmail differ
      postfix/postfix-script: warning: Replace one by a symbolic link to the other
      この場合、次を実行する。
      rm -rf /usr/lib/sendmail
      ln -s /usr/local/postfix/bin/sendmail /usr/lib/sendmail
    2. 正常起動確認
      postfix -v status
      次のようなエラーがでる場合、設定に問題がある
      postfix: fatal:~~
      • 出力
        [root@postfix1 ~]# postfix -v status
        postfix: name_mask: ipv4
        postfix: name_mask: subnet
        postfix: inet_addr_local: configured 2 IPv4 addresses
        postfix: been_here: 127.0.0.0/8: 0
        postfix: been_here: 192.168.0.0/24: 0
        postfix: mynetworks: 127.0.0.0/8 192.168.0.0/24
        postfix/postfix-script: the Postfix mail system is running: PID: XXXXX
  20. メール送信テストを行う
    ※本サーバが直接インターネット通信が可能な場合のみ有効
    ※メールを送信するために送信ホストのIPアドレス(インターネット経由の場合はグローバルアドレス)がDNS解決できる必要がある。
    1. メールを送信する
      • ローカルにメールを送る場合
        telnet localhost 25
        MAIL FROM:test@example.com
        RCPT TO:root@[127.0.0.1]
        DATA
        test mail
        .
        quit
      • インターネットにメールを送る場合
        メールアドレスを修正して以下実行する。送信元メールアドレスのドメインは正しいものにする必要があるが、アカウント名は何でも良い。
        telnet localhost 25
        MAIL FROM:<送信元メールアドレス>
        RCPT TO:<宛先メールアドレス>
        DATA
        test mail
        .
        quit
    2. 送信が完了したことを確認する
      mailq
    3. 宛先メールアドレスにメールが届いていることを確認する
      • ローカルにメールを送った場合
        cat /usr/local/data/mail/root/new/*
        # パスを変更しなかった場合のデフォルトのメール保存場所
        # cat /var/spool/mail/root/new/*
    4. 停止する
      postfix stop
  21. systemd登録を行う
    postfixコマンド、systemctlコマンドでPostfixを停止する場合は、それぞれ同じコマンドで起動した場合にしかできないので注意。
    1. サービスファイルを作成する
      cat > /etc/systemd/system/postfix.service << EOT
      [Unit]
      Description = Postfix Mail Transport Agent
      After=syslog.target network.target
      Conflicts=sendmail.service exim.service
      
      [Service]
      ExecStart=/usr/local/postfix/bin/postfix start
      ExecReload=/usr/local/postfix/bin/postfix reload
      ExecStop=/usr/local/postfix/bin/postfix stop
      Restart = always
      Type = simple
      PIDFile = /usr/local/postfix/queue/pid/master.pid
      
      [Install]
      WantedBy = multi-user.target
      EOT
    2. サービスを有効化する
      systemctl enable postfix
    3. サービスが有効化されていることを確認する
      systemctl list-unit-files --type service --no-pager | grep postfix
    4. サービスを起動する
      systemctl start postfix
    5. 起動状態を確認する
      systemctl status postfix -l
      問題があった場合、次のコマンドでログを確認する。
      journalctl -u postfix --no-pager
    6. サービスを停止する
      systemctl stop postfix

Postfix設定

設定変更後、以下のコマンドで設定ファイルの妥当性確認を行うことができる。

postfix check

設定の反映は次のコマンドで行う

postfix reload

or

service postfix restart

 

main.cf

メインの設定ファイル
http://www.postfix.org/postconf.5.html

vi $POSTFIX_HOME/conf/main.cf

 

記法

標準的に以下のように記述する。

<設定項目> = <値>


設定値の欄において括弧の意味は以下。

 

パラメータのコピー

値には”$項目名”の形式で他のパラメータの値を利用可能である。例えば

A = 100
B = $A

とすることで、設定項目BにはAと同じく「100」が代入される。

複数列挙

値は” “で区切ることで、複数の値を設定可能である。
” “の前後に空白を入れてもよい。

三項演算

ある設定値を条件として2種類の設定値を設定することができる。
例えば、下記の場合、

B = ${{$A} < {1} ? {yes} : {no}}

他のパラメータAの値が1未満であればBには”yes”を、1以上であればBには”no”を設定可能である。

コメント

コメントは行頭に#を付ける。

標準設定一覧

次のコマンドで確認可能

postconf -d

 

設定ファイルの記述誤りの確認

次のコマンドを実行すると設定ファイルに記述ミスがないか確認可能。
設定は反映していなくても設定ファイルに記載するだけでチェックできる。

postfix -v status


問題がある場合、次のように表示される。

postfix: fatal: /usr/local/postfix-X.X.X/conf/main.cf, line X:~~~

 

データベースについて

Postfixはアクセス制御やアドレス書き換え、コンテンツフィルタリングのための情報の管理にデータベースを利用する。
各設定のデフォルトではローカルにファイルとして利用するが、外部のRDBMSやLDAPサーバを利用することも可能である。
具体的なPostfixのサブプログラムとしては、データベースを利用するのはnewaliasesコマンドやpostaliasコマンド、postmapコマンドである。
これらのコマンドでデータベースを更新した場合でもPostfixのリロードは不要である。

設定中でのデータベースの指定方法


設定中でデータベースを指定する場合、次のような書式で記述する。

<設定項目> = <データベースタイプ>:<データベースパス>

データベースパスではデータベースタイプに応じて付与される拡張子は指定しない。
対応するデータベースタイプによってファイル読み取り時に自動的に拡張子が付与される。

データベースタイプ


一般的には以下のタイプに対応している。
自環境で対応しているデータベースタイプを確認する場合、次のコマンドを実行する。

postconf -m

 

btree


ソートされたバランス木構造である。
Berkeley DBをサポートしたシステムでのみ使える。
データベースはファイル名の末尾に”.db”が付与される。

cdb


A read-optimized structure with no support for incremental updates. Database files are created with the postmap(1) or postalias(1) command.
データベースはファイル名の末尾に”.cdb”が付与される。

cidr


A table that associates values with Classless Inter-Domain Routing (CIDR) patterns. The table format is described in cidr_table(5).
値が Classless Inter-Domain Routing (CIDR) パターンに関連付いている テーブル。テーブルの書式は cidr_table(5) に記述されています。


dbm


ハッシュインデックスを用いたデータベース。
“.dir”、”.pag”ファイルの2種類で構成され、テーブル名はこれらを除いたものとなる。
Postfixの標準的なデータベース。環境によってdbmデータベースかhashデータベースかのいずれかが対応しており、そちらがデフォルトのタイプとなる。

environ


The UNIX process environment array. The lookup key is the variable name. The lookup table name in “environ:table” is ignored.
UNIX プロセス環境配列。検索キーは変数名です。”environ:table” の 検索テーブル名は無視されます。

fail


A table that reliably fails all requests. The lookup table name is used for logging only. This table exists to simplify Postfix error tests.


hash


ハッシュインデックスを用いたデータベース。
Postfixの標準的なデータベース。環境によってdbmデータベースかhashデータベースかのいずれかが対応しており、そちらがデフォルトのタイプとなる。
データベースはファイル名の末尾に”.db”が付与される。

inline


A non-shared, in-memory lookup table. Example: “inline:{ key=value, { key = text with whitespace or comma }}”. Key-value pairs are separated by whitespace or comma; whitespace after “{” and before “}” is ignored. Inline tables eliminate the need to create a database file for just a few fixed elements. See also the static: map type.
読み取り専用。

internal


Postfixのプロセス内部で生成・保持するインメモリーデータベース。
プロセス終了時にデータは失われる。

lmdb


OpenLDAP LMDB database. This is available only on systems with support for LMDB databases. Public database files are created with the postmap(1) or postalias(1) command, and private databases are maintained by Postfix daemons.
データベースはファイル名の末尾に”.lmdb”が付与される。

ldap


LDAPサーバにデータを保存する。
使用方法は次のコマンドで確認する。

man ldap_table

読み取り専用。

memcache


Memcacheサーバにデータを保存する。
使用方法は次のコマンドで確認する。

man memcache_table 

 

mysql


MySQLサーバにデータを保存する。
使用方法は次のコマンドで確認する。

man mysql_table

 

netinfo


Netinfo database client.
読み取り専用。

nis


NIS database client.
読み取り専用。

nisplus


NIS+ database client. Configuration details are given in nisplus_table(5).
読み取り専用。

pcre


A lookup table based on Perl Compatible Regular Expressions. The file format is described in pcre_table(5). The lookup table name as used in “pcre:table” is the name of the regular expression file.
読み取り専用。

Perl 互換正規表現に基づく検索テーブル。ファイルの書式は pcre_table(5) に記述されています。 “pcre:table” で使われる検索テーブル名は 正規表現ファイルの名前です。

pipemap


A pipeline of lookup tables. Example: “pipemap:{type1:name1, …, typen:namen}”. Each “pipemap:” query is given to the first table. Each lookup result becomes the query for the next table in the pipeline, and the last table produces the final result. When any table lookup produces no result, the pipeline produces no result. The first and last characters of the “pipemap:” table name must be “{” and “}”. Within these, individual maps are separated with comma or whitespace.
読み取り専用。

pgsql


PostgreSQLサーバにデータを保存する。
使用方法は次のコマンドで確認する。

man pgsql_table

読み取り専用。

proxy


Postfix proxymap(8) client for shared access to Postfix databases. The lookup table name syntax is “proxy:type:table”.

randmap


An in-memory table that performs random selection. Example: “randmap:{result1. …, resultn}”. Each table query returns a random choice from the specified results. The first and last characters of the “randmap:” table name must be “{” and “}”. Within these, individual maps are separated with comma or whitespace.
読み取り専用。

regexp


A lookup table based on regular expressions. The file format is described in regexp_table(5). The lookup table name as used in “regexp:table” is the name of the regular expression file.
読み取り専用。

正規表現に基づく検索テーブル。ファイルの書式は regexp_table(5) に記述されています。 “regexp:table” で使われる検索テーブル名は 正規表現ファイルの名前です。

sdbm


An indexed file type based on hashing. This is available only on systems with support for SDBM databases. Public database files are created with the postmap(1) or postalias(1) command, and private databases are maintained by Postfix daemons.
データベースは2種類のファイルで構成され、それぞれファイル名の末尾に”.dir”、”.pag”が付与される。

socketmap


Sendmail-style socketmap client. The name of the table is either inet:host:port:name for a TCP/IP server, or unix:pathname:name for a UNIX-domain server. See socketmap_table(5) for details.
読み取り専用。

sqlite


SQLite database. Configuration details are given in sqlite_table(5).
読み取り専用。

static


読み取り専用。
検索結果として常に検索テーブル名を返す。
例えば、検索テーブル “static:foobar” は常に検索結果として “foobar” を返す。
テーブル名に空白を含む場合、次のように記述する。

"static:{ text with whitespace }"

 

tcp


TCP/IP client. The protocol is described in tcp_table(5). The lookup table name is “tcp:host:port” where “host” specifies a symbolic hostname or a numeric IP address, and “port” specifies a symbolic service name or a numeric port number.
TCP/IP サーバを使って情報にアクセスします。プロトコルは tcp_table(5) に 記述されています。検索テーブル名は “tcp:host:port” で、”host” には ホストのシンボル名または数値の IP アドレスを、”port” にはサービスの シンボル名または数値のポート番号を指定します。このプロトコルは Postfix バージョン 2.1 では使えません。

texthash


A table that produces similar results as hash: files, except that you don’t have to run the postmap(1) command before you can use the file, and that texthash: does not detect changes after the file is read. The lookup table name is “texthash:filename”, where the file name is taken literally; no suffix is appended.
読み取り専用。

unionmap


A table that sends each query to multiple lookup tables and that concatenates all found results, separated by comma. The table name syntax is the same as for pipemap tables.
読み取り専用。

unix


UNIX認証データベースを利用する。
以下のいずれかを指定する。
読み取り専用。

 




基本設定



各種パス



mail_spool_directory


全ユーザ共通の受信メールの保存パス(スプール)。
設定値の最後が”/”で終わるとMaildir形式となり、
そうでない場合はMailbox形式でメールが保存される。
パラメータ”home_mailbox”を指定した場合は、ここで指定したディレクトリでなく、各ユーザのホームディレクトリ下の指定のパスに保存される。

 

 

command_directory


実行ファイルのパス

 

 

config_directory


設定ファイルのパス

 

 

data_directory


Postfix実行時に利用するキャッシュや乱数などの一時データを保存するパス

 

 

html_directory


HTMLドキュメントが配置されているパス

 

 

mailq_path


mailqプログラムのパス

 

 

manpage_directory


manドキュメントが配置されているパス

 

 

meta_directory


Postfixインスタンスを多重起動させる際の設定ファイルのパス

 

 

newaliases_path


newaliasesプログラムのパス

 

 

queue_directory


メールキューのファイルを保存するパス

 

 

readme_directory


readmeドキュメントが配置されているパス

 

 

sample_directory


設定ファイルのサンプルのインストールパスであった。
現バージョンでは既に廃止されており、意味をなさない。
なお、ソースコードアーカイブ中にもサンプルファイルは存在しない。

 

 

sendmail_path


sendmailプログラムのパス

 

 

shlib_directory


共有ライブラリファイルのパス

 

 

サービス名

 

bounce_service_name


配送に失敗したメールの記録や通知を行うbounceサービスの名前。

 

 

cleanup_service_name


アドレス書き換えを行うcleanupサービスの名前。
アドレス書き換えにはcanonical系とvirtual系がある。

 

 

connection_cache_service_name


scacheサービスの名前

 

 

defer_service_name


deferサービスの名前


 

 

dnsblog_service_name


dnsblogサービスの名前


 

 

error_service_name


errorサービスの名前

 

 

flush_service_name


flushサービスの名前


 

 

pickup_service_name


pickupサービスの名前


 

 

proxymap_service_name


proxymapサービスの名前


 



proxywrite_service_name


proxywriteサービスの名前


 

 

queue_service_name


qmgrサービスの名前


 

 

rewrite_service_name


rewriteサービスの名前


 

 

showq_service_name


showqサービスの名前


 

 

smtpd_service_name


smtpdサービスの名前


 

 

tlsmgr_service_name


tlsmgrサービスの名前


 

 

tlsproxy_service_name


tlsproxyサービスの名前


 

 

trace_service_name


traceサービスの名前


 

 

ネットワーク



inet_protocols


使用するネットワーク層プロトコル

 

 

inet_interfaces


接続を受け付けるネットワークインタフェース。

 

 

mydestination


ローカル配送されるドメインのリスト

 



mydomain


このPostfixが構成するメールシステムのインターネットにおけるドメイン名

 

 

myhostname


このPostfixが構成するメールシステムのインターネットにおけるホスト名

 



mynetworks


信頼されたネットワークアドレスのリスト

 



mynetworks_style


パラメータ”mynetworks”が設定されていない場合のデフォルト値。

 

 

myorigin


ドメイン名を指定し、外部向けのメールは指定のドメインから送信するものとして扱われ、ローカルから発信されたメールは指定のドメインのメールサーバから発信される。

 

 

parent_domain_matches_subdomains


親ドメインがあるパラメータに設定されている場合、そのドメインのサブドメインもそのパラメータの適用を受けるようにする、パラメータのリスト。

 

 

tcp_windowsize


Postfixが使用すべきTCPウインドウサイズを指定する。
未指定の場合、OSが自動で設定する。

 

 

proxy_interfaces


Postfixが受信することができる、プロキシやネットワークアドレス変換を行うノードを指定する

 



Postfix

 

mail_name


メールシステムの名前。
Received:ヘッダ、SMTP greeting banner、バウンスメールで用いられる。

 

 

mail_release_date


現Postfixのリリース日

 

 

mail_version


現Postfixのバージョン

 





mail_owner


Postfixの各子プロセス、ファイル群の所有者のユーザ名。
ここで指定したユーザを別途作成しておく必要がある。
デフォルトの場合、「postfix」ユーザが使用されるが、ソースインストールの場合は自分で作成しておく。
なお、Postfixの各子プロセスはmasterプロセスから生成されるが、masterプロセス自身はrootユーザで動作する。
また、rootユーザ以外ではPostfixは起動させられない。
この設定を変更する際、Postfixを停止してから実行しないと停止時に自動で削除される”$POSTFIX_HOME/data/./master.lock”ファイルが削除されずに、次回起動時にエラーとなる。その場合、手動で削除する必要がある。
この設定を変更した場合、次のコマンドでファイルの所有者を変更しておく必要がある。

postfix set-permissions

 

 

compatibility_level


以前のバージョンのPostfixからパラメータのデフォルト値が変更されている場合に変更前の値を使用するかどうかを設定する。
設定は<互換性レベル>を整数により行うが、数値が直接バージョンを表しているわけではなく、どのレベルでどのパラメータに影響が出るかは確認が必要である。
確認方法は以下。

postconf -d | grep \$compatibility_level
# 出力例
# [root@postfix ~]# postconf -d | grep \$compatibility_level
# append_dot_mydomain = ${{$compatibility_level} < {1} ? {yes} : {no}}
# mynetworks_style = ${{$compatibility_level} < {2} ? {subnet} : {host}}
# relay_domains = ${{$compatibility_level} < {2} ? {$mydestination} : {}}

 

 



message_size_limit


エンベロープ部分を含む、Postfixが扱える最大メールサイズ。

 



master_service_disable


特定のサービスや特定の通信方法を使用不可にする。

 

 

process_id


Postfixコマンド、デーモンプロセスのプロセスID

 



process_id_directory


パラメータ”queue_directory”からのPostfix PIDファイルの相対位置。
読み取り専用パラメータ。



process_name


Postfixコマンド、デーモンプロセスのプロセス名。

 

 

setgid_group


Postfixコマンド、グループ書き込み可能なPostfix関連ディレクトリの所有グループ名。
このパラメータの値を変更したら、以下を実行する必要がある(オーナー変更も行われる)

postfix set-permissions

 

 



ログ

 

syslog_facility


syslogのfacility名

 



syslog_name


ログ出力において各実行プログラムの名前の前に付加される文字列。
次のようなフォーマットで出力されるが、”postfix-script”がログを出力したプログラム名、その前の”postfix”が本パラメータで設定した値である。

Jun 22 19:01:45 postfix postfix/postfix-script[1498]: starting the Postfix mail system

Syslogは通常他のプログラムとログが混在するので、Postfixの識別子として利用できる。

 

 

debug_peer_level


ログの詳細レベル


※ソースコードを確認

grep msg_verbose ~/postfix-*/*/*/* 2>&1 | egrep -v "grep|html|man|Binary" | sed "s/\s\+/ /g" | uniq | egrep ":.*[0-9]"

 



debug_peer_list


パラメータ”debug_peer_level”で設定したログレベルを有効化する接続ホストのリスト。
ここで指定したホストとの接続に関するログのみ詳細度が適用される。

 

 

delay_logging_resolution_limit


ログに小数点以下の数値を記載する際の小数点以下の最大の桁数。
指定以下の値は0に切り捨てられる。

 

 

destination_concurrency_feedback_debug


メール送信の多重度に関するログを詳細に出力するかどうか。
詳細に出力することで、パフォーマンス分析に役立てられる。

参考:http://www.postfix.org/SCHEDULER_README.html

 

 

enable_long_queue_ids


キューIDに再使用されない長い文字列の使用を許可する。
これによってログ中のキューIDが一意に保たれ、ログファイルの解析が容易になる。

 

 

helpful_warnings


設定に問題がある場合、ログに警告共に推奨情報を記録する。


 

 

メール送信全般



VERP

 

verp_delimiter_filter


VERP(Variable envelope return path)を使用する際の区切り文字として受け付ける文字を指定する。

 

 

default_verp_delimiters


明示的に指定されなかった場合に使用されるデフォルトのVERP区切り文字。
パラメータ”verp_delimiter_filter”で指定された文字しか利用できない。

 

 

disable_verp_bounces


VERPを使用して複数の宛先を持つメールを送り、複数の宛先が配送不能であった場合、バウンスメールを1通にまとめて送信元に送り返すか、各々のメールアドレス用のバウンスメールを生成して送り返すかを設定する。

 



smtpd_authorized_verp_clients


VERPを使用するために使用するsmtpのサブコマンド”XVERP”を使用すること許可するクライアントを指定する。

 



エラー

 

bounce_queue_lifetime


メールを送信失敗した際に、再送のためキューに保存する期間。

 



配送方法

 

default_transport


デフォルトで使用する配送方法を指定する。
ただし、以下で設定したパラメータに該当する宛先の場合、対応した配送方法が使用される。


また、パラメータ”sender_dependent_default_transport_maps”によって宛先毎に個別に配送方法を指定できる。


 



sender_dependent_default_transport_maps


エンベロープの送信元アドレスによってトランスポートを割り当てるための設定が保存されたデータベース。
このデータベースに該当する場合、パラメータ”default_transport”で指定されたデフォルトの配送方法を使用しない。
データベースに該当しない場合、またはデータベースを指定していない場合はデフォルトの配送方法が使用される。

 

 

empty_address_default_transport_maps_lookup_key


宛先アドレスが空の場合、パラメータ”sender_dependent_default_transport_maps”にて検索する代わりの文字列を指定する

 

 

defer_transports


最初の配送要求があっても配送を行わず一旦キューに溜める。
その後キューの再配送(postqueue -f等)を明示的に実行することで送信する。

 

 

アドレスマスカレード

 

masquerade_classes



 



masquerade_domains



 



masquerade_exceptions



 

 

その他

 

allow_untrusted_routing = no


信頼されていないホストからのsender-specified routingを使用したメール転送を拒否する。
パラメータ「mynetworks」、「relay_domains」にて設定された「信頼された」ホストからの転送要求は行われる。

 



default_delivery_slot_cost


メール送信時にあるメールをキュー内で送信待機中の他のメールの前に割り込ますことができる頻度。

 



default_delivery_slot_discount


送信キュー割り込み関連

 



default_delivery_slot_loan


送信キュー割り込み関連

 

 

ignore_mx_lookup_error


MXレコードをDNS解決できなかった際に、代わりにAレコードを用いるかどうか。
この設定を無効にした場合は、一定時間後に再度MXレコードを問い合わせる。

 



resolve_null_domain


ドメインパートが指定されていないメールの配送要求があった際、そのメールがPostfix自身のローカルホスト宛のメールとして処理する。

 

 

undisclosed_recipients_header


メッセージにToまたはCcメッセージヘッダがない場合にcleanupプログラムにより挿入されるメッセージヘッダ。

 




メール受信全般

 

ローカル配送


ローカル配送時に宛先ユーザ変換、マッピング、プログラムの実行などが各パラメータで可能である。
その際の優先順位は以下である。上記のもの程、先に実行される。

  1. エイリアス関連パラメータ
  2. .forwardファイル
  3. パラメータmailbox_transport_maps
  4. パラメータmailbox_transport
  5. パラメータmailbox_command_maps
  6. パラメータmailbox_command
  7. パラメータhome_mailbox
  8. パラメータmail_spool_directory
  9. パラメータfallback_transport_maps
  10. パラメータfallback_transport
  11. パラメータluser_relay

 

default_privs


ローカル配送の際に使用されるユーザ。
ローカル配送時に外部プログラムを実行する場合はその権限もこのパラメータで指定できる。
特権ユーザやPostfixの所有者を指定してはいけない。

 

 

command_execution_directory


localプログラムがメール配送時に動作するディレクトリのパス

 

 

 

execution_directory_expansion_filter


パラメータ”command_execution_directory”で変数展開する際に展開後使用可能な文字を指定する。
ここで使用されなかった文字が使用された場合は”_”(アンダースコア)で置き換えれられる。

 



mailbox_transport


ローカル配送する際に使用する配送方法を一括指定する。
ここで指定した配送方法によりローカル配送がおこなわれるので、Postfix自身はローカル配送を行わない。

 

 

mailbox_transport_maps


ローカル配送する際に使用する配送方法を受信者毎に指定するためのデータベース。
ここで指定した配送方法によりローカル配送がおこなわれるので、Postfix自身はローカル配送を行わない。

 

 

mailbox_command


メールをローカル配送する際に実行する全宛先アカウント共通のコマンド。
コマンドは配送先のユーザ権限で動作する。
ただし、root宛のメールはパラメータdefault_privsのユーザ権限で実行される。
ローカル配送の優先度の関係で、別名が設定されていた場合、その別名のユーザで実行されることになる。

 

 

mailbox_command_maps


メールをローカル配送する際に実行する宛先アカウント毎のコマンド。
コマンドは配送先のユーザ権限で動作する。
ローカル配送の優先度の関係で、別名が設定されていた場合、その別名のユーザで実行されることになる。

 

 

home_mailbox


受信したメールを保存するパス。
ユーザのホームディレクトリからの相対パスで指定する。

 

 

fallback_transport


ローカルに配送先ユーザが見つからない場合の配送方法を一括指定する。
ここで指定した配送方法によりローカル配送がおこなわれるので、Postfix自身はローカル配送を行わない。

 



fallback_transport_maps


ローカルに配送先ユーザが見つからない場合の配送方法を受信者毎に指定するためのデータベース。
ここで指定した配送方法によりローカル配送がおこなわれるので、Postfix自身はローカル配送を行わない。

 

 

luser_relay


受信したメールがローカル配送不能となった場合の通知先メールアドレス。

 

 

 

mailbox_delivery_lock


ローカル配送を行う前にメールボックスをロックする方法。
メールディレクトリ形式を使用している場合はこの設定は無視され、ロックは行われない。

利用可能なロック方式は次のコマンドで確認できる。

 

 

 

 

 

 

command_expansion_filter


パラメータmailbox_commandでの環境変数展開後の値に含むことができる文字を指定する。
ここで設定された文字以外の文字はアンダースコア(_)で置き換えられる。

 

 

command_time_limit


pipeコマンドが外部プログラムに配送を委譲するまでの制限時間。

 

 

mailbox_size_limit


メールボックスまたはメールディレクトリの最大サイズ。
メールディレクトリの場合、このディレクトリに書き込まれるメールファイルだけでなく、あらゆるファイルの合計がメールディレクトリのサイズとして扱われる。

 

 

forward_path


ローカル配送の際に.forwardファイルを見つけるために検索するパスのリスト。
最初に見つかったファイルが使われる。

 

 

forward_expansion_filter


パラメータ”forward_path”で変数を使用する際に変数の展開結果として使用可能な文字セット。
ここで指定されなかった文字はアンダースコアに変換される。

 

 

pipe_delivery_status_filter


外部プログラムによるメール配送結果のステータスを変換するルールを保存したデータベースを指定する。

 



local_command_shell



 



local_delivery_slot_cost



 



local_delivery_slot_discount



 



local_delivery_slot_loan



 



local_delivery_status_filter


ローカルメール配送結果のステータスを変換するルールを保存したデータベースを指定する。

 

 

 

local_destination_concurrency_failed_cohort_limit


localトランスポートを使用した際に、何度転送先への接続に失敗したら当該接続先が接続不能状態であると判断するか。
内部でカウンタを持ち、接続に連続して失敗するたびにカウンタが増加し、途中接続に成功するとカウンタがリセットされる。

 



local_destination_concurrency_limit


localトランスポートで配送する際に同一の宛先へ同時に配送できる上限。

 



local_destination_concurrency_negative_feedback


localトランスポートを使用した場合に、配送先へ接続に成功した際、ここで設定した値をその配送先の同時接続可能数から減らす。
同時接続可能数は0まで減ることはない。

 

 

local_destination_concurrency_positive_feedback


localトランスポートを使用した場合に、配送先へ接続に成功した際、ここで設定した値をその配送先の同時接続可能数に加算する。
同時接続可能数は最大でもパラメータ”local_destination_recipient_limit”の値までしか増えない。

 



local_destination_rate_delay


localトランスポートを使用した場合に、同一の接続先サーバにおいて、配送が一度完了した後に連続して配送する場合、すぐに配送をせずにどの程度の時間待機するかを設定する。

 



local_destination_recipient_limit


localトランスポートを使用した場合に、同一ドメインに対し、並列して送れるメールの数。
ただし、同じ宛先ユーザのメールは1配送として扱われる。

 



local_extra_recipient_limit


localトランスポートを使用した場合に、メールキューに割り込みメールが入った際に使用される、メモリの予備領域のメール保存可能件数。

 

 

local_header_rewrite_clients



 



local_initial_destination_concurrency



 



local_minimum_delivery_slots



 



local_recipient_limit


localトランスポートを使用した場合に、メモリ内に保持できる受信者メールアドレス情報の数。

 



local_recipient_maps



 



local_recipient_refill_delay


localトランスポートを使用し、メール配送の際に全ての受信者情報を一度にメモリ上に展開できない場合に、次の受信者情報を追加読み出しするまでの待機時間。

 



local_recipient_refill_limit


localトランスポートを使用し、メール配送の際に全ての受信者情報を一度にメモリ上に展開できない場合に、一度に追加読み出しできる受信者情報の上限数。

 



local_transport



 



local_transport_rate_delay


localトランスポートを使用した場合に、同一内容のメールを複数の宛先に配送する際にそれぞれの配送間に設ける待機時間を設定する。

 

 

allow_mail_to_files


ローカル配送プログラム”local”がローカルへメール配信時に使用できるコマンドを指定する

 

 

allow_mail_to_files


ローカル配送プログラム”local”がローカルへメール配信時に使用できるファイルを指定する。
allow_mail_to_filesと同じ設定値にする。

 

 

require_home_directory


ローカル配送を行う際に受信者のホームディレクトリが存在しているかどうかをチェックするかどうか。
この機能を有効にし、ホームディレクトリがなかった場合の挙動は不明。

 

 

strict_mailbox_ownership


ローカル配送で、メールボックスのオーナーが配送先のユーザと異なれば、メールの配送を遅延させる。

 



エラー

 

2bounce_notice_recipient


バウンスメールを送り返せなかったときに通知するローカルユーザの名前。
パラメータ「notify_classes」のエラークラス「2bounce」を有効にした際に利用される。

 

 

best_mx_transport


“mail loops back to myself”エラーが検出された際のメールの転送先。
このエラーは自ドメイン宛のメールアドレスを受信したものの、そのドメインをローカル配送する設定が$mydestination等でされていないため、ローカル転送できず、かといって転送もできないときに発生する。


 



bounce_template_file


バウンスメールで使用するテンプレート。
デフォルトのものがサンプルとして本環境では下記にインストールされているので記法を参考にできる。

$POSTFIX_HOME/conf/bounce.cf.default

これ自体を変更してもデフォルトのテンプレートを変更することにはならない。

 

 

reject_tempfail_action


一時的なエラーにより処理できない場合のPostfixのメール受信処理方法を指定する。
より細かな処理は以下のパラメータで可能

 

 



unknown_address_tempfail_action


パラメータ”smtpd_helo_restrictions”の値が”reject_unknown_sender_domain”、”reject_unknown_recipient_domain”である時に、一時的なエラーでメールを受信できない場合の処理方法

 

 

unknown_helo_hostname_tempfail_action


パラメータ”smtpd_helo_restrictions”の値が”reject_unknown_helo_hostname”である時に、一時的なエラーでメールを受信できない場合の処理方法

 



show_user_unknown_table_name


受信メールの該当ユーザが見つからず、”User unknown”エラーメッセージを返す際、ユーザ一覧情報を記載して返すかどうか。
問題解決には有用であるが、セキュリティの点で危険である。また、無用な負荷をかけることになる。

 

 

soft_bounce


バウンスメールを返す際、すぐに返さずにキューに一旦格納するかどうか。
ただし、有効にした場合、アドレス書き換えやルーティングに誤りがあっても対処されない。
また、エラーコードが5xx系から4xx系に変換される。

 





検査

 

body_checks


受信したメールのメール本文の検査を行うルールを記述したデータベースを指定する

 

 

body_checks_size_limit


受信したメールのメール本文の最大サイズ。

 

 

header_address_token_limit


受信したメールのヘッダに記述できる、送信、受信者のメールアドレスの数。
この数を超えると超えた分のアドレス情報が破棄される。

 



header_checks


受信したメールのメールヘッダの検査を行うルールを記述したデータベースを指定する。
ただし、MIME関連のヘッダ(MIME-Version、Content-Type、Content-Transfer-Encoding)の検査はパラメータmime_header_checksに設定したデータベースにて行う。
また、添付されたメールの検査も行わず、こちらはパラメータnested_header_checksに設定したデータベースにて行う。

 



header_size_limit


受信したメールのメールヘッダの最大サイズ。
この数を超えると超えた分の情報が破棄される。

 





nested_header_checks


受信したメールの添付されたメールのメールヘッダの検査を行うルールを記述したデータベースを指定する。

 



default_rbl_reply


PostfixにSMTP接続があった際、RBL(Real-time Blackhole List)を参照して該当していれば接続を拒絶するが、その時の応答内容のテンプレートを設定する。
パラメータ”rbl_reply_maps”に該当する特定設定があれば、そちらが上書きして適用される。

 

 

 

rbl_reply_maps


RBLを使用したSMTP接続拒否を行う際に返す応答内容のテンプレート内で使用できるデータベース。
パラメータ”default_rbl_reply”で設定した値を上書きする。

 

 

internal_mail_filter_classes


Postfixが内部で生成したメールを配送キューに入れる前に検査を受ける種類。
内部で生成したメールを検査することは推奨されておらず、警告が出る場合がある。

 

 

receive_override_options


メール受信時の受信者メールアドレス検証、Postfix内のフィルタリング機能によるフィルタリング、アドレスマッピングを有効または無効にする。
このパラメータで設定する内容は通常は設定ファイル”master.cf”のsmtpd、qmqpd、pickupの項目で設定されるものである。
“master.cf”に設定がある場合、このパラメータのもので上書きされる。



 

remote_header_rewrite_domain


不完全なドメインパートを持つリモートからのメールに対し付加するドメイン名

 




relocated_maps


存在しなくなったユーザや、登録情報が変更されたユーザの情報を登録するデータベース。

 

 

strict_7bit_headers


メッセージヘッダに8ビットテキストを持つメールを拒否する。
これは不完全に書かれたアプリケーションからのメールをブロックする。

 



strict_8bitmime


パラメータ”strict_7bit_headers”と”strict_8bitmime_body”の両者を有効にするかどうか。
正当なEメールを拒否する可能性があるため、この機能を一般的な目的のメールサーバで有効にすべきではない。

 



strict_8bitmime_body


8 ビット MIME コンテンツエンコード情報のない8ビットメッセージ本体テキストを拒否する。
これは不完全に書かれたアプリケーションからのメールをブロックする。
ただし、これは有効な8ビットMIMEメールを含んだmajordomo承認要求も拒否してしまう。

 

 

strict_mime_encoding_domain


message/* または multipart/* MIME コンテンツタイプに対して無効な Content-Transfer-Encoding: 情報を持つメールを拒否する。
これは不完全に書かれたアプリケーションからのメールをブロックする。
一回違反した後のメールを拒否してしまうため、この機能を一般的な目的のメールサーバで有効にすべきではない。

 



strict_rfc821_envelopes


SMTP MAIL FROMおよびRCPT TOコマンドで受け取るアドレスが <> で括られていて、そのアドレスがRFC 822形式のコメントやフレーズが含まれていないことを要求するかどうか。
これは不完全に書かれたアプリケーションからのメールをブロックする。

 



strict_smtputf8



 



書き換え

 

enable_original_recipient


ヘッダ”X-Original-To”を有効にするかどうか。
ヘッダ”X-Original-To”とはメールが別の宛先アドレスに変更して転送された際に、元々の宛先アドレスを格納する。
複数の受信者のメールボックスが存在する場合には有効でなければならない。

 

 

prepend_delivered_header


メールの配送先のアドレスを記載するヘッダ”Delivered-To”をローカル配送時に付加する場合を指定する。

 

 

recipient_canonical_classes


パラメータ”recipient_canonical_maps”による変換対象となるアドレス記載部分を指定する。

 



recipient_canonical_maps


エンベロープとヘッダにある受信者アドレスに対するアドレス変換データベースを指定する。
エンベロープアドレス、ヘッダアドレスのいずれか、またはその両方を変換対象にするかはパラメータ”recipient_canonical_classes”により指定する。
無効にする場合はこのパラメータを空にする。

 



propagate_unmatched_extensions


検索キーで拡張メールアドレスを指定した場合、検索結果の文字列が拡張メールアドレスの適用を受けていなければ、検索キーの拡張メールアドレスに置換することができる。
その置換処理をする場合を指定する。

 

 

recipient_bcc_maps


メール受信時に自動でBCCに付加するメールアドレスのデータベース。
受信者アドレスを検索キーとする。

 

 

resolve_dequoted_address


メールアドレスをRFC822に基づいた処理をせずに安全性に配慮したアドレス変換を行うかどうか。
この設定を有効にした場合、アドレス変換は不完全になるが、リレー攻撃を防ぐなどセキュリティは向上する。

 

 

sender_bcc_maps


メールを受信した際、特定のメールアドレスが送信者である場合にBCCに付加するメールアドレスのデータベース。

 



swap_bangpath


“site!user”から”user@site”への書き換えを有効にする。
これはマシンがUUCP(Unix to Unix Copy Protocol)ネットワークに接続されている場合に必要です。

 



その他



biff


biffコマンドによりメールを受信した際に通知する設定をしているユーザがいる場合、通知を許可するかどうか。
標準でbiffがそもそもインストールされていない場合もあり、その場合はnoで良い。

 

 

 

hopcount_limit


受信したメールにあるReceived:の最大許容数。
この値を超えるとループが発生しているとみなしてバウンスメールを返す。

 

 

recipient_delimiter


ユーザ名と拡張アドレス (user+foo) の間の区切文字

 

 

owner_request_special


メールアドレスのローカルパートが”owner-listname”、”listname-request”となっているものをパラメータ”recipient_delimiter”の値が”-“となっていても影響を受けないようにする。
メーリングリストでこの機能は有用である。

 

 

send_cyrus_sasl_authzid


リモートのSMTP、LMTPサーバを認証する際に、SASL authoriZation ID (authzid)を送るかどうか。

 

 

sun_mailtool_compatibility


古いSUN mailtool互換機能を有効にするか。
この機能を使わずに代わりにパラメータ”mailbox_delivery_lock”に”dotlock”を設定するべき。

 





メール送受信全般

 

書き換え

 

local_header_rewrite_clients


不完全なドメインパートを持つローカルからのメールに対しドメイン名を付加することができる。
ここで指定したクライアントをローカルクライアントとし、そこから送信要求のあったメールのヘッダを置き換える。
実際の置き換え内容は別のパラメータで指定する。
ローカルクライアント以外のクライアントはリモートクライアントとし、remote_header_rewrite_domainパラメータで設定した内容のみ置き換える。

 



 

always_add_missing_headers


メール送信時に”From:”、”To:”、”Date:”、”Message-ID”がない場合、自動で生成、挿入する。
これはパラメータ「local_header_rewrite_clients」で指定されたローカルクライアントからの転送要求のみしか行わない。

 

 

append_at_myorigin


ローカルからメール送信された際、”@”とドメインパートがない場合、これを補う。
これはパラメータ「local_header_rewrite_clients」で指定されたローカルクライアントからの転送要求のみしか行わない。

append_dot_mydomain


ローカルからメール送信された際、ドメインパートが一部しか記載されていなければ、これを置き換える。
これはパラメータ「local_header_rewrite_clients」で指定されたローカルクライアントからの転送要求のみしか行わない。

 

 

remote_header_rewrite_domain


リモートからメール送信された際、ドメインパートが不完全であれば、これを置き換える。
これはパラメータ「local_header_rewrite_clients」で指定されたローカルクライアント以外のリモートクライアントからの転送要求のみしか行わない。

 




allow_percent_hack


メールアドレスの”@”が”%”で記されていた場合”@”に書き換える。

always_bcc =


転送するすべてのメールのBCCに指定したメールアドレスを付加する。



canonical_classes


送受信したメールの、変換するメールアドレスを指定する。
変換内容、または変換を行わない場合はパラメータ”canonical_maps”にて設定を行う。


 



canonical_maps


送受信したメールの、変換するメールアドレスの変更内容を記載したデータベースを指定する。

 

 

sender_canonical_classes


パラメータ”sender_canonical_maps”の適用を受ける、送受信したメールの、変換する送信者メールアドレスを指定する。
変換内容、または変換を行わない場合はパラメータ”sender_canonical_maps”にて設定を行う。

 



sender_canonical_maps


送受信したメールの、変換するメールアドレスの変更内容を記載したデータベースを指定する。
この設定による処理はパラメータ”canonical_maps”による同様の変換処理の前に行われる。

 




default_delivery_status_filter


メール配送結果のステータスを変換するルールを保存したデータベースを指定する。
特定の場合のみ有効な以下の他のフィルターがあれば、そちらの設定が優先される。

 

 

 

empty_address_recipient


宛先メールアドレスが空であった場合に設定される受信者名

 

 

message_drop_headers


メールのヘッダ部から削除されるヘッダの名前

 



message_reject_characters


メール中に現れるとそのメールを拒否する文字。
C言語風エスケープシーケンスが認識する。
例: \a \b \f \n \r \t \v \ddd (最大3桁の8進数) \\

 

 

message_strip_characters


メール中に現れるとPostfixが除去する文字。
C言語風エスケープシーケンスが認識する。
例: \a \b \f \n \r \t \v \ddd (最大3桁の8進数) \\

 



resolve_numeric_domain


ドメインパートにIPアドレスを指定する場合は [] 内にIPアドレスを記載する必要があるが、この機能が有効な場合は [] がなくてもエラーとせずに [] があるように処理する。

 



エラー



bounce_notice_recipient


Postfixが送受信に失敗したメールのヘッダを通知するローカルのメールボックスのユーザ。
パラメータnotify_classesでbounceを有効にしないと通知されない。

 

 

bounce_size_limit


配送に失敗したメールを通知する際に、そのメールのコピーを添付する最大サイズ。

 



MIME

 

detect_8bit_encoding_header


ヘッダ”Content-Transfer-Encoding”の値を見て8bit指定があるかどうかを確認する。
このオプションは無効にできない。

 

 

disable_mime_input_processing


MIME処理を無効にする。
無効にした場合、MIMEヘッダは本文として扱われる。

 



disable_mime_output_conversion


配送先が8bit MIMEを無効にしている場合は通常7bit MIMEに変換するが、これを行わないようにする。

 

 

mime_header_checks


受信したメールのMIME関連のメールヘッダの検査を行うルールを記述したデータベースを指定する。
MIME関連以外のヘッダの検査はパラメータheader_checksに設定したデータベースにて行う。

 



mime_nesting_limit


受信したメールのMIME処理においてネストした添付メールの最大ネスト数。
この値を超えたメールは破棄される。

 



mime_boundary_length_limit


MIMEマルチパート部分の最大長。

 

 

notify_classes


管理者に通知されるエラーの種別のリスト。

 

 

SMTPUTF8


メールアドレスにUTF8を使用することができるようになる、SMTPUTF8の設定

smtputf8_autodetect_classes



 



smtputf8_enable



 




その他



allow_min_user


メールアドレスの先頭が”-“で始まることを許可するかどうか。
一般的に”-“で始まるメールアドレスは無効であり、ミスである可能性が高い。


content_filter


メールがキューに入ってから行うフィルタリングのサービス名。
パラメータ”access”、”header_checks”、”body_checks”によるフィルタリングの後に行われることになる。
なお、キューに入る前に行うフィルタリングはSMTP配送に限り、パラメータ”smtpd_proxy_filter”似て行うことができる。

 

 

default_filter_nexthop


パラメータ”content_filter”が未設定である場合に使用されるデフォルト値。

 



deliver_lock_attempts


mailboxファイルやbounceサービスのログファイルの排他ロックを獲得する最大試行回数

 



deliver_lock_delay


mailboxファイルやbounceサービスのログファイルの排他ロックを獲得できなかった場合に次に獲得しようとするまでの待機時間

 

 

enable_idna2003_compatibility


過去の国際化ドメイン名規格IDNA2003との互換性を維持するかどうか。
無効にした場合、最新の規格IDNA2008のみが使用可能となる。
参考:https://jprs.co.jp/idn/std.html

 

 

transport_maps


受信者アドレスをキーにして次の転送先サーバを指定するデータベース

 






エイリアス


受信したメールをローカル配送する際に利用するユーザ名の別名データベース。
自ドメイン向けの、指定した名前のユーザ宛のメールを受信すると設定したユーザのメールとして保存する。

alias_maps


ローカル配送で使用するエイリアス用のデータベースの種類とパスを指定する。

 

 

alias_database


エイリアス用のデータベースを更新するコマンドを実行した際に更新されるデータベースファイルのパス。
エイリアスを使用したローカル配送にはパラメータ”alias_maps”が使用されるので、そちらと合わせておけばよい。

 



expand_owner_alias


owner aliasを持つエイリアス宛のメールを受信した際、エンベロープ送信者アドレスに対応するowner aliasのメールアドレスを設定する。

 

 

frozen_delivered_to


メールの実際の届け先を表すDelivered-Toヘッダはローカル配送の開始時点で付加されるが、そのあと書き換えを行わないようにするかどうか。
例えば、エイリアスが設定されている場合や.forwardファイルで転送される場合は書き換えが行われるが、この設定を有効にしていると元のアドレスのままになる。

 

 

reset_owner_alias


特殊扱いされるエイリアス、”owner-alias”エイリアスに更にエイリアスをネストして設定している際に、多段変換後のエイリアスデータが”owner-alias”エイリアス情報を持っていない場合に変換を行わないようにするかどうか。

 



メールアドレス検証


Postfixではメールのルーティングの際に宛先、送信元のメールアドレスが有効かどうかを検証し、無効であれば、ルーティングを行わないという機能を利用できる。
この検証はルーティングの際に送られる次の転送先メールサーバに「MAIL FROM」、「RCPT TO」コマンドを発行し、正常に完了するかどうかで行う。
ローカル配送で完了する場合は自身に向けて検証を行う。
この検証結果はデータベースにキャッシュし、送受信の際に当該メールアドレスが有効か無効かをそのデータベースより取得することもできる。
メールサーバによってはメールアドレスが無効であっても本文を入力して転送実行がされるまでエラーを返さないものがあったり、実際の転送は行わない接続を行うと接続元ホスト(自ホスト)をブラックリストに載せたりする場合があるので、メールアドレス検証を使用するかどうかは注意が必要である。
検証はverifyコマンドで行われる。

address_verify_cache_cleanup_interval



 

 

address_verify_default_transport



 



address_verify_local_transport



 



address_verify_map



 



address_verify_negative_cache



 



address_verify_negative_expire_time



 



address_verify_negative_refresh_time



 



address_verify_pending_request_limit



 



address_verify_poll_count



 



address_verify_poll_delay



 



address_verify_positive_expire_time



 



address_verify_positive_refresh_time



 



address_verify_relay_transport



 



address_verify_relayhost



 



address_verify_sender



 



address_verify_sender_dependent_default_transport_maps



 



address_verify_sender_dependent_relayhost_maps



 



address_verify_sender_ttl



 






address_verify_transport_maps



 



address_verify_virtual_transport



 






セキュリティ

 

anvilプログラム関連

 

anvil_rate_time_unit


anvilのプログラムで統計情報の計算に用いられる時間の単位。

 

 

anvil_status_update_time


anvilのプログラムが統計情報を更新する間隔

 

 

その他

 

authorized_flush_users


postqueueコマンドによりキューのフラッシュ(キュー内のメールの配送開始・再試行)を行うことができるユーザのリストが保存されたデータベースを指定する。

 

 

authorized_mailq_users


キューの内容の閲覧を行えるユーザのリストが保存されたデータベースを指定する。
キューの内容の閲覧は以下のコマンドなどで行える。

postqueue -p

or

mailq

 

 

 

authorized_submit_users


Postfixのコマンドからメール送信を行えるユーザのリストが保存されたデータベースを指定する。
対象となるコマンドはpostdropとsendmail。

 





メールフィルタ

 

postscreen

 

postscreen_access_list



 



postscreen_bare_newline_action



 



postscreen_bare_newline_enable



 



postscreen_bare_newline_ttl



 



postscreen_blacklist_action



 



postscreen_cache_cleanup_interval



 



postscreen_cache_map



 



postscreen_cache_retention_time



 



postscreen_client_connection_count_limit



 



postscreen_command_count_limit



 



postscreen_command_filter



 



postscreen_command_time_limit



 



postscreen_disable_vrfy_command



 



postscreen_discard_ehlo_keyword_address_maps



 



postscreen_discard_ehlo_keywords



 



postscreen_dnsbl_action



 



postscreen_dnsbl_max_ttl



 



postscreen_dnsbl_min_ttl



 



postscreen_dnsbl_reply_map



 



postscreen_dnsbl_sites



 



postscreen_dnsbl_threshold



 



postscreen_dnsbl_timeout



 



postscreen_dnsbl_whitelist_threshold



 



postscreen_enforce_tls



 



postscreen_expansion_filter



 



postscreen_forbidden_commands



 



postscreen_greet_action



 



postscreen_greet_banner



 



postscreen_greet_ttl



 



postscreen_greet_wait



 



postscreen_helo_required



 



postscreen_non_smtp_command_action



 



postscreen_non_smtp_command_enable



 



postscreen_non_smtp_command_ttl



 



postscreen_pipelining_action



 



postscreen_pipelining_enable



 



postscreen_pipelining_ttl



 



postscreen_post_queue_limit



 



postscreen_pre_queue_limit



 



postscreen_reject_footer



 



postscreen_tls_security_level



 



postscreen_upstream_proxy_protocol



 



postscreen_upstream_proxy_timeout



 



postscreen_use_tls



 



postscreen_watchdog_timeout



 



postscreen_whitelist_interfaces



 

 

Milter


Milterとはメールフィルタ機能のことで、ウイルスチェックやスパムメールチェックを行える

milter_command_timeout



 



milter_connect_macros



 



milter_connect_timeout



 



milter_content_timeout



 



milter_data_macros



 



milter_default_action



 



milter_end_of_data_macros



 



milter_end_of_header_macros



 



milter_header_checks



 



milter_helo_macros



 



milter_macro_daemon_name



 



milter_macro_defaults



 



milter_macro_v



 



milter_mail_macros



 



milter_protocol



 



milter_rcpt_macros



 



milter_unknown_command_macros



 



non_smtpd_milters



 






パフォーマンス

 

application_event_drain_time


postkickプログラムが他のプログラムにリクエストを送る際のタイムアウト時間。

 



daemon_timeout


1つの子プロセスの最大動作時間。
一般的に1接続の最大使用可能時間として利用される。
ただし、通常は他のパラメータにより、より短い時間に制限される。

 



default_destination_concurrency_limit


同一の宛先へ同時に配送できる上限。
この設定値はデフォルトとして扱われ、各転送方法における個別の設定値を<トランスポート>_destination_concurrency_limitの各パラメータで設定する。

 



default_destination_concurrency_negative_feedback


配送先へ接続に成功した際、ここで設定した値をその配送先の同時接続可能数から減らす。
同時接続可能数は0まで減ることはない。
この設定値はデフォルトとして扱われ、各転送方法における個別の設定値を<トランスポート>_destination_concurrency_negative_feedbackの各パラメータで設定する。

 



default_destination_concurrency_positive_feedback


配送先へ接続に成功した際、ここで設定した値をその配送先の同時接続可能数に加算する。
同時接続可能数は最大でもパラメータ”XXX_destination_recipient_limit”(XXXはトランスポート)の値までしか増えない。
この設定値はデフォルトとして扱われ、各転送方法における個別の設定値を<トランスポート>_destination_concurrency_positive_feedbackの各パラメータで設定する。

 



default_destination_rate_delay


同一の接続先サーバにおいて、配送が一度完了した後に連続して配送する場合、すぐに配送をせずにどの程度の時間待機するかを設定する。
この設定値はデフォルトとして扱われ、各転送方法における個別の設定値を<トランスポート>_destination_rate_delayの各パラメータで設定する。

 



default_destination_recipient_limit


同一ドメインに対し、並列して送れるメールの数。
ただし、同じ宛先ユーザのメールは1配送として扱われる。
この設定値はデフォルトとして扱われ、各転送方法における個別の設定値を<トランスポート>_destination_recipient_limitの各パラメータで設定する。

 



default_extra_recipient_limit


メールキューに割り込みメールが入った際に使用される、メモリの予備領域のメール保存可能件数。
この設定値はデフォルトとして扱われ、各転送方法における個別の設定値を<トランスポート>_extra_recipient_limitの各パラメータで設定する。

 



default_minimum_delivery_slots


一度にキューから取り出して配送処理するメールの最低数。
つまり、ここで設定した値分処理するまで割り込みされることはなくなる。

 



default_process_limit


Postfixが生成する子プロセスの上限。
設定ファイルmaster.cfにて設定したプロセス数がこの値を超えた場合、master.cfの設定が優先される。

 



default_recipient_limit


メモリ内に保持できる受信者メールアドレス情報の数。
この設定値はデフォルトとして扱われ、各転送方法における個別の設定値を<トランスポート>_recipient_limitの各パラメータで設定する。

 



default_recipient_refill_delay


メール配送の際に全ての受信者情報を一度にメモリ上に展開できない場合に、次の受信者情報を追加読み出しするまでの待機時間。
この設定値はデフォルトとして扱われ、各転送方法における個別の設定値を<トランスポート>_recipient_refill_delayの各パラメータで設定する。

 



default_recipient_refill_limit


メール配送の際に全ての受信者情報を一度にメモリ上に展開できない場合に、一度に追加読み出しできる受信者情報の上限数。
この設定値はデフォルトとして扱われ、各転送方法における個別の設定値を<トランスポート>_recipient_refill_limitの各パラメータで設定する。

 



default_transport_rate_delay


同一内容のメールを複数の宛先に配送する際にそれぞれの配送間に設ける待機時間を設定する。
この設定値はデフォルトとして扱われ、各転送方法における個別の設定値を<トランスポート>_transport_rate_delayの各パラメータで設定する。

 

 

duplicate_filter_limit


aliases、virtual、showq等の各プログラムでメールアドレスを展開する際に重複メールアドレスを排除するために展開したメールアドレスを記憶するが、その最大数。

 



default_destination_concurrency_failed_cohort_limit


何度転送先への接続に失敗したら当該接続先が接続不能状態であると判断するか。
内部でカウンタを持ち、接続に連続して失敗するたびにカウンタが増加し、途中接続に成功するとカウンタがリセットされる。
この設定値はデフォルトとして扱われ、各転送方法における個別の設定値を<トランスポート>_destination_concurrency_failed_cohort_limitの各パラメータで設定する。

 

 

fork_attempts


子プロセスを生成する際に失敗した場合、再試行する回数

 



fork_delay


子プロセスを生成する際に失敗した場合、再試行前に待機する時間

 

 

hash_queue_names


キュー管理用のディレクトリを作成する際に、内部にサブディレクトリを作成して分割して管理するキューの名前。
キューの分割はハッシュ化して行われる。

 



hash_queue_depth


パラメータ”hash_queue_names”で指定したサブディレクトリを作成するキューにおいて、そのサブディレクトリの深さ。
ディレクトリ階層が増えるにつれ、各ディレクトリ内のファイル数が減るのでディレクトリアクセスのパフォーマンスが向上する。
反面、Postfixの起動が遅くなる。

 

 

in_flow_delay


1秒あたりのメールの配送要求数がメール配送完了数を超えた場合に新たな配送要求を停止する時間。
パラメータ”default_process_limit”で指定した数、またはSMTPプロセス数を個別に設定した場合はその値分の配送要求をここで指定した時間内に受け取ることができるようになる。
例えば、default_process_limit=100、in_flow_delay=1の場合、毎秒最大100配送要求を受け取ることができる。

 




initial_destination_concurrency


同一宛先へメールを配送する際の並列処理できる最大値の初期値。

 

 

line_length_limit


Postfixとの通信において文字列を入力する際にここで指定した数より長い文字列は分割される。
ただし、転送時には再連結される。


 

 

max_idle


使用されていないPostfixの子プロセスが自動終了するまでの最大の待機時間。
キュー管理プロセスは自動終了しない。

 



max_use


Postfixの子プロセスは一定数の要求を受け取り後は自動終了するが、その最大要求数。
キュー管理プロセスやその他一部のプロセスはこの適用を受けない。

 

 

minimal_backoff_time


遅延メッセージの再配送を試行する最小の時間間隔。

 




maximal_backoff_time


遅延メッセージの再配送を試行する最大の時間間隔。
パラメータ”minimal_backoff_time”以上の値を指定しなければならない。

 



maximal_queue_lifetime


配送不能と判断するまでの、メールがキュー内で留置されている最大の時間。

 

 

service_throttle_time


Postfixのサーバプロセスの子プロセスが異常状態にあるとmasterプロセスが検知した際、新しくプロセスを生成するまでの待機時間。

 

 

stale_lock_time


メールボックス形式でのローカル配信で使用される、排他的ロックファイルが強制的に取り除かれるまでの時間。

 



stress


高負荷時に有効にすることで、各パラメータの許容値を緩やかにする。
このパラメータ自体に効果はなく、他のパラメータの一斉変更のために使用される。
参考:http://www.postfix.org/STRESS_README.html

 

 

transport_retry_time


Postfixキューマネージャが異常な状態にある配送を再試行させるまでの待機時間。

 



trigger_timeout


pickupやqmgrデーモンのようなPostfixデーモンにトリガーを送る制限時間。

 



クライアント間キャッシュ

 

connection_cache_protocol_timeout


Postfixに接続するクライアント間との通信におけるキャッシュを用いた接続の制限時間。

 



connection_cache_status_update_time


プログラム”scache”がキャッシュの情報をログに記録する時間間隔。
出力ログはsyslogである。

 

 

connection_cache_ttl_limit


Postfixに接続するクライアント間との通信における未使用のキャッシュの生存時間の最大値。
この時間を超える時間をTTLとして要求されると、強制的にこの設定時間に変更される。

 






IPC


外部プログラムとのプロセス間通信における各種制限時間の設定。
SMTPクライアントからの接続で、Postfixがサーバとなるプロセス間通信がある。
Postfixがクライアントとなる接続には例えば、アドレス解決やDBMS、LDAP等に接続する為にプロセス間通信がある。

ipc_idle


アイドル状態になったIPC接続を閉じるまでの時間。

 



ipc_timeout


使用中のIPC接続の利用制限時間。
この時間までに送受信が完了しなければ、何らかの問題が発生したとみなされて、強制終了される。
主にRDBMS接続のデッドロック対策として利用されるパラメータである。

 



ipc_ttl


PostfixにIPC接続したクライアントが接続を閉じた後、その接続をキャッシュしておく時間。

 






データベース

 

default_database_type


newaliasesコマンドやpostaliasコマンド、postmapコマンド等で利用するデータベースのデフォルト形式。
初期構築の後は変更できないので、変更する場合はすべてのデータベースを作り直さなければならない。

 

 

berkeley_db_create_buffer_size


データベースタイプbdb、btreeを作成する際のテーブルごとのI/Oバッファサイズ。

 

 

berkeley_db_read_buffer_size


データベースタイプbdb、btreeを読み込む際のテーブルごとのI/Oバッファサイズ。

 

 

lmdb_map_size


OpenLDAPをデータベースに使用している場合のLMDBの初期サイズ。
初期サイズに達した後は容量は2倍になる。

 

 

proxy_read_maps


データベースをパラメータに指定する際に、読み取り専用としてproxymapサービスを利用することができるパラメータのリスト。
proxymapサービスを利用する場合はデータベース名の接頭辞として”proxy:”を指定する。
proxymapサービスは例えば、Postfixがchroot制限を受けている場合、chroot制限を受けないようにしたproxymapサービスからchroot外の検索ファイルを読み取る為に使用したり、接続数制限があるデータベースシステムに複数のPostfixインスタンスからアクセスする場合に使用したりできる。

 



proxy_write_maps


データベースをパラメータに指定する際に、読み書き可能状態でproxymapサービスを利用することができるパラメータのリスト。
proxymapサービスを利用する場合はデータベース名の接頭辞として”proxy:”を指定する。
proxymapサービスは例えば、Postfixがchroot制限を受けている場合、chroot制限を受けないようにしたproxymapサービスからchroot外の検索ファイルを読み取る為に使用したり、接続数制限があるデータベースシステムに複数のPostfixインスタンスからアクセスする場合に使用したりできる。

 











バーチャルドメイン



virtual_alias_address_length_limit



 



virtual_alias_domains


バーチャルドメインと実ドメインとの関連付けを保存したデータベース

 



virtual_alias_expansion_limit



 



virtual_alias_maps


バーチャルメールアドレスのユーザと実在のローカルユーザ、または転送先アドレスの対応付けを保存したデータベース

 



virtual_alias_recursion_limit



 



virtual_delivery_slot_cost




 



virtual_delivery_slot_discount



 



virtual_delivery_slot_loan



 



virtual_delivery_status_filter


バーチャルメール配送結果のステータスを変換するルールを保存したデータベースを指定する。

 



virtual_destination_concurrency_failed_cohort_limit


virtualトランスポートを使用した際に、何度転送先への接続に失敗したら当該接続先が接続不能状態であると判断するか。
内部でカウンタを持ち、接続に連続して失敗するたびにカウンタが増加し、途中接続に成功するとカウンタがリセットされる。

 



virtual_destination_concurrency_limit


virtualトランスポートで配送する際に同一の宛先へ同時に配送できる上限。

 



virtual_destination_concurrency_negative_feedback


virtualトランスポートを使用した場合に、配送先へ接続に成功した際、ここで設定した値をその配送先の同時接続可能数から減らす。
同時接続可能数は0まで減ることはない。

 



virtual_destination_concurrency_positive_feedback


virtualトランスポートを使用した場合に、配送先へ接続に成功した際、ここで設定した値をその配送先の同時接続可能数に加算する。
同時接続可能数は最大でもパラメータ”virtual_destination_recipient_limit”の値までしか増えない。

 



virtual_destination_rate_delay


virtualトランスポートを使用した場合に、同一の接続先サーバにおいて、配送が一度完了した後に連続して配送する場合、すぐに配送をせずにどの程度の時間待機するかを設定する。

 



virtual_destination_recipient_limit


virtualトランスポートを使用した場合に、同一ドメインに対し、並列して送れるメールの数。
ただし、同じ宛先ユーザのメールは1配送として扱われる。

 



virtual_extra_recipient_limit


virtualトランスポートを使用した場合に、メールキューに割り込みメールが入った際に使用される、メモリの予備領域のメール保存可能件数。

 



virtual_gid_maps



 



virtual_initial_destination_concurrency



 



virtual_mailbox_base


バーチャルメールボックスの保存先のパス。
絶対パスで指定する。
通常の保存先と同じ場合は次で設定するとよい。

virtual_mailbox_base = $mail_spool_directory

 

 



virtual_mailbox_domains


バーチャルメールで使用するドメイン。
パラメータ”mydestination”と重複するドメインを記載した場合、mydestinationが優先されるので注意。


 



virtual_mailbox_limit



 



virtual_mailbox_lock



 



virtual_mailbox_maps


バーチャルメールと保存パスの対応付けデータを保存したデータベース。
パスの末尾が”/”で終了する場合はMaildir形式で保存され、そうでない場合はMailbox形式で保存される。

 



virtual_minimum_delivery_slots



 



virtual_minimum_uid



 



virtual_recipient_limit


virtualトランスポートを使用した場合に、メモリ内に保持できる受信者メールアドレス情報の数。

 



virtual_recipient_refill_delay


virtualトランスポートを使用し、メール配送の際に全ての受信者情報を一度にメモリ上に展開できない場合に、次の受信者情報を追加読み出しするまでの待機時間。

 




virtual_recipient_refill_limit


virtualトランスポートを使用し、メール配送の際に全ての受信者情報を一度にメモリ上に展開できない場合に、一度に追加読み出しできる受信者情報の上限数。

 



virtual_transport



 



virtual_transport_rate_delay


virtualトランスポートを使用した場合に、同一内容のメールを複数の宛先に配送する際にそれぞれの配送間に設ける待機時間を設定する。

 




virtual_uid_maps


バーチャルメールボックス使用時にメールファイルを書き込むユーザIDを保存したデータベース。
バーチャルメールアドレスのユーザと書き込みユーザのユーザIDとの対応付けを記録する。

 




LMTP

 

lmtp_address_preference



 



lmtp_address_verify_target



 



lmtp_assume_final



 



lmtp_bind_address



 



lmtp_bind_address6



 



lmtp_body_checks



 



lmtp_cname_overrides_servername



 



lmtp_connect_timeout



 



lmtp_connection_cache_destinations



 



lmtp_connection_cache_on_demand



 



lmtp_connection_cache_time_limit



 



lmtp_connection_reuse_count_limit



 



lmtp_connection_reuse_time_limit



 



lmtp_data_done_timeout



 



lmtp_data_init_timeout



 



lmtp_data_xfer_timeout



 



lmtp_defer_if_no_mx_address_found



 



lmtp_delivery_slot_cost



 



lmtp_delivery_slot_discount



 



lmtp_delivery_slot_loan



 



lmtp_delivery_status_filter


lmtpによるメール配送結果のステータスを変換するルールを保存したデータベースを指定する。

 



lmtp_destination_concurrency_failed_cohort_limit


lmtpトランスポートを使用した際に、何度転送先への接続に失敗したら当該接続先が接続不能状態であると判断するか。
内部でカウンタを持ち、接続に連続して失敗するたびにカウンタが増加し、途中接続に成功するとカウンタがリセットされる。

 



lmtp_destination_concurrency_limit


lmtpトランスポートで配送する際に同一の宛先へ同時に配送できる上限。

 



lmtp_destination_concurrency_negative_feedback


lmtpトランスポートを使用した場合に、配送先へ接続に成功した際、ここで設定した値をその配送先の同時接続可能数から減らす。
同時接続可能数は0まで減ることはない。

 



lmtp_destination_concurrency_positive_feedback


lmtpトランスポートを使用した場合に、配送先へ接続に成功した際、ここで設定した値をその配送先の同時接続可能数に加算する。
同時接続可能数は最大でもパラメータ”lmtp_destination_recipient_limit”の値までしか増えない。

 



lmtp_destination_rate_delay


lmtpトランスポートを使用した場合に、同一の接続先サーバにおいて、配送が一度完了した後に連続して配送する場合、すぐに配送をせずにどの程度の時間待機するかを設定する。

 



lmtp_destination_recipient_limit


lmtpトランスポートを使用した場合に、同一ドメインに対し、並列して送れるメールの数。
ただし、同じ宛先ユーザのメールは1配送として扱われる。

 



lmtp_discard_lhlo_keyword_address_maps



 



lmtp_discard_lhlo_keywords



 



lmtp_dns_reply_filter



 



lmtp_dns_resolver_options



 



lmtp_dns_support_level



 



lmtp_enforce_tls



 



lmtp_extra_recipient_limit


lmtpトランスポートを使用した場合に、メールキューに割り込みメールが入った際に使用される、メモリの予備領域のメール保存可能件数。

 



lmtp_fallback_relay



 



lmtp_generic_maps



 



lmtp_header_checks



 



lmtp_host_lookup



 



lmtp_initial_destination_concurrency



 



lmtp_lhlo_name



 



lmtp_lhlo_timeout



 



lmtp_line_length_limit



 



lmtp_mail_timeout



 



lmtp_mime_header_checks



 



lmtp_minimum_delivery_slots



 



lmtp_mx_address_limit



 



lmtp_mx_session_limit



 



lmtp_nested_header_checks



 



lmtp_per_record_deadline



 



lmtp_pix_workaround_delay_time



 



lmtp_pix_workaround_maps



 



lmtp_pix_workaround_threshold_time



 



lmtp_pix_workarounds



 



lmtp_quit_timeout



 



lmtp_quote_rfc821_envelope



 



lmtp_randomize_addresses



 



lmtp_rcpt_timeout



 



lmtp_recipient_limit


lmtpトランスポートを使用した場合に、メモリ内に保持できる受信者メールアドレス情報の数。

 



lmtp_recipient_refill_delay


lmtpトランスポートを使用し、メール配送の際に全ての受信者情報を一度にメモリ上に展開できない場合に、次の受信者情報を追加読み出しするまでの待機時間。

 



lmtp_recipient_refill_limit


lmtpトランスポートを使用し、メール配送の際に全ての受信者情報を一度にメモリ上に展開できない場合に、一度に追加読み出しできる受信者情報の上限数。

 



lmtp_reply_filter



 



lmtp_rset_timeout



 



lmtp_sasl_auth_cache_name



 



lmtp_sasl_auth_cache_time



 



lmtp_sasl_auth_enable



 



lmtp_sasl_auth_soft_bounce



 



lmtp_sasl_mechanism_filter



 



lmtp_sasl_password_maps



 



lmtp_sasl_path



 



lmtp_sasl_security_options



 



lmtp_sasl_tls_security_options



 



lmtp_sasl_tls_verified_security_options



 



lmtp_sasl_type



 



lmtp_send_dummy_mail_auth



 



lmtp_send_xforward_command



 



lmtp_sender_dependent_authentication



 



lmtp_skip_5xx_greeting



 



lmtp_skip_quit_response



 



lmtp_starttls_timeout



 



lmtp_tcp_port



 



lmtp_tls_CAfile



 



lmtp_tls_CApath



 



lmtp_tls_block_early_mail_reply



 



lmtp_tls_cert_file



 



lmtp_tls_ciphers



 



lmtp_tls_dcert_file



 



lmtp_tls_dkey_file



 



lmtp_tls_eccert_file



 



lmtp_tls_eckey_file



 



lmtp_tls_enforce_peername



 



lmtp_tls_exclude_ciphers



 



lmtp_tls_fingerprint_cert_match



 



lmtp_tls_fingerprint_digest



 



lmtp_tls_force_insecure_host_tlsa_lookup



 



lmtp_tls_key_file



 



lmtp_tls_loglevel



 



lmtp_tls_mandatory_ciphers



 



lmtp_tls_mandatory_exclude_ciphers



 



lmtp_tls_mandatory_protocols



 



lmtp_tls_note_starttls_offer



 



lmtp_tls_per_site



 



lmtp_tls_policy_maps



 



lmtp_tls_protocols



 



lmtp_tls_scert_verifydepth



 



lmtp_tls_secure_cert_match



 



lmtp_tls_security_level



 



lmtp_tls_session_cache_database



 



lmtp_tls_session_cache_timeout



 



lmtp_tls_trust_anchor_file



 



lmtp_tls_verify_cert_match



 



lmtp_tls_wrappermode



 



lmtp_transport_rate_delay


lmtpトランスポートを使用した場合に、同一内容のメールを複数の宛先に配送する際にそれぞれの配送間に設ける待機時間を設定する。

 



lmtp_use_tls



 



lmtp_xforward_timeout



 

 

キュー管理



qmgr_clog_warn_time



 



qmgr_daemon_timeout



 



qmgr_fudge_factor



 



qmgr_ipc_timeout



 



qmgr_message_active_limit



 



qmgr_message_recipient_limit



 



qmgr_message_recipient_minimum



 



queue_file_attribute_count_limit



 



queue_minfree



 



queue_run_delay


遅延メールを管理するdeferredキューがキューマネージャによってスキャンされる時間間隔。
パラメータ”minimal_backoff_time”以上の値を指定しなければならない。

 



delay_warning_time


配送が完了せずに一定時間キュー内にメールがとどまった場合に通知するまでの時間。

 




delay_notice_recipient


パラメータ”delay_warning_time”で指定した時間以内にキューから除去されなかったメールがあった場合に通知するユーザ名

 







SMTPコード変更

 

access_map_defer_code


[[SMTP>https://tools.ietf.org/html/rfc5321]により規定される、要求されたコマンドが負荷などで一時使用不能な時に返すコード番号を指定する。
他のSMTPサーバとずれるので、原則変更してはいけない。

 

 

access_map_reject_code


[[SMTP>https://tools.ietf.org/html/rfc5321]により規定される、現在サーバを使用できない時に返すコード番号を指定する。
他のSMTPサーバとずれるので、原則変更してはいけない。

 

 

defer_code


SMTPクライアントにメールボックスが一時使用不可状態であるエラーを応答する際のエラーコード。
通常450番である(https://tools.ietf.org/html/rfc5321)。

 



unknown_address_reject_code



 

 

unknown_client_reject_code



 



unknown_hostname_reject_code



 



unknown_local_recipient_reject_code



 



unknown_relay_recipient_reject_code



 



unknown_virtual_alias_reject_code



 



unknown_virtual_mailbox_reject_code



 



unverified_recipient_defer_code



 



unverified_recipient_reject_code



 



unverified_sender_defer_code



 



unverified_sender_reject_code



 



invalid_hostname_reject_code



 




maps_rbl_reject_code



 



multi_recipient_bounce_reject_code



 

 

non_fqdn_reject_code



 



plaintext_reject_code



 



reject_code



 



relay_domains_reject_code



 



postmulti

 

postmulti_control_commands



 



postmulti_start_commands



 



postmulti_stop_commands



 



multi_instance_directories



 



multi_instance_enable



 



multi_instance_group



 



multi_instance_name



 



multi_instance_wrapper



 



遅延再送

 

fast_flush_domains


メール転送が遅延している場合に、自動で再送を試みる宛先のリスト。
指定されなかった宛先のメールは手動で再送(フラッシュ)する必要がある。

 

 

fast_flush_purge_time


宛先ごとに作成される”fast flush”(自動再送)用の、再送後に空になったログファイルが削除されるまでの時間。

 



fast_flush_refresh_time


宛先ごとに作成される”fast flush”(自動再送)用のログに記録された遅延メールを再送する間隔。
既に再送が完了しており、ログの内容が空の場合はこの処理の対象から外される。


 

 

エラー再送

 

retry_delivery_slot_cost



 



retry_delivery_slot_discount



 



retry_delivery_slot_loan



 



retry_destination_concurrency_failed_cohort_limit



 



retry_destination_concurrency_limit


retryトランスポートで配送する際に同一の宛先へ同時に配送できる上限。

 



retry_destination_concurrency_negative_feedback


retryトランスポートを使用した場合に、配送先へ接続に成功した際、ここで設定した値をその配送先の同時接続可能数から減らす。
同時接続可能数は0まで減ることはない。

 



retry_destination_concurrency_positive_feedback


retryトランスポートを使用した場合に、配送先へ接続に成功した際、ここで設定した値をその配送先の同時接続可能数に加算する。
同時接続可能数は最大でもパラメータ”retry_destination_recipient_limit”の値までしか増えない。

 



retry_destination_rate_delay


retryトランスポートを使用した場合に、同一の接続先サーバにおいて、配送が一度完了した後に連続して配送する場合、すぐに配送をせずにどの程度の時間待機するかを設定する。

 



retry_destination_recipient_limit


retryトランスポートを使用した場合に、同一ドメインに対し、並列して送れるメールの数。
ただし、同じ宛先ユーザのメールは1配送として扱われる。

 



retry_extra_recipient_limit


retryトランスポートを使用した場合に、メールキューに割り込みメールが入った際に使用される、メモリの予備領域のメール保存可能件数。

 



retry_initial_destination_concurrency



 



retry_minimum_delivery_slots



 



retry_recipient_limit


retryトランスポートを使用した場合に、メモリ内に保持できる受信者メールアドレス情報の数。

 



retry_recipient_refill_delay


retryトランスポートを使用し、メール配送の際に全ての受信者情報を一度にメモリ上に展開できない場合に、次の受信者情報を追加読み出しするまでの待機時間。

 



retry_recipient_refill_limit


retryトランスポートを使用し、メール配送の際に全ての受信者情報を一度にメモリ上に展開できない場合に、一度に追加読み出しできる受信者情報の上限数。

 



retry_transport_rate_delay


retryトランスポートを使用した場合に、同一内容のメールを複数の宛先に配送する際にそれぞれの配送間に設ける待機時間を設定する。

 





TLS全般



openssl_path



 




tls_append_default_CA



 



tls_daemon_random_bytes



 



tls_dane_digest_agility



 



tls_dane_digests



 



tls_dane_trust_anchor_digest_enable



 



tls_disable_workarounds



 



tls_eecdh_auto_curves



 



tls_eecdh_strong_curve



 



tls_eecdh_ultra_curve



 



tls_export_cipherlist



 



tls_high_cipherlist



 



tls_legacy_public_key_fingerprints



 



tls_low_cipherlist



 



tls_medium_cipherlist



 



tls_null_cipherlist



 



tls_preempt_cipherlist



 



tls_random_bytes



 



tls_random_exchange_name



 



tls_random_prng_update_period



 



tls_random_reseed_period



 



tls_random_source



 



tls_session_ticket_cipher



 



tls_ssl_options



 



tls_wildcard_matches_multiple_labels



 




tlsproxy_enforce_tls



 





tlsproxy_tls_CAfile



 



tlsproxy_tls_CApath



 



tlsproxy_tls_always_issue_session_ids



 



tlsproxy_tls_ask_ccert



 



tlsproxy_tls_ccert_verifydepth



 



tlsproxy_tls_cert_file



 



tlsproxy_tls_ciphers



 



tlsproxy_tls_dcert_file



 



tlsproxy_tls_dh1024_param_file



 



tlsproxy_tls_dh512_param_file



 



tlsproxy_tls_dkey_file



 



tlsproxy_tls_eccert_file



 



tlsproxy_tls_eckey_file



 



tlsproxy_tls_eecdh_grade



 



tlsproxy_tls_exclude_ciphers



 



tlsproxy_tls_fingerprint_digest



 



tlsproxy_tls_key_file



 



tlsproxy_tls_loglevel



 



tlsproxy_tls_mandatory_ciphers



 



tlsproxy_tls_mandatory_exclude_ciphers



 



tlsproxy_tls_mandatory_protocols



 



tlsproxy_tls_protocols



 



tlsproxy_tls_req_ccert



 



tlsproxy_tls_security_level



 



tlsproxy_use_tls



 



tlsproxy_watchdog_timeout



 






SMTPクライアント





smtp_address_preference



 



smtp_address_verify_target



 



smtp_always_send_ehlo


SMTPセッションの最初に、常にEHLOを送るかどうか。
送らない場合は、接続サーバのグリーティングバナーに”ESMTP”という単語が現れたときのみEHLOを送る。

 



smtp_bind_address



 



smtp_bind_address6



 



smtp_body_checks



 



smtp_cname_overrides_servername



 



smtp_connect_timeout



 



smtp_connection_cache_destinations



 



smtp_connection_cache_on_demand



 



smtp_connection_cache_time_limit



 



smtp_connection_reuse_count_limit



 



smtp_connection_reuse_time_limit



 



smtp_data_done_timeout



 



smtp_data_init_timeout



 



smtp_data_xfer_timeout



 



smtp_defer_if_no_mx_address_found



 



smtp_delivery_slot_cost



 



smtp_delivery_slot_discount



 



smtp_delivery_slot_loan



 



smtp_delivery_status_filter


smtpによるメール配送結果のステータスを変換するルールを保存したデータベースを指定する。

 



smtp_destination_concurrency_failed_cohort_limit



 



smtp_destination_concurrency_limit


smtpトランスポートで配送する際に同一の宛先へ同時に配送できる上限。

 



smtp_destination_concurrency_negative_feedback


smtpトランスポートを使用した場合に、配送先へ接続に成功した際、ここで設定した値をその配送先の同時接続可能数から減らす。
同時接続可能数は0まで減ることはない。

 



smtp_destination_concurrency_positive_feedback


smtpトランスポートを使用した場合に、配送先へ接続に成功した際、ここで設定した値をその配送先の同時接続可能数に加算する。
同時接続可能数は最大でもパラメータ”smtp_destination_recipient_limit”の値までしか増えない。

 



smtp_destination_rate_delay


smtpトランスポートを使用した場合に、同一の接続先サーバにおいて、配送が一度完了した後に連続して配送する場合、すぐに配送をせずにどの程度の時間待機するかを設定する。

 



smtp_destination_recipient_limit


smtpトランスポートを使用した場合に、同一ドメインに対し、並列して送れるメールの数。
ただし、同じ宛先ユーザのメールは1配送として扱われる。

 



smtp_discard_ehlo_keyword_address_maps



 



smtp_discard_ehlo_keywords



 



smtp_dns_reply_filter



 



smtp_dns_resolver_options



 



smtp_dns_support_level



 



smtp_enforce_tls



 



smtp_extra_recipient_limit


smtpトランスポートを使用した場合に、メールキューに割り込みメールが入った際に使用される、メモリの予備領域のメール保存可能件数。

 



smtp_fallback_relay



 



smtp_generic_maps



 



smtp_header_checks



 



smtp_helo_name



 



smtp_helo_timeout



 



smtp_host_lookup



 



smtp_initial_destination_concurrency



 



smtp_line_length_limit



 



smtp_mail_timeout



 



smtp_mime_header_checks



 



smtp_minimum_delivery_slots



 



smtp_mx_address_limit



 



smtp_mx_session_limit



 



smtp_nested_header_checks



 



smtp_never_send_ehlo



 



smtp_per_record_deadline



 



smtp_pix_workaround_delay_time



 



smtp_pix_workaround_maps



 



smtp_pix_workaround_threshold_time



 



smtp_pix_workarounds



 



smtp_quit_timeout



 



smtp_quote_rfc821_envelope



 



smtp_randomize_addresses



 



smtp_rcpt_timeout



 



smtp_recipient_limit


smtpトランスポートを使用した場合に、メモリ内に保持できる受信者メールアドレス情報の数。

 



smtp_recipient_refill_delay


smtpトランスポートを使用し、メール配送の際に全ての受信者情報を一度にメモリ上に展開できない場合に、次の受信者情報を追加読み出しするまでの待機時間。

 



smtp_recipient_refill_limit


smtpトランスポートを使用し、メール配送の際に全ての受信者情報を一度にメモリ上に展開できない場合に、一度に追加読み出しできる受信者情報の上限数。

 



smtp_reply_filter



 



smtp_rset_timeout



 



smtp_sasl_auth_cache_name



 



smtp_sasl_auth_cache_time



 



smtp_sasl_auth_enable



 



smtp_sasl_auth_soft_bounce



 



smtp_sasl_mechanism_filter



 



smtp_sasl_password_maps



 



smtp_sasl_path



 



smtp_sasl_security_options



 



smtp_sasl_tls_security_options



 



smtp_sasl_tls_verified_security_options



 



smtp_sasl_type



 



smtp_send_dummy_mail_auth



 



smtp_send_xforward_command



 



smtp_sender_dependent_authentication



 



smtp_skip_5xx_greeting



 



smtp_skip_quit_response



 



smtp_starttls_timeout



 



smtp_tcp_port



 



smtp_tls_CAfile



 



smtp_tls_CApath



 



smtp_tls_block_early_mail_reply



 



smtp_tls_cert_file



 



smtp_tls_ciphers



 



smtp_tls_dane_insecure_mx_policy



 



smtp_tls_dcert_file



 



smtp_tls_dkey_file



 



smtp_tls_eccert_file



 



smtp_tls_eckey_file



 



smtp_tls_enforce_peername



 



smtp_tls_exclude_ciphers



 



smtp_tls_fingerprint_cert_match



 



smtp_tls_fingerprint_digest



 



smtp_tls_force_insecure_host_tlsa_lookup



 



smtp_tls_key_file



 



smtp_tls_loglevel



 



smtp_tls_mandatory_ciphers



 



smtp_tls_mandatory_exclude_ciphers



 



smtp_tls_mandatory_protocols



 



smtp_tls_note_starttls_offer



 



smtp_tls_per_site



 



smtp_tls_policy_maps



 



smtp_tls_protocols



 



smtp_tls_scert_verifydepth



 



smtp_tls_secure_cert_match



 



smtp_tls_security_level



 



smtp_tls_session_cache_database



 



smtp_tls_session_cache_timeout



 



smtp_tls_trust_anchor_file



 



smtp_tls_verify_cert_match



 



smtp_tls_wrappermode



 



smtp_transport_rate_delay


smtpトランスポートを使用した場合に、同一内容のメールを複数の宛先に配送する際にそれぞれの配送間に設ける待機時間を設定する。

 



smtp_use_tls



 



smtp_xforward_timeout



 




disable_dns_lookups


SMTPクライアント、LMTPクライアントとして動作するとき、配送のためにDNS解決を行うことを禁止する。
このオプションを有効にすると/etc/hosts内に記載したドメインしか解決できなくなる。

 





SMTPサーバ




smtpd_authorized_xclient_hosts



 



smtpd_authorized_xforward_hosts



 



smtpd_banner



 



smtpd_client_auth_rate_limit



 



smtpd_client_connection_count_limit



 



smtpd_client_connection_rate_limit



 



smtpd_client_event_limit_exceptions



 



smtpd_client_message_rate_limit



 



smtpd_client_new_tls_session_rate_limit



 



smtpd_client_port_logging



 



smtpd_client_recipient_rate_limit



 



smtpd_client_restrictions


サーバに接続可能なクライアントの制限を指定する。

 

 

relay_clientcerts


パラメータ”smtpd_client_restrictions”で”permit_tls_clientcerts”の値を設定した際にチェックするSMTPクライアントの証明書のデータベース。

 



smtpd_command_filter



 



smtpd_data_restrictions



 



smtpd_delay_open_until_valid_rcpt



 



smtpd_delay_reject



 



smtpd_discard_ehlo_keyword_address_maps



 



smtpd_discard_ehlo_keywords



 



smtpd_dns_reply_filter



 



smtpd_end_of_data_restrictions



 



smtpd_enforce_tls


TLS接続を必須とするかどうかを指定する。
必須とする場合、他のメールサーバからメールを受信できなくなる可能性があるので注意。
今後はパラメータ”smtpd_tls_security_level”を使用するべきである。

 



smtpd_error_sleep_time



 



smtpd_etrn_restrictions



 



smtpd_expansion_filter



 



smtpd_forbidden_commands



 



smtpd_hard_error_limit



 



smtpd_helo_required



 



smtpd_helo_restrictions



 



smtpd_history_flush_threshold



 



smtpd_junk_command_limit



 



smtpd_log_access_permit_actions



 



smtpd_milter_maps



 



smtpd_milters



 



smtpd_noop_commands



 



smtpd_null_access_lookup_key



 



smtpd_peername_lookup



 



smtpd_per_record_deadline



 



smtpd_policy_service_default_action



 



smtpd_policy_service_max_idle



 



smtpd_policy_service_max_ttl



 



smtpd_policy_service_policy_context



 



smtpd_policy_service_request_limit



 



smtpd_policy_service_retry_delay



 



smtpd_policy_service_timeout



 



smtpd_policy_service_try_limit



 



smtpd_proxy_ehlo



 



smtpd_proxy_filter



 



smtpd_proxy_options



 



smtpd_proxy_timeout



 



smtpd_recipient_limit



 



smtpd_recipient_overshoot_limit



 



smtpd_recipient_restrictions


宛先(RCPT TO)に記載できる内容の制限を指定する。
複数記載した場合は前から評価され、マッチした時点で以降の評価は行われない。

 

 

permit_mx_backup_networks


パラメータ”smtpd_recipient_restrictions”で”permit_mx_backup”が指定されている場合、指定のドメインのプライマリーメールサーバのみにSMTPアクセスを許可するようにする。

 



smtpd_reject_footer



 



smtpd_reject_unlisted_recipient



 



smtpd_reject_unlisted_sender



 



smtpd_relay_restrictions



 



smtpd_restriction_classes



 



smtpd_sasl_auth_enable



 



smtpd_sasl_authenticated_header


ReceivedメッセージヘッダにSASLログイン名を記載するかどうか。

 



smtpd_sasl_exceptions_networks


SASL認証を不要とするネットワーク。

 



smtpd_sasl_local_domain


ローカルでのSASL認証時に使用されるレルム名。

 



smtpd_sasl_path


SASL認証を行うプラグインのパス。
Postfixキューディレクトリのパスの相対パスとして記述する。

 



smtpd_sasl_security_options


SASLを使用するにあたってのセキュリティオプション





smtpd_sasl_service


SASLを利用するプログラム名

 



smtpd_sasl_tls_security_options



 



smtpd_sasl_type



 



smtpd_sender_login_maps



 



smtpd_sender_restrictions


メールを転送する際に指定された送信者に対して何らかの制約を行う。
例えば、特定の送信者のメールを拒否することができる。

 





unverified_recipient_reject_reason


パラメータ”smtpd_sender_restrictions”で”reject_unverified_recipient”を設定していることによりメールが拒否された場合に通知する内容。

 



unverified_recipient_tempfail_action


パラメータ”smtpd_sender_restrictions”で”reject_unverified_recipient”を設定している場合に、該当するメールに対し行う処理を指定する

 

 

unverified_sender_reject_reason


パラメータ”smtpd_sender_restrictions”で”reject_unverified_sender”を設定していることによりメールが拒否された場合に通知する内容。

 



unverified_sender_tempfail_action


パラメータ”smtpd_sender_restrictions”で”reject_unverified_sender”を設定している場合に、該当するメールに対し行う処理を指定する

 




smtpd_soft_error_limit



 



smtpd_starttls_timeout



 



smtpd_timeout



 



smtpd_tls_CAfile



 



smtpd_tls_CApath



 



smtpd_tls_always_issue_session_ids



 



smtpd_tls_ask_ccert



 



smtpd_tls_auth_only



 



smtpd_tls_ccert_verifydepth



 



smtpd_tls_cert_file



 



smtpd_tls_ciphers



 



smtpd_tls_dcert_file



 



smtpd_tls_dh1024_param_file



 



smtpd_tls_dh512_param_file



 



smtpd_tls_dkey_file



 



smtpd_tls_eccert_file



 



smtpd_tls_eckey_file



 



smtpd_tls_eecdh_grade



 



smtpd_tls_exclude_ciphers



 



smtpd_tls_fingerprint_digest



 



smtpd_tls_key_file



 



smtpd_tls_loglevel



 



smtpd_tls_mandatory_ciphers



 



smtpd_tls_mandatory_exclude_ciphers



 



smtpd_tls_mandatory_protocols



 



smtpd_tls_protocols


使用できるプロトコルを指定する。
もしくは使用できないプロトコルを指定する。

 



smtpd_tls_received_header



 



smtpd_tls_req_ccert



 



smtpd_tls_security_level


TLSの使用をどの程度強制するかを指定する。

 



smtpd_tls_session_cache_database



 



smtpd_tls_session_cache_timeout



 



smtpd_tls_wrappermode



 



smtpd_upstream_proxy_protocol



 



smtpd_upstream_proxy_timeout



 



smtpd_use_tls



 

 

disable_vrfy_command


SMTP VRFYコマンドを無効にする。
これによってアカウントの有無を外部から調査できなくする。

 





エラー配送



error_delivery_slot_cost



 



error_delivery_slot_discount



 



error_delivery_slot_loan



 



error_destination_concurrency_failed_cohort_limit


errorトランスポートを使用した際に、何度転送先への接続に失敗したら当該接続先が接続不能状態であると判断するか。
内部でカウンタを持ち、接続に連続して失敗するたびにカウンタが増加し、途中接続に成功するとカウンタがリセットされる。

 



error_destination_concurrency_limit


errorトランスポートで配送する際に同一の宛先へ同時に配送できる上限。

 



error_destination_concurrency_negative_feedback


errorトランスポートを使用した場合に、配送先へ接続に成功した際、ここで設定した値をその配送先の同時接続可能数から減らす。
同時接続可能数は0まで減ることはない。

 



error_destination_concurrency_positive_feedback


errorトランスポートを使用した場合に、配送先へ接続に成功した際、ここで設定した値をその配送先の同時接続可能数に加算する。
同時接続可能数は最大でもパラメータ”error_destination_recipient_limit”の値までしか増えない。

 



error_destination_rate_delay


errorトランスポートを使用した場合に、同一の接続先サーバにおいて、配送が一度完了した後に連続して配送する場合、すぐに配送をせずにどの程度の時間待機するかを設定する。

 



error_destination_recipient_limit


errorトランスポートを使用した場合に、同一ドメインに対し、並列して送れるメールの数。
ただし、同じ宛先ユーザのメールは1配送として扱われる。

 



error_extra_recipient_limit


errorトランスポートを使用した場合に、メールキューに割り込みメールが入った際に使用される、メモリの予備領域のメール保存可能件数。

 



error_initial_destination_concurrency



 



error_minimum_delivery_slots



 



error_notice_recipient



 



error_recipient_limit


errorトランスポートを使用した場合に、メモリ内に保持できる受信者メールアドレス情報の数。

 



error_recipient_refill_delay


errorトランスポートを使用し、メール配送の際に全ての受信者情報を一度にメモリ上に展開できない場合に、次の受信者情報を追加読み出しするまでの待機時間。

 



error_recipient_refill_limit


errorトランスポートを使用し、メール配送の際に全ての受信者情報を一度にメモリ上に展開できない場合に、一度に追加読み出しできる受信者情報の上限数。

 



error_transport_rate_delay


errorトランスポートを使用した場合に、同一内容のメールを複数の宛先に配送する際にそれぞれの配送間に設ける待機時間を設定する。

 



リレー



relay_delivery_slot_cost



 



relay_delivery_slot_discount



 



relay_delivery_slot_loan



 



relay_destination_concurrency_failed_cohort_limit



 



relay_destination_concurrency_limit


relayトランスポートで配送する際に同一の宛先へ同時に配送できる上限。

 



relay_destination_concurrency_negative_feedback


relayトランスポートを使用した場合に、配送先へ接続に成功した際、ここで設定した値をその配送先の同時接続可能数から減らす。
同時接続可能数は0まで減ることはない。

 



relay_destination_concurrency_positive_feedback


relayトランスポートを使用した場合に、配送先へ接続に成功した際、ここで設定した値をその配送先の同時接続可能数に加算する。
同時接続可能数は最大でもパラメータ”relay_destination_recipient_limit”の値までしか増えない。

 



relay_destination_rate_delay


relayトランスポートを使用した場合に、同一の接続先サーバにおいて、配送が一度完了した後に連続して配送する場合、すぐに配送をせずにどの程度の時間待機するかを設定する。

 



relay_destination_recipient_limit


relayトランスポートを使用した場合に、同一ドメインに対し、並列して送れるメールの数。
ただし、同じ宛先ユーザのメールは1配送として扱われる。

 



relay_domains



 






relay_extra_recipient_limit


relayトランスポートを使用した場合に、メールキューに割り込みメールが入った際に使用される、メモリの予備領域のメール保存可能件数。

 



relay_initial_destination_concurrency



 



relay_minimum_delivery_slots



 



relay_recipient_limit


relayトランスポートを使用した場合に、メモリ内に保持できる受信者メールアドレス情報の数。

 



relay_recipient_maps



 



relay_recipient_refill_delay


relayトランスポートを使用し、メール配送の際に全ての受信者情報を一度にメモリ上に展開できない場合に、次の受信者情報を追加読み出しするまでの待機時間。

 



relay_recipient_refill_limit


relayトランスポートを使用し、メール配送の際に全ての受信者情報を一度にメモリ上に展開できない場合に、一度に追加読み出しできる受信者情報の上限数。

 



relay_transport



 



relay_transport_rate_delay


relayトランスポートを使用した場合に、同一内容のメールを複数の宛先に配送する際にそれぞれの配送間に設ける待機時間を設定する。

 



relayhost


外部へメールを転送する際に中継させるメールサーバ。



 

sender_dependent_relayhost_maps


送信者アドレス毎にパラメータ”relayhost”の値を設定する為のデータベースを指定する。
ここで設定した値が検索結果として見つかれば、デフォルト値は上書きされる。

 

 

empty_address_relayhost_maps_lookup_key


パラメータ”sender_dependent_relayhost_maps”において検索する際に、検索キーとなる送信者アドレスが空であった場合に代わりに検索キーとして使用する文字列

 

 

QMQP


QMQPはSMTPの代わりに使用できるメール交換プロトコルである。

qmqpd_authorized_clients


QMQPサーバポートへの接続が許されるクライアント。

 



qmqpd_client_port_logging



 



qmqpd_error_delay



 



qmqpd_timeout



 



開発者用

 

debugger_command


Postfixを”-D”オプションをつけて実行した場合に同時に起動させるデバッガープログラムのパス

 



fault_injection_code


再現が困難な特定の内部エラーを強制的に発生させる。
専らデバッグ用に使用する。

 

 

dns_ncache_ttl_fix_enable


将来のライブラリ”libc”の競合発生のために用意されたパラメータ。
PostfixはDNSのネガティブキャッシュの処理をres_query()、res_search()、res_send()に依拠しているが、これら関数が廃止された場合はyesにする。

 



dnsblog_reply_delay


DNS解決を指定の時間だけ遅らせる。
デバッグ用パラメータ。

 

 

dont_remove


キュー内のメールを配送完了後に削除せずに”saved”メールキューに保存する。
デバッグ用パラメータ。

 




その他



alternate_config_directories


通常の設定ファイルパスに代えて使用する設定ファイルのパス。
コマンドラインの”-c <設定ファイルパス>” で指定されたり環境変数MAIL_CONFIGで指定することでも設定可能だが、他のプログラムからPostfixプログラムを呼び出す場合はこれらを指定できないのでデフォルトパスにある設定ファイルにこのパラメータを記載することで、任意の設定ファイルを利用することができる。
設定ファイルをデフォルトパス以外に置く必要がなければ、このオプションは必要がない。
パッケージインストールした場合、一般的には/etc/postfix/main.cfがデフォルトパスとなるが、これを変更したい場合等に利用できる。(シンボリックリンクを配置することでも同様のことが可能)

 

 

backwards_bounce_logfile_compatibility


bounceプログラムが生成するログファイルの形式をPostfixバージョン2.0以前でも読める形式で出力する。

 



broken_sasl_auth_clients


古いバージョンのAUTHコマンド(RFC2554)を有効にし、古いSMTPクライアントが接続できるようにする。

 

 

cyrus_sasl_config_path


Cyrus SASLを使用する際のCyrus SASLのインストールパス

 

 

daemon_table_open_error_is_fatal


データベースを開けなかったときのエラー処理の方法

 

 

 

 

double_bounce_sender


Postfix管理者(postmaster)宛のメールを生成する際の送信者。
ここで指定したユーザ宛のメールは配送されずに破棄される。

 

 

export_environment


Postfixプロセスから非Postfixプロセスへ処理を移す際に渡す環境変数のリスト。

 

 

import_environment


Postfixが非Postfixのプロセスから受け取ることができる環境変数のリスト

 



maps_rbl_domains


現在は廃止されたパラメータ。
代わりに”reject_rbl_client”を使用する。


 



sendmail_fix_line_endings


sendmailコマンドを使用する際に<CR><LF>を<LF>に変換する場合を指定する

 





ツール

 

一般コマンド


$POSTFIX_HOME配下にインストールされる、管理者が一般的に使用するコマンド類。

junk




postalias


バーチャルエイリアスを除くエイリアス用のデータベースの管理を行うプログラム。
バーチャルエイリアス及び、その他のデータベース全般の管理を行う場合は、postmapコマンドを使用する。
これは、postaliasコマンドはsendmail互換のエイリアスデータベース(エイリアステーブル)を出力できるためである。

 

書式

 

postalias {<オプション>} {<データベースタイプ>:}<ファイルパス> {...}

データベースタイプを指定しない場合、パラメータ”default_database_type”の値が指定される。
パラメータ”default_database_type”の値は次のコマンドで確認できる。

postconf -d default_database_type

サポートしているデータベースタイプを調べる場合、次のコマンドを実行する。

postconf -m

指定するファイルパスはデータベースを作成する場合は、データベースのデータが記述されたテキストファイルを指定する。
このテキストファイルは”<キー>:<値>”の形式で一行につき一つのデータを記載する。
データベースを生成すると、データベースタイプに対応する拡張子が付与される。
データベースを生成する以外は、このコマンドにより作成されたデータベースファイルが利用されるが、この場合でも拡張子は記述しない。

例: キー:test、値:user1のデータベースを作成する場合。

echo test:user1 > db
postconf db
postconf -s sb
# 出力結果
# @:      @
# YP_LAST_MODIFIED:       1509800203
# YP_MASTER_NAME: <ホスト名>
# test:   aaa

 

オプション

 



環境変数


コマンド実行時、以下の環境変数が利用される。

 



postcat


examine Postfix queue file

postconf


設定ファイルに関するツール。

main.cf関連オプション

 

一般

 

-p


main.cfに関するコマンド実行であることを宣言する。
これは標準であり、省略可能。

設定確認系

 

-d


デフォルト設定を全て表示する

-f


長い設定行を、=の後で折り返し、人が読みやすいように表示する
例えば次のようになる

 

 

-h


設定の項目名を表示せず、値のみ表示する

-H


設定の値を表示せず、項目名のみ表示する

-n


設定ファイルに記載した設定のみを表示する

設定変更系

 

-o


指定した設定項目を変更する



      postconf [-dfhHnopvx] [-c config_dir] [-C class,...] [parameter ...]

 

      postconf [-epv] [-c config_dir] parameter=value ...

 

      postconf -# [-pv] [-c config_dir] parameter ...

 

      postconf -X [-pv] [-c config_dir] parameter ...

 

master.cf関連オプション

 

一般

 

-P


master.cfに関するコマンド実行であることを宣言する。
main.cf関連と共用のオプションを使用する際はこのオプションが必要。

   Managing master.cf service entries:

       postconf -M [-fovx] [-c config_dir] [service[/type] ...]

       postconf -M [-ev] [-c config_dir] service/type=value ...

       postconf -M# [-v] [-c config_dir] service/type ...

       postconf -MX [-v] [-c config_dir] service/type ...

   Managing master.cf service fields:

       postconf -F [-fhHovx] [-c config_dir] [service[/type[/field]] ...]

       postconf -F [-ev] [-c config_dir] service/type/field=value ...

   Managing master.cf service parameters:

       postconf -P [-fhHovx] [-c config_dir] [service[/type[/parameter]] ...]

       postconf -P [-ev] [-c config_dir] service/type/parameter=value ...

       postconf -PX [-v] [-c config_dir] service/type/parameter ...

   Managing bounce message templates:

       postconf -b [-v] [-c config_dir] [template_file]

       postconf -t [-v] [-c config_dir] [template_file]

   Managing TLS features:

       postconf -T mode [-v] [-c config_dir]

   Managing other configuration:

       postconf -a|-A|-l|-m [-v] [-c config_dir]

DESCRIPTION
       By  default, the postconf(1) command displays the values of main.cf configuration parameters, and warns about possible mis-typed parameter
       names (Postfix 2.9 and later).  The command can also change main.cf configuration parameter values, or display other configuration  infor-
       postconf -P [-ev] [-c config_dir] service/type/parameter=value ...

       postconf -PX [-v] [-c config_dir] service/type/parameter ...

   Managing bounce message templates:

       postconf -b [-v] [-c config_dir] [template_file]

       postconf -t [-v] [-c config_dir] [template_file]

   Managing TLS features:

       postconf -T mode [-v] [-c config_dir]

   Managing other configuration:

       postconf -a|-A|-l|-m [-v] [-c config_dir]

 

postdrop




postfix


Postfixを制御するプログラム。Postfixの起動や停止、ステータス確認などが行える。
実際は内部でpostfix-scriptシェルスクリプトを起動し、そちらで操作を行う。

サブコマンド

 

check


Warn about bad directory/file ownership or permissions, and create missing directories.

start


Start the Postfix mail system. This also runs the configuration check described above.


stop


Stop the Postfix mail system in an orderly fashion. If possible, running processes are allowed to terminate at their earliest convenience.

Note: in order to refresh the Postfix mail system after a configuration change, do not use the start and stop commands in succession. Use the
reload command instead.


abort


Stop the Postfix mail system abruptly. Running processes are signaled to stop immediately.

flush


Force delivery: attempt to deliver every message in the deferred mail queue. Normally, attempts to deliver delayed mail happen at regular inter-
Note: in order to refresh the Postfix mail system after a configuration change, do not use the start and stop commands in succession. Use the
reload command instead.


abort


Stop the Postfix mail system abruptly. Running processes are signaled to stop immediately.

flush


Force delivery: attempt to deliver every message in the deferred mail queue. Normally, attempts to deliver delayed mail happen at regular inter-
vals, the interval doubling after each failed attempt.

Warning: flushing undeliverable mail frequently will result in poor delivery performance of all other mail.

reload


Re-read configuration files. Running processes terminate at their earliest convenience.

status


Indicate if the Postfix mail system is currently running.

set-permissions


set-permissions [name=value …]
Set the ownership and permissions of Postfix related files and directories, as specified in the postfix-files file.

Specify name=value to override and update specific main.cf configuration parameters. Use this, for example, to change the mail_owner or set-
gid_group setting for an already installed Postfix system.

This feature is available in Postfix 2.1 and later. With Postfix 2.0 and earlier, use “$config_directory/post-install set-permissions”.


tls


tls subcommand
Enable opportunistic TLS in the Postfix SMTP client or server, and manage Postfix SMTP server TLS private keys and certificates. See post-
fix-tls(1) for documentation.

This feature is available in Postfix 3.1 and later.

upgrade-configuration


upgrade-configuration [name=value …]
Update the main.cf and master.cf files with information that Postfix needs in order to run: add or update services, and add or update configura-
tion parameter settings.

Specify name=value to override and update specific main.cf configuration parameters.

This feature is available in Postfix 2.1 and later. With Postfix 2.0 and earlier, use “$config_directory/post-install upgrade-configuration”.


オプション

-c config_dir
      -c config_dir

Read the main.cf and master.cf configuration files in the named directory instead of the default configuration directory. Use this to distinguish
between multiple Postfix instances on the same host.

With Postfix 2.6 and later, this option forces the postfix(1) command to operate on the specified Postfix instance only. This behavior is inher-
ited by postfix(1) commands that run as a descendant of the current process.

-D
      -D (with postfix start only)

Run each Postfix daemon under control of a debugger as specified via the debugger_command configuration parameter.

-v
      -v     Enable verbose logging for debugging purposes. Multiple -v options make the software increasingly verbose.

postkick

デーモンプロセスが他のプログラムのプロセスと情報をやり取りするためにプロセス間通信(IPC)を行う。

postlock

Postfix-compatible locking

postlog

指定したテキストをPostfixのログ処理機構を用いてログに出力する。
ログの出力先は原則syslogで標準エラー出力が利用されている場合のみ、そちらにも出力される。

書式

postlog {<オプション>} <ログテキスト>

 

postmap

データベースの管理を行うプログラム。
データベース全般の管理を行えるが、エイリアス用のデータベースを管理する場合のみ、postaliasコマンドを使用する。
ただしバーチャルエイリアスのみpostmapコマンドを使用する。
これは、postaliasコマンドはsendmail互換のエイリアスデータベース(エイリアステーブル)を出力できるためである。

postmulti

Postfix multi-instance manager

postqueue

キューの管理を行う。
キュー内のメールの削除等、重要な処理はpostsuperコマンドを使用する。

オプション

postsuper

キューの管理を行う。
キュー内のメールの確認等、重要でない処理はpostqueueコマンドを使用する。

オプション

 

 

mailq


Sendmail互換用プログラムで、メールキューの管理を行う。
内部的にはpostqueueコマンドが呼び出される。

newaliases

Sendmail互換用プログラムで、エイリアスデータベースを初期化する。
内部的にはpostaliasコマンドが呼び出される。

newaliasesコマンドはデフォルトパスにあるデータベースファイルをデフォルトでは使用するので、postaliasコマンドと違い、引数を指定せずに実行できる。

 

sendmail

Sendmail compatibility interface

postfix-tls-script

Postfix TLS management


内部プログラム

$POSTFIX_HOME/lib/配下にインストールした、専らサーバ内部で使用されるコマンド類。
ここに配置される各プログラムはコンソールからは呼び出せない。

anvil

このプログラムはクライアントの接続数や時間当たりの要求数の統計情報を管理する。
この情報を多量にアクセスを行うクライアントに対する制限のために使用することができる。


bounce

メールの配送状態情報をログファイルとして保存するプログラム。
このログは一時的なもので、配送が完了すると削除される。
保存先パスはキューディレクトリ直下のbounce、defer、traceのいずれかで本環境では以下となる。

$POSTFIX_HOME/queue/bounce
$POSTFIX_HOME/queue/defer
$POSTFIX_HOME/queue/trace

 

cleanup

送受信したメールのメールアドレス書き換えを行う。
アドレス書き換えにはcanonical系とvirtual系がある。

discard

 

dnsblog

 

error


エラーメール、リトライメール専用の配送エージェント。

flush

 

lmtp


SMTP、LMTPクライアント。
smtpコマンドと全く同じプログラムであるが、実体を持つ。

[root@postfix postfix]# ll lib/*mtp
-rwxr-xr-x. 2 root root 187909 Jun 12 15:03 lib/lmtp
-rwxr-xr-x. 2 root root 187909 Jun 12 15:03 lib/smtp
[root@postfix postfix]# file lib/*mtp
lib/lmtp: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
lib/smtp: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
[root@postfix postfix]# sha256sum lib/*mtp
91e2aed11b2276f51879444938b82e3b746e245633dd8326e5ef9180c701f299  lib/lmtp
91e2aed11b2276f51879444938b82e3b746e245633dd8326e5ef9180c701f299  lib/smtp

 

local


ローカル配送を行うプログラム

master

 

nqmgr

 

oqmgr

 

pickup

 

pipe


ローカル配送をlocalプログラムから他のPostfix外部プログラムへ委ねる時にその外部プログラムを呼び出すコマンド。

postfix-script

 

postfix-tls-script

 

postfix-wrapper

 

post-install

 

postmulti-script

 

postscreen


SMTPサーバにスパムメールフィルタ機能を提供する。

参考:http://www.postfix.org/postscreen.8.html

proxymap


データベースアクセスを代行するプロキシサービス。
proxymapサービスを利用する場合はパラメータの値に、データベース名の接頭辞として”proxy:”を指定する。
proxymapサービスは例えば、Postfixがchroot制限を受けている場合、chroot制限を受けないようにしたproxymapサービスからchroot外の検索ファイルを読み取る為に使用したり、接続数制限があるデータベースシステムに複数のPostfixインスタンスからアクセスする場合に使用したりできる。

qmgr

 

qmqpd


QMQP(Quick Mail Queueing Protocol)のサーバ。
QMQPはSMTPの代わりに使用できるメール交換プロトコルである。

参考:http://www.postfix.org/qmqpd.8.html

scache


他のホストとの接続のキャッシュを管理する。

showq

 

smtp


SMTP、LMTPクライアント。

smtpd

 

spawn

 

tlsmgr

 

tlsproxy

 

trivial-rewrite

 

verify



virtual


バーチャルドメイン専用のローカル配送プログラム


Tips

 

フィルタリング


参考


smtpd_proxy_filter

特定送信者の拒否

 

新規設定

 

  1. 設定ファイルを変更する
    vi $POSTFIX_HOME/conf/main.cf
    1. 送信者制約を設定する
      smtpd_sender_restrictions = check_sender_access hash:/usr/local/postfix/conf/sender_restrictions
  2. 制約データベースを作成する
    vi /usr/local/postfix/conf/sender_restrictions
    特定アドレスを拒否する場合
    example@example.com   DISCARD
    特定ドメインを拒否する場合
    example.com        DISCARD
    ※DISCARDをREJECTにすると拒否した旨、送信元に返す
  3. データベースファイルを生成する
    postmap /usr/local/postfix/conf/sender_restrictions
    # /usr/local/postfix/conf/sender_restrictions.dbが生成される
  4. 設定を反映する
    起動時に使用した種類のコマンドを使用すること。
    postfix reload
    or
    systemctl reload postfix

 

追加設定

 

  1. 制約データベースを更新する
    vi /usr/local/postfix/conf/sender_restrictions
    特定アドレスを拒否する場合
    example@example.com   DISCARD
    特定ドメインを拒否する場合
    example.com        DISCARD
    ※DISCARDをREJECTにすると拒否した旨、送信元に返す
  2. データベースファイルを更新する
    postmap /usr/local/postfix/conf/sender_restrictions
    # /usr/local/postfix/conf/sender_restrictions.dbが生成される

 

VERPの使用

 



owner alias (オーナーエイリアス)


エイリアスのアドレスの先頭に”owner-“と付けることで、それ以降の部分の文字列に対応するメールアドレスに関するオーナーエイリアスとして認識される。


バーチャルメール

 

共有ドメイン(バーチャルドメイン)



バーチャルエイリアス



バーチャルメールボックス

 

データベース


バーチャルメールアドレスと保存場所の対応付けを行うデータベースを作成する

cd <任意のパス>
# 例
# cd $POSTFIX_HOME/conf

mv virtual virtual.old
# データベースを退避する。作成していなければ存在しない。

vi virtual
# 任意の内容を記述する。
# 書式は以下。
#  <ユーザ名> <パス>/
# or
#  <メールアドレス> <パス>/
# ユーザ名のみ記載した場合はあらゆるドメインで対象となる。
# メールアドレスを記載した場合は指定のドメインでのみ対象となる。
# パスは共通の保存パス(パラメータ"virtual_mailbox_base")からの相対パスとなる。

postmap virtual
# virtual.dbが生成される。

 

MDAユーザ作成


MDA(Mail Delivery Agent)用のユーザを作成する。
Postfixを含めてメールプログラムでメールを読み書きする共通ユーザである。

useradd --user-group --no-create-home --shell /sbin/nologin mda
chown -R mda:mda /usr/local/data/mail

 

設定変更


設定に以下を加える。
パラメータ”mydestination”についてはサーバの実際のドメインをバーチャルメールとして利用するために、実際のドメインを削除する意図である。
従って、バーチャルメールとして利用しないならば、変更の必要はない。
既存の設定ファイルを上書きする場合は以下で良い。

cat > $POSTFIX_HOME/conf/main.cf << EOT
compatibility_level = 2
mydestination = localhost

# Virtual Mail
virtual_mailbox_base = \$mail_spool_directory
virtual_uid_maps = static:`id -u mda`
virtual_gid_maps = static:`getent group mda | sed -e "s/[a-zA-Z:]//g"`
virtual_mailbox_maps = hash:/usr/local/postfix/conf/virtual
virtual_mailbox_domains = <サーバの実ドメイン>{, <バーチャルドメイン>}{, ...}
EOT

 

設定反映


起動時に使用した種類のコマンドを使用すること。

postfix reload

or

systemctl reload postfix

 

エイリアス(メール受信時のスクリプトの実行)


エイリアスを指定することで、受信したメールのローカルパートを別のローカルパートに割り当てることができる。
また、エイリアスによって特定のローカルパート宛のメールを受信した際に指定したスクリプトを実行することができる。

データベースの作成


エイリアス用のローカルパートと実際のローカルパートの対応付けを行うデータベースを作成する。
もしくはエイリアス用のローカルパートと受信時に実行するスクリプトとの対応付けを行う。

cd <任意のパス>
# 例
# cd $POSTFIX_HOME/conf

 

mv aliases aliases.old
# データベースを退避する。作成していなければ存在しない。

 

vi aliases

任意の内容を記述する。
書式は以下。

 <ユーザ名>: <ユーザ名>

or

 <ユーザ名>: <メールアドレス>[, ...]

or

 <ユーザ名>: |<スクリプトパス>

ユーザ名、メールアドレスのみ記載した場合は通常のエイリアスとなる。
記述するユーザ名は実際には存在していなくても良い。
バーティカルバー(|)を記載した場合はコマンド実行になる。
スクリプトパスを指定した場合はメール配信がされない。また、エイリアスユーザ名とスクリプトの両方を同時に書くことはできない。その為、メール受信とスクリプト実行の両方をしたい場合は次のように記載する。
ここで、userAはメールを受信するユーザ名である。userA_mail@XXX宛にメールを送ることとなる。

userA_mail: userA@localhost,userA_script@localhost
userA_script: |<スクリプトパス>



postalias aliases
# aliases.dbが生成される。

 

設定変更


設定に以下を加える。
パラメータ”mydestination”についてはサーバの実際のドメインをバーチャルメールとして利用するために、実際のドメインを削除する意図である。
従って、バーチャルメールとして利用しないならば、変更の必要はない。
既存の設定ファイルを上書きする場合は以下で良い。

cat >> $POSTFIX_HOME/conf/main.cf << EOT

# Alias
alias_maps = hash:/usr/local/postfix/conf/aliases
alias_database = $alias_maps
EOT

 

設定反映


起動時に使用した種類のコマンドを使用すること。

postfix reload

or

systemctl reload postfix

 

スクリプトサンプル

 

#!/bin/bash

MAIL_PATH=`mktemp`
OUT_PATH=/tmp/test
IFS=$'\n'

cat - > $MAIL_PATH
mailTo=`cat $MAIL_PATH | grep "^To:" | sed -e "s/.*<//" -e "s/@.*//"`
mailSubject=`cat $MAIL_PATH | grep "^Subject:" | sed "s/.*: //"`
mailHeadEnd=`cat $MAIL_PATH | grep -n "^$" | head -n 1 | sed "s/://"`
mailBody=`cat $MAIL_PATH | sed "1,${mailHeadEnd}d" | nkf -mB`

date > $OUT_PATH
echo $mailTo >> $OUT_PATH
echo $mailSubject >> $OUT_PATH
echo $mailBody >> $OUT_PATH
rm $MAIL_PATH

 

SASL

 

 

Dovecot

 

Postfix設定


SASLでDovecotを使用するにはmake makefiles時に次のオプションを付与しなければならない。

make makefiles CCARGS='-DUSE_SASL_AUTH -DDEF_SERVER_SASL_TYPE=\"dovecot\"'

有効になっていると次のコマンドでdovecotと表示される。

postconf -a


以下を設定ファイル”main.cf”に追加する。

smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_recipient_restrictions = permit_sasl_authenticated, reject_unauth_destination

パラメータ”smtpd_recipient_restrictions”による制限内容は以下である。

  1. 宛先が自サーバ宛である場合は受け取る
  2. 送信者が認証を通過していれば送信する
  3. 拒否する
    上記の場合、reject_unauth_destinationの代わりにrejectでも良さそうだが、rejectだと外部からメールを受け取れなくなる。
    自サーバのユーザから自サーバのユーザへメール送信がされる場合は認証が不要となる点には留意する。これを認証必須とすることはできない。
    permit_sasl_authenticatedを指定することで、permit_mynetworksも有効になるので、別途指定は不要。
    パラメータ”smtpd_recipient_restrictions”の代わりにパラメータ”smtpd_client_restrictions”を使用した場合でも挙動は同じになる。


設定完了後、設定を再読み込みする。
起動時に使用した種類のコマンドを使用すること。

postfix reload

or

systemctl reload postfix

 

Dovecot設定


以下設定を追加する。

cat >> $DOVECOT_HOME/conf/dovecot/dovecot.conf << EOT
service auth {
	unix_listener /usr/local/postfix/queue/private/auth {
		mode = 0666
		user = postfix
		group = postfix
	}
}
EOT


設定完了後、設定を再読み込みする。

doveadm reload

 

認証確認


平文でログインする場合でもBase64エンコードを行う必要がある。
まずユーザ名とパスワードをBase64エンコードする。
ユーザ名は二度記載する。

printf "%s\0%s\0%s" <ユーザ名> <ユーザ名> <パスワード> | openssl base64 -e | sed "s/\\n//g"

これを用いてtelnetでログインする。

telnet localhost 25
AUTH PLAIN <Base64ログイン情報>
MAIL FROM:<from address>
RCPT TO:<to address>
DATA
test mail
.
quit

 

TLS


TLSはインストール時にTLSを有効にしてインストールされていなければならないので注意すること。

設定ファイルに以下を追加する。

cat >> $POSTFIX_HOME/conf/main.cf << EOT
smtpd_tls_cert_file = /usr/local/letsencrypt/cert/cert.pem
smtpd_tls_key_file = /usr/local/letsencrypt/keys/key.pem
smtpd_tls_security_level = may
EOT


更に設定ファイル”master.cf”も変更する

sed -i -e "s/^#smtps/smtps/g" -e "s/^# *-o smtpd_tls_wrappermode/  -o smtpd_tls_wrappermode/g" master.cf


設定完了後、設定を再読み込みする。
起動時に使用した種類のコマンドを使用すること。

postfix reload

or

systemctl reload postfix

 

トラブルシューティング

 

メール受信ができない

 

認証失敗


smtpd_recipient_restrictions等のsmtpd_XXX_restrictions系パラメータで制限が加えられているので、それを変更する。
SASLを使用している場合、rejectを使用せずにreject_unauth_destinationを使用しなければならない。

 

メール送信ができない

 

認証失敗


認証が適切に行われていない。
smtpd_recipient_restrictions等のsmtpd_XXX_restrictions系パラメータで制限が加えられているので、それを変更するか、認証を行ったうえで送信する。

 

メール送信テスト


メール送信テストは次のように行う

ローカルにメールを送る場合

 

telnet localhost 25
MAIL FROM:test@example.com
RCPT TO:root@[127.0.0.1]
DATA
test mail
.
quit


送信が完了したことを確認する

mailq


宛先メールアドレスにメールが届いていることを確認する

cat /usr/local/data/mail/root/new/*

 

インターネットにメールを送る場合


メールアドレスを修正して以下実行する。送信元メールアドレスのドメインは正しいものにする必要があるが、アカウント名は何でも良い。
インターネット通信が可能な場合のみ有効。
メールを送信するために送信ホストのIPアドレス(インターネット経由の場合はグローバルアドレス)がDNS解決できる必要がある。

telnet localhost 25
MAIL FROM:<送信元メールアドレス>
RCPT TO:<宛先メールアドレス>
DATA
test mail
.
quit


送信が完了したことを確認する

mailq

 


Notice: Trying to get property 'queue' of non-object in /usr/local/wordpress/wp-includes/script-loader.php on line 2876

Warning: Invalid argument supplied for foreach() in /usr/local/wordpress/wp-includes/script-loader.php on line 2876