2002年 3月 29日(金)

Postfixの設定

メールサーバの設定は、ミスるとSPAMの踏み台にされたりして世界中の管理者からの苦情に対処しなければならない事態に陥ることもあります。そのため、自信の無い方は、メールサーバの運用はやめた方が賢明と私は考えます。

postfixは特に設定は考えることなく、マニュアルや、「Postfixのぺーじ」を参考させてもらいながらセットアップした。Postfxは個人的には初めてのソフトであるので、少々不安が有った。

現在の所、以下のmain.cfと、バーチャルドメイン用に使用するマッピングファイルしか設定していない。
かつて、sendmail.cfと死にものぐるいで戦ってきたのを思い出すと、あまりにも呆気ないこのmain.cfは拍子抜けしてしまう。
サンプルから変更した箇所のdiffを次に示します。

--- main.cf.old Fri Feb 1 11:12:04 2002
+++ main.cf Fri Mar 15 21:58:20 2002
@@ -26,7 +26,6 @@
# See the files in examples/chroot-setup for setting up Postfix chroot
# environments on different UNIX systems.
#
-queue_directory = /var/spool/postfix
# The command_directory parameter specifies the location of all
# postXXX commands. The default value is $program_directory.
@@ -49,7 +48,6 @@
# particular, don't specify nobody or daemon. PLEASE USE A DEDICATED
# USER.
#
-mail_owner = postfix

# The default_privs parameter specifies the default rights used by
# the local delivery agent for delivery to external file or command.
@@ -65,7 +63,6 @@
# from gethostname(). $myhostname is used as a default value for many
# other configuration parameters.
#
-#myhostname = host.domain.name
#myhostname = virtual.domain.name

# The mydomain parameter specifies the local internet domain name.
@@ -73,7 +70,6 @@
# $mydomain is used as a default value for many other configuration
# parameters.
#
-#mydomain = domain.name

# SENDING MAIL
#
@@ -85,7 +81,7 @@
# user@that.users.mailhost.
#
#myorigin = $myhostname
-#myorigin = $mydomain
+myorigin = $mydomain

# RECEIVING MAIL

@@ -94,7 +90,6 @@
# the software claims all active interfaces on the machine. The
# parameter also controls delivery of mail to user@[ip.address].
#
-#inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost

@@ -123,8 +118,7 @@
#
#mydestination = $myhostname, localhost.$mydomain
#mydestination = $myhostname, localhost.$mydomain $mydomain
-#mydestination = $myhostname, localhost.$mydomain, $mydomain,
-# mail.$mydomain, www.$mydomain, ftp.$mydomain
+mydestination = $myhostname, localhost.$mydomain, $mydomain,mail.$mydomain, www.$mydomain, ftp.$mydomain

# TRUST AND RELAY CONTROL

@@ -154,7 +148,7 @@
#
#mynetworks_style = class
#mynetworks_style = subnet
-#mynetworks_style = host
+mynetworks_style = host

# Alternatively, you can specify the mynetworks list by hand, in
# which case Postfix ignores the mynetworks_style setting.
@@ -167,7 +161,7 @@
# of listing the patterns here. Specify type:table for table-based lookups
# (the value on the table right-hand side is not used).
#
-#mynetworks = 168.100.189.0/28, 127.0.0.0/8
+mynetworks = 192.168.1.0/28, 127.0.0.0/8
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table

@@ -292,8 +286,8 @@
# It will take a minute or so before changes become visible. Use
# "postfix reload" to eliminate the delay.
#
-#alias_maps = dbm:/etc/aliases
-#alias_maps = hash:/etc/aliases
+alias_maps = dbm:/etc/aliases
+alias_maps = hash:/etc/aliases
#alias_maps = hash:/etc/aliases, nis:mail.aliases
#alias_maps = netinfo:/aliases

@@ -316,7 +310,7 @@
# Basically, the software tries user+foo and .forward+foo before
# trying user and .forward.
#
-#recipient_delimiter = +
+recipient_delimiter = +

# DELIVERY TO MAILBOX
#
@@ -506,32 +500,36 @@
# sendmail_path: The full pathname of the Postfix sendmail command.
# This is the Sendmail-compatible mail posting interface.
#
-sendmail_path =
+sendmail_path = /usr/sbin/sendmail

# newaliases_path: The full pathname of the Postfix newaliases command.
# This is the Sendmail-compatible command to build alias databases.
#
-newaliases_path =
+newaliases_path = /usr/bin/newaliases

# mailq_path: The full pathname of the Postfix mailq command. This
# is the Sendmail-compatible mail queue listing command.
#
-mailq_path =
+mailq_path = /usr/bin/mailq

# setgid_group: The group for mail submission and queue management
# commands. This must be a group name with a numerical group ID that
# is not shared with other accounts, not even with the Postfix account.
#
-setgid_group =
+setgid_group = postdrop

# manpage_directory: The location of the Postfix on-line manual pages.
#
-manpage_directory =
+manpage_directory = /usr/local/man

# sample_directory: The location of the Postfix sample configuration files.
#
-sample_directory =
+sample_directory = /etc/postfix

# readme_directory: The location of the Postfix README files.
#
-readme_directory =
+readme_directory = no
+
+virtual_maps = hash:/etc/postfix/virtual


このあとに、/etc/aliasesを記述して(内容についてはセキュリティの都合上公開できません)

# newaliases
とする。
Posted by thomas at 2002年03月29日 09:47 | トラックバック / アフィリエイトはエーハチネット

« モデムのフィルタリング設定(TE4121C) | Main | qpopperのインストール&設定 »

トラックバック

このエントリーのトラックバックURL:
http://test.uwan.net/mt-tb.cgi/603