
● システム開発 Postfix
Fedora Coreで使用しているメール・サーバーです。POPサーバーはDovecotを使用しています。
昔はメール・サーバーといえば、sendmailが使われていました、セキュリテイ面、設定の複雑さ、処理の重さなどを対処するため開発されたメールサーバーです。
代表的なメール・サーバーにqmailがありますが、どちらかというと大規模システム向けです。処理が軽いですが、多少インストールが複雑です。
・Postfixインストール
yum -y install postfix
・Postfix起動
/etc/rc.d/init.d/postfix start (停止はstop)
・設定ファイル
/etc/postfix/main.cf
標準的な設定
標準的なシステムの設定です。
下記は参考程度に示したものです。
実際の設定には詳細な情報、資料をを確認して下さい。
本サイトではサーバー構築の手引きまでは紹介しておりません。
#myhostname = host.domain.tld
#myhostname = virtual.domain.tld
myhostname = fedora.fedorasrv.com ← 追加(自FQDN名を指定)
# The mydomain parameter specifies the local internet domain
name.
# The default is to use $myhostname minus the first component.
#
#mydomain = domain.tld
mydomain = fedorasrv.com ← 追加(自ドメイン名を指定)
# SENDING MAIL
#
# The myorigin parameter specifies the domain that locally-posted
# myorigin also specifies the default domain name that is appended
# to recipient addresses that have no @domain part.
#
#myorigin = $myhostname
#myorigin = $mydomain
myorigin = $mydomain ← 追加(ローカルからのメール送信時の送信元メールアドレス@以降にドメイン名を付加)
# The inet_interfaces parameter specifies the network interface
# addresses that this mail system receives mail on. By default,
# Note: you need to stop/start Postfix when this parameter changes.
#
#inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
inet_interfaces = localhost
↓
inet_interfaces = all ← 変更(外部からのメール受信を許可)
# The mydestination parameter specifies the list of domains
that this# machine considers itself the final destination for.
#
# Continue long lines by starting the next line with whitespace.
#
# See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS".
#
mydestination = $myhostname, localhost.$mydomain, localhost
↓
mydestination = $myhostname, localhost.$mydomain, localhost,
$mydomain ← 変更(自ドメイン宛メールを受信できるようにする)
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
# mail.$mydomain, www.$mydomain, ftp.$mydomain
# DELIVERY TO MAILBOX
#
# The home_mailbox parameter specifies the optional pathname of a
# mailbox file relative to a user's home directory. The default
# mailbox file is /var/spool/mail/user or /var/mail/user. Specify
# "Maildir/" for qmail-style delivery (the / is required).
#
#home_mailbox = Mailbox
#home_mailbox = Maildir/
home_mailbox = Maildir/ ← 追加(メールボックス形式をMaildir形式にする)
#smtpd_banner = $myhostname ESMTP $mail_name
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
smtpd_banner = $myhostname ESMTP unknown ← 追加(メールサーバーソフト名の隠蔽化)
以下を最終行へ追加(受信メールサイズ制限)
message_size_limit = 10485760 ← 追加(受信メールサイズを10MB=10*1024*1024に制限)
問い合わせなどのフォームからのメール送信のシステム開発では必ず連携が必要なメールサーバーです。
腕時計のご紹介
ジェニファーロペス
ジョルジオ・ロッシ
|