Postfix 2.6.6
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
''目次''
#contents
~
----
~
*目的 [#yd5fc129]
メールサーバとして使用する訳ではなく、cronでのスクリプト...
~
*準備 [#saf04019]
-バージョン確認(インストール済みの場合)
# postconf mail_version
~
*インストール [#z0d89031]
+''yum でインストール''
# yum install postfix
~
*設定 [#jb140f2b]
+''main.cf の編集''
# vi /etc/postfix/main.cf
~
以下、矢印箇所を編集
(〜略〜)
# INTERNET HOST AND DOMAIN NAMES
#
# The myhostname parameter specifies the internet hostna...
# mail system. The default is to use the fully-qualified...
# from gethostname(). $myhostname is used as a default v...
# other configuration parameters.
#
#myhostname = host.domain.tld
#myhostname = virtual.domain.tld
myhostname = hogehoge.mydomain.com ...
# The mydomain parameter specifies the local internet do...
# The default is to use $myhostname minus the first comp...
# $mydomain is used as a default value for many other co...
# parameters.
#
#mydomain = domain.tld
mydomain = mydomain.com ...
# SENDING MAIL
#
# The myorigin parameter specifies the domain that local...
# mail appears to come from. The default is to append $m...
# which is fine for small sites. If you run a domain wi...
# machines, you should (1) change this to $mydomain and ...
# a domain-wide alias database that aliases each user to
# user@that.users.mailhost.
#
# For the sake of consistency between sender and recipie...
# myorigin also specifies the default domain name that i...
# to recipient addresses that have no @domain part.
#
#myorigin = $myhostname
#myorigin = $mydomain
myorigin = $mydomain ...
# RECEIVING MAIL
# The inet_interfaces parameter specifies the network in...
# addresses that this mail system receives mail on. By ...
# the software claims all active interfaces on the machi...
# parameter also controls delivery of mail to user@[ip.a...
#
# See also the proxy_interfaces parameter, for network a...
# are forwarded to us via a proxy or network address tra...
#
# Note: you need to stop/start Postfix when this paramet...
#
#inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
inet_interfaces = localhost ...
# Enable IPv4, and IPv6 if supported
inet_protocols = all
(〜略〜)
# DELIVERY TO MAILBOX
#
# The home_mailbox parameter specifies the optional path...
# mailbox file relative to a user's home directory. The ...
# mailbox file is /var/spool/mail/user or /var/mail/user...
# "Maildir/" for qmail-style delivery (the / is required).
#
#home_mailbox = Mailbox
#home_mailbox = Maildir/
home_mailbox = Maildir/ ...
(〜略〜)
# SHOW SOFTWARE VERSION OR NOT
#
# The smtpd_banner parameter specifies the text that fol...
# code in the SMTP server's greeting banner. Some people...
# the mail version advertised. By default, Postfix shows...
#
# You MUST specify $myhostname at the start of the text....
# RFC requirement. Postfix itself does not care.
#
#smtpd_banner = $myhostname ESMTP $mail_name
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_vers...
smtpd_banner = $myhostname ESMTP unknown ...
(〜略〜)
~
+''master.cf の編集''
# vi /etc/postfix/master.cf
~
smtp inet n - n - - ...
↓コメントアウト
#smtp inet n - n - - ...
~
+''メールボックスのディレクトリを作成''
# mkdir -p /etc/skel/Maildir/{new,cur,tmp}
# chmod -R 700 /etc/skel/Maildir/
~
+''メールサーバー切替え(確認)''
# alternatives --config mta
CentOS6.4では1つしかない。
1 プログラムがあり 'mta' を提供します。
選択 コマンド
-----------------------------------------------
*+ 1 /usr/sbin/sendmail.postfix
Enter を押して現在の選択 [+] を保持するか、選択番号を入...
~
+''動作確認''
++起動
# /etc/rc.d/init.d/postfix start
postfix を起動中: ...
~
++メールを送ってみる
# mail -s "[$HOSTNAME] TEST" hoge@mydomain.com
Sample message
. ← .(ドット)で本文終了
hoge@mydomain.com にメールが届けば完了。~
~
+''自動起動設定''
# # chkconfig postfix on
~
*メモ [#f659d6cc]
-mail コマンド
# mail -s "(件名)" メールアドレス
コマンド入力後にメール本文を入力し、改行+「.」(ドット)...
~
''例'':
# mail -s "Test" hoge@mydomain.com
Sample message ← 本文
. ← 入力終了
~
-スクリプト内でのコマンド例
echo "Sample message" | mail -s "Test" hoge@mydomain.com
~
終了行:
''目次''
#contents
~
----
~
*目的 [#yd5fc129]
メールサーバとして使用する訳ではなく、cronでのスクリプト...
~
*準備 [#saf04019]
-バージョン確認(インストール済みの場合)
# postconf mail_version
~
*インストール [#z0d89031]
+''yum でインストール''
# yum install postfix
~
*設定 [#jb140f2b]
+''main.cf の編集''
# vi /etc/postfix/main.cf
~
以下、矢印箇所を編集
(〜略〜)
# INTERNET HOST AND DOMAIN NAMES
#
# The myhostname parameter specifies the internet hostna...
# mail system. The default is to use the fully-qualified...
# from gethostname(). $myhostname is used as a default v...
# other configuration parameters.
#
#myhostname = host.domain.tld
#myhostname = virtual.domain.tld
myhostname = hogehoge.mydomain.com ...
# The mydomain parameter specifies the local internet do...
# The default is to use $myhostname minus the first comp...
# $mydomain is used as a default value for many other co...
# parameters.
#
#mydomain = domain.tld
mydomain = mydomain.com ...
# SENDING MAIL
#
# The myorigin parameter specifies the domain that local...
# mail appears to come from. The default is to append $m...
# which is fine for small sites. If you run a domain wi...
# machines, you should (1) change this to $mydomain and ...
# a domain-wide alias database that aliases each user to
# user@that.users.mailhost.
#
# For the sake of consistency between sender and recipie...
# myorigin also specifies the default domain name that i...
# to recipient addresses that have no @domain part.
#
#myorigin = $myhostname
#myorigin = $mydomain
myorigin = $mydomain ...
# RECEIVING MAIL
# The inet_interfaces parameter specifies the network in...
# addresses that this mail system receives mail on. By ...
# the software claims all active interfaces on the machi...
# parameter also controls delivery of mail to user@[ip.a...
#
# See also the proxy_interfaces parameter, for network a...
# are forwarded to us via a proxy or network address tra...
#
# Note: you need to stop/start Postfix when this paramet...
#
#inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
inet_interfaces = localhost ...
# Enable IPv4, and IPv6 if supported
inet_protocols = all
(〜略〜)
# DELIVERY TO MAILBOX
#
# The home_mailbox parameter specifies the optional path...
# mailbox file relative to a user's home directory. The ...
# mailbox file is /var/spool/mail/user or /var/mail/user...
# "Maildir/" for qmail-style delivery (the / is required).
#
#home_mailbox = Mailbox
#home_mailbox = Maildir/
home_mailbox = Maildir/ ...
(〜略〜)
# SHOW SOFTWARE VERSION OR NOT
#
# The smtpd_banner parameter specifies the text that fol...
# code in the SMTP server's greeting banner. Some people...
# the mail version advertised. By default, Postfix shows...
#
# You MUST specify $myhostname at the start of the text....
# RFC requirement. Postfix itself does not care.
#
#smtpd_banner = $myhostname ESMTP $mail_name
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_vers...
smtpd_banner = $myhostname ESMTP unknown ...
(〜略〜)
~
+''master.cf の編集''
# vi /etc/postfix/master.cf
~
smtp inet n - n - - ...
↓コメントアウト
#smtp inet n - n - - ...
~
+''メールボックスのディレクトリを作成''
# mkdir -p /etc/skel/Maildir/{new,cur,tmp}
# chmod -R 700 /etc/skel/Maildir/
~
+''メールサーバー切替え(確認)''
# alternatives --config mta
CentOS6.4では1つしかない。
1 プログラムがあり 'mta' を提供します。
選択 コマンド
-----------------------------------------------
*+ 1 /usr/sbin/sendmail.postfix
Enter を押して現在の選択 [+] を保持するか、選択番号を入...
~
+''動作確認''
++起動
# /etc/rc.d/init.d/postfix start
postfix を起動中: ...
~
++メールを送ってみる
# mail -s "[$HOSTNAME] TEST" hoge@mydomain.com
Sample message
. ← .(ドット)で本文終了
hoge@mydomain.com にメールが届けば完了。~
~
+''自動起動設定''
# # chkconfig postfix on
~
*メモ [#f659d6cc]
-mail コマンド
# mail -s "(件名)" メールアドレス
コマンド入力後にメール本文を入力し、改行+「.」(ドット)...
~
''例'':
# mail -s "Test" hoge@mydomain.com
Sample message ← 本文
. ← 入力終了
~
-スクリプト内でのコマンド例
echo "Sample message" | mail -s "Test" hoge@mydomain.com
~
ページ名: