質問編集履歴

1 domain hide

switch0805

switch0805 score 25

2018/07/05 16:07  投稿

postfixでのメールサーバー立ち上げについて
こんばんは。
現在メールサーバーを建てようと試みているところですが、どうにもうまく動作しません。設定ファイルにはpostfix checkで検証してもエラーは出ず、postfix serviceも正常に稼働している模様です。以下確認した事象と設定ファイルです。
・確認した事象
telnet mydomain.com 25実行後
Trying xx.xx.xx.xx...
Connected to mydomain.com.
Escape character is '^]'.
220 mail.trippp.tokyo ESMTP
220 mail.mydomain.com ESMTP
^]
502 5.5.2 Error: command not recognized
・設定ファイル
```
compatibility_level = 2
queue_directory = /var/spool/postfix
command_directory = /usr/bin
daemon_directory = /usr/lib/postfix/bin
data_directory = /var/lib/postfix
mail_owner = postfix
#default_privs = nobody
myhostname = mail.mydomain.com
#myhostname = virtual.domain.tld
mydomain = mydomain.com
#myorigin = $myhostname
myorigin = $mydomain
inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
#proxy_interfaces =
#proxy_interfaces = 1.2.3.4
#mydestination = $myhostname, localhost.$mydomain, localhost
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
#   mail.$mydomain, www.$mydomain, ftp.$mydomain
#local_recipient_maps = unix:passwd.byname $alias_maps
#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
#local_recipient_maps =
unknown_local_recipient_reject_code = 550
#mynetworks_style = class
#mynetworks_style = 192.168.0.1/24
mynetworks_style = 127.0.0.0/24
mynetworks = 168.100.189.0/28, 127.0.0.0/8
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table
relay_domains = $mydestination
# INTERNET OR INTRANET
#relayhost = $mydomain
#relayhost = [gateway.my.domain]
#relayhost = [mailserver.isp.tld]
#relayhost = uucphost
#relayhost = [an.ip.add.ress]
#relay_recipient_maps = hash:/etc/postfix/relay_recipients
#in_flow_delay = 1s
#alias_maps = dbm:/etc/aliases
#alias_maps = hash:/etc/aliases
#alias_maps = hash:/etc/aliases, nis:mail.aliases
#alias_maps = netinfo:/aliases
alias_maps = hash:/etc/postfix/aliases
#alias_database = dbm:/etc/aliases
#alias_database = dbm:/etc/mail/aliases
#alias_database = hash:/etc/aliases
#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases
alias_database = $alias_maps
#recipient_delimiter = +
#home_mailbox = Mailbox
#home_mailbox = Maildir/
mail_spool_directory = /srv/mail
#mail_spool_directory = /var/spool/mail
#mailbox_command = /some/where/procmail
#mailbox_command = /some/where/procmail -a "$EXTENSION"
#mailbox_transport = cyrus
#fallback_transport = lmtp:unix:/file/name
#fallback_transport = cyrus
#fallback_transport =
#luser_relay = $user@other.host
#luser_relay = $local@other.host
#luser_relay = admin+$local
 
header_checks = regexp:/etc/postfix/header_checks
#fast_flush_domains = $relay_domains
smtpd_banner = $myhostname ESMTP
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
#local_destination_concurrency_limit = 2
#default_destination_concurrency_limit = 20
debug_peer_level = 2
#debug_peer_list = 127.0.0.1
#debug_peer_list = some.domain
debugger_command =
    PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
    ddd $daemon_directory/$process_name $process_id & sleep 5
# debugger_command =
#   PATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH; screen
#   -dmS $process_name gdb $daemon_directory/$process_name
#   $process_id & sleep 1
# INSTALL-TIME CONFIGURATION INFORMATION
#
# The following parameters are used when installing a new Postfix version.
#
# sendmail_path: The full pathname of the Postfix sendmail command.
# This is the Sendmail-compatible mail posting interface.
#
sendmail_path = /usr/bin/sendmail
# newaliases_path: The full pathname of the Postfix newaliases command.
# This is the Sendmail-compatible command to build alias databases.
#
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 = /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 = postdrop
# html_directory: The location of the Postfix HTML documentation.
#
html_directory = no
# manpage_directory: The location of the Postfix on-line manual pages.
#
manpage_directory = /usr/share/man
# sample_directory: The location of the Postfix sample configuration files.
# This parameter is obsolete as of Postfix 2.1.
#
sample_directory = /etc/postfix
# readme_directory: The location of the Postfix README files.
#
readme_directory = /usr/share/doc/postfix
inet_protocols = ipv4
meta_directory = /etc/postfix
shlib_directory = /usr/lib/postfix
message_size_limit = 5242880
disable_vrfy_command = yes
smtpd_helo_required = yes
strict_rfc821_envelopes = yes
allow_percent_hack = yes
swap_bangpath = yes
allow_untrusted_routing = no
smtpd_client_restrictions =
  permit_mynetworks,
  reject_unknown_client,
  permit
smtpd_data_restrictions =
  reject_unauth_pipelining,
  reject_multi_recipient_bounce
smtpd_helo_restrictions =
  permit_mynetworks,
  reject_invalid_hostname,
  reject_non_fqdn_hostname,
  reject_unknown_hostname,
  permit
smtpd_sender_restrictions =
  permit_mynetworks,
  reject_unknown_sender_domain,
  reject_non_fqdn_sender,
  permit
smtpd_recipient_restrictions =
  permit_mynetworks,
  reject_non_fqdn_recipient,
  reject_unknown_recipient_domain,
  reject_unauth_destination,
  permit
smtpd_etrn_restrictions =
  permit_mynetworks,
  reject_invalid_hostname,
  permit
```
不足の情報などあればお手数をおかけし大変恐縮ですが、ご教授のほどよろしくお願いいたします。
以上よろしくお願い申し上げます。
  • Linux

    7461 questions

    Linuxは、Unixをベースにして開発されたオペレーティングシステムです。日本では「リナックス」と呼ばれています。 主にWebサーバやDNSサーバ、イントラネットなどのサーバ用OSとして利用されています。 上位500のスーパーコンピュータの90%以上はLinuxを使用しています。 携帯端末用のプラットフォームAndroidは、Linuxカーネル上に構築されています。

  • Postfix

    467 questions

    Postfixは、電子メールサーバソフトウェアで、 メールを配送するシステムMTAの一種です。

思考するエンジニアのためのQ&Aサイト「teratail」について詳しく知る