表題どおりです。サーバは、ceontos7を利用しています。メールサーバーとクライアント側にそれぞれyum install postfixでpostfixをインストールしました。
その後、クライアントのcentos7に
//main.cf
relayhost = 10.10.10.15
メールサーバの方に
//main.cf
inet_interfaces = all resolve_numeric_domain = yes
を追記しました。
メールサーバの方のfirewallは無効にしました。
メールの疎通の確認のため、クライアントから以下のメールを送信しました。
[root@localhost ~]# sendmail test@gmail.com From:var@var.com To:foo@foo.com Subject:テスト送信 テスト送信しました。 .
結果、送信できず、メールサーバのところでうまく言っていないようです。エラーのログは以下のようになっていました。
[root@localhost ~]# tail /var/log/maillog Aug 7 00:51:00 localhost postfix/smtpd[19051]: connect from unknown[10.10.10.12] Aug 7 00:51:01 localhost postfix/smtpd[19051]: disconnect from unknown[10.10.10.12] Aug 7 00:59:31 localhost postfix/smtpd[19056]: connect from unknown[10.10.10.12] Aug 7 00:59:32 localhost postfix/smtpd[19056]: disconnect from unknown[10.10.10.12] Aug 7 01:04:20 localhost postfix/smtpd[19075]: connect from unknown[10.10.10.12] Aug 7 01:04:20 localhost postfix/smtpd[19075]: disconnect from unknown[10.10.10.12] Aug 7 01:09:20 localhost postfix/smtpd[19078]: connect from unknown[10.10.10.12] Aug 7 01:09:20 localhost postfix/smtpd[19078]: disconnect from unknown[10.10.10.12] Aug 7 01:14:20 localhost postfix/smtpd[19080]: connect from unknown[10.10.10.12] Aug 7 01:14:20 localhost postfix/smtpd[19080]: disconnect from unknown[10.10.10.12]
ちなみにメールサーバからクライアントから送ったテストメールは、うまくいきました。原因の方がよくわからないので、教えて欲しいです。よろしくお願いします。
追加
設定内容
postconf -nの内容
クライアントの設定内容
alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5 html_directory = no inet_interfaces = localhost inet_protocols = all mail_owner = postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES relayhost = 10.10.10.15 sample_directory = /usr/share/doc/postfix-2.10.1/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop unknown_local_recipient_reject_code = 550
メールサーバーの設定内容
alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix data_directory = /var/lib/postfix debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5 html_directory = no inet_interfaces = all inet_protocols = all mail_owner = postfix mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost mynetworks = 168.100.189.0/28, 127.0.0.0/8, 10.10.10.0/24 newaliases_path = /usr/bin/newaliases.postfix queue_directory = /var/spool/postfix readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES resolve_numeric_domain = yes sample_directory = /usr/share/doc/postfix-2.10.1/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop unknown_local_recipient_reject_code = 550
クライアントのサーバのエラーログ
Aug 7 01:14:20 localhost postfix/qmgr[2423]: A8B6C184BEB2: from=<root@localhost.localdomain>, size=325, nrcpt=1 (queue active) Aug 7 01:14:20 localhost postfix/smtp[2643]: warning: host 10.10.10.15[10.10.10.15]:25 greeted me with my own hostname localhost.localdomain Aug 7 01:14:20 localhost postfix/smtp[2643]: warning: host 10.10.10.15[10.10.10.15]:25 replied to HELO/EHLO with my own hostname localhost.localdomain Aug 7 01:14:20 localhost postfix/smtp[2643]: A8B6C184BEB2: to=<test@gmail.com>, relay=10.10.10.15[10.10.10.15]:25, delay=4729, delays=4728/0.01/0.09/0, dsn=5.4.6, status=bounced (mail for 10.10.10.15 loops back to myself) Aug 7 01:14:20 localhost postfix/cleanup[2645]: A04C8184BE2D: message-id=<20170806161420.A04C8184BE2D@localhost.localdomain> Aug 7 01:14:20 localhost postfix/qmgr[2423]: A04C8184BE2D: from=<>, size=2186, nrcpt=1 (queue active) Aug 7 01:14:20 localhost postfix/bounce[2644]: A8B6C184BEB2: sender non-delivery notification: A04C8184BE2D Aug 7 01:14:20 localhost postfix/qmgr[2423]: A8B6C184BEB2: removed Aug 7 01:14:20 localhost postfix/local[2646]: A04C8184BE2D: to=<root@localhost.localdomain>, relay=local, delay=0.01, delays=0.01/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox) Aug 7 01:14:20 localhost postfix/qmgr[2423]: A04C8184BE2D: removed
ip addr show eth0の内容を追加
クライアント
[root@localhost ~]# ip addr show eth0 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:15:5d:64:10:15 brd ff:ff:ff:ff:ff:ff inet 10.10.10.12/24 brd 10.10.10.255 scope global dynamic eth0 valid_lft 255903sec preferred_lft 255903sec inet6 fe80::16e4:8368:c667:b5da/64 scope link valid_lft forever preferred_lft forever
メールサーバー
[root@localhost ~]# ip addr show eth0 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 00:15:5d:64:10:12 brd ff:ff:ff:ff:ff:ff inet 10.10.10.15/24 brd 10.10.10.255 scope global dynamic eth0 valid_lft 237857sec preferred_lft 237857sec inet6 fe80::2db:d114:9551:6f23/64 scope link valid_lft forever preferred_lft forever
追加情報 8/8追加
クライアント
[root@localhost ~]# hostname localhost.localdomain [root@localhost ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 [root@localhost ~]# cat /etc/resolv.conf # Generated by NetworkManager nameserver 10.10.10.1 nameserver 10.10.10.9
メールサーバー
[root@localhost ~]# hostname localhost.localdomain [root@localhost ~]# cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 [root@localhost ~]# cat /etc/resolv.conf # Generated by NetworkManager nameserver 10.10.10.1 nameserver 10.10.10.13

回答2件
あなたの回答
tips
プレビュー