以下のような構成でローカル環境にサーバを構築し、aaa@haru.local - bbb@aki.local間でメールを送受信したいのですが上手くいきません。
自分自身にメールを送るのは出来るのでゾーンファイルの記述に問題があるのではないかと推察しています。
以下の2パターン試したのですがダメでした。aaa@haru.local側の設定を記載します。
###1, 単一のゾーンファイルにaki.localの情報を追記
# cat /var/named/haru.local.zone $TTL 3600 @ IN SOA ns.haru.local. root.haru.local ( 20200706 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum IN A 192.168.1.1 IN NS ns.haru.local. IN MX 10 mx.haru.local. # 追記分 aki.local. IN MX 20 mx.aki.local. IN AAAA ::1 @ IN A 192.168.1.1 ns IN A 192.168.1.1 localhost IN A 127.0.0.1 mx IN A 192.168.1.1 # 追記分 mx.aki.local. IN A 192.168.1.2 #
Zoneファイルを2つ作成 ※/etc/named.confにzoneファイル2つ記載済み
# cat /var/named/haru.local.zone $TTL 3600 @ IN SOA ns.haru.local. root.haru.local ( 20190904 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum IN A 192.168.1.1 IN NS ns.haru.local. IN MX 10 mx.haru.local. IN AAAA ::1 @ IN A 192.168.1.1 ns IN A 192.168.1.1 localhost IN A 127.0.0.1 mx IN A 192.168.1.1 #
# cat /var/named/aki.local.zone $TTL 3601 @ IN SOA ns.haru.local. root.haru.local ( 20200706 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum aki.local. IN NS ns.haru.local. aki.local. IN MX 10 mx.aki.local. IN AAAA ::1 ns.haru.local. IN A 192.168.1.1 aki.local. IN A 192.168.1.2
どちらの場合でもaki.localのdigが引けず、Zoneファイルの記述に問題があるように見えるのですが原因が分かりません。考えられる原因はございますでしょうか。
# dig haru.local ; <<>> DiG 9.9.4-RedHat-9.9.4-74.el7_6.2 <<>> haru.local ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28465 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 2 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;haru.local. IN A ;; ANSWER SECTION: haru.local. 3600 IN A 192.168.1.1 ;; AUTHORITY SECTION: haru.local. 3600 IN NS ns.haru.local. ;; ADDITIONAL SECTION: ns.haru.local. 3600 IN A 192.168.1.1 ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: 月 7月 06 18:39:52 JST 2020 ;; MSG SIZE rcvd: 88 # dig aki.local ; <<>> DiG 9.9.4-RedHat-9.9.4-74.el7_6.2 <<>> aki.local ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 48725 ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1 ;; OPT PSEUDOSECTION: ; EDNS: version: 0, flags:; udp: 4096 ;; QUESTION SECTION: ;aki.local. IN A ;; Query time: 0 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: 月 7月 06 18:39:56 JST 2020 ;; MSG SIZE rcvd: 38 [root@c140 named]#
> 以下のような構成でローカル環境にサーバを構築し、aaa@haru.local - bbb@aki.local間でメールを送受信したいのですが上手くいきません。
Postfix では、どのようなエラーメッセージが出ているのでしょうか?
エラーメッセージを見て、DNS の問題と確定しているのでしょうか?
また、BIND ということですが、 /etc/named.conf は、どのような設定になっていますか?
回答ありがとうございます。Postfixではこちらです。named.confも記載致します。
下記メッセージおよび、digが引けていないことからDNS側ではと推察致しました。
```
<bbb@aki.local>: Host or domain name not found. Name service error for
name=aki.local type=AAAA: Host not found
```
```
# cat /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// See the BIND Administrator's Reference Manual (ARM) for details about the
// configuration located in /usr/share/doc/bind-{version}/Bv9ARM.html
options {
# listen-on port 53 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
recursing-file "/var/named/data/named.recursing";
secroots-file "/var/named/data/named.secroots";
allow-query { any; };
/*
- If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
- If you are building a RECURSIVE (caching) DNS server, you need to enable
recursion.
- If your recursive DNS server has a public IP address, you MUST enable access
control to limit queries to your legitimate users. Failing to do so will
cause your server to become part of large scale DNS amplification
attacks. Implementing BCP38 within your network would greatly
reduce such attack surface
*/
recursion yes;
forwarders { 8.8.8.8; 8.8.4.4; };
dnssec-enable yes;
dnssec-validation yes;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
zone "haru.local" IN {
type master;
file "haru.local.zone";
};
# add 20200706
zone "aki.local" IN {
type master;
file "aki.local.zone";
};
zone "11.168.192.in-addr.arpa" {
type master;
file "haru.local.rev";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
[root@c140 log]#
```
回答1件
あなたの回答
tips
プレビュー
