Postfix

提供: Wikinote
移動: 案内検索

相変わらず MTA は苦手。

覚え書き

  • メールキューを空にする # postsuper -d ALL
  • MTA を切り替える # alternatives --config mta

参考文献

設定

とりあえずデフォルトをうちに合わせてみた例。

## ローカルなパス名の情報
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix

## キューとプロセスの所有権
mail_owner = postfix

## インターネットのホストとドメイン名
# インターネット上のホスト名 (FQDN)
myhostname = lab.hagio.org
# インターネットドメイン名
mydomain = hagio.org

## メールの送信
# このマシンから送信されたメールに現れるドメイン名
myorigin = $mydomain

## メールの受信
# 受信するインタフェース
inet_interfaces = all
# 送信先が以下となっているメールを受信する
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#
unknown_local_recipient_reject_code = 550
# メールリレーを許可する信頼できるネットワークを指定
mynetworks_style = host

## エイリアスデータベース
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases

## メールボックスへの配送
# Mailbox or Maildir/
home_mailbox = Maildir/

## デバッグ制御
debug_peer_level = 2
debugger_command =
        PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
        xxgdb $daemon_directory/$process_name $process_id & sleep 5

## インストール時設定情報
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/share/man
sample_directory = /usr/share/doc/postfix-2.3.3/samples
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES

## セキュリティ対策
disable_vrfy_command = yes
smtpd_helo_required = yes
smtpd_banner = $myhostname ESMTP

参考文献