web-dev-qa-db-ja.com

Postfix-ホストまたはドメインが見つかりません

ローカルネットワーク上のUbuntuにPostfixをインストールしました。

このネットワークには、Exchangeサーバーがあります(ドメインmail.example.comを使用)。次のローカルアドレスにメールを送信できませんでした:[email protected]

relay=none, delay=0.01, delays=0.01/0/0/0, dsn=4.3.5, status=deferred 
(Host or domain name not found. Name service error for name=example.com
type=AAAA: Host found but no data record of requested type)

Postfix relay_domainmain.cfを使用してこの問題を解決しました:

relay_domains = example.com
transport_maps = hash:/etc/postfix/transport

そして、私の/etc/postfix/transport

example.com smtp:[mail.example.com]

これで@example.comでメールを送信できるようになり、いくつかの主要なWebメール(Gmail、Yahoo、Hotmail ...)をテストしました。できます。しかし、なぜ私はアドレスでこのエラーを受け取ったのですか@example.com?別のドメインでこのエラーが発生しないことを確認するにはどうすればよいですか?

私のPostfix設定は:

postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination = SRVWEB, localhost.localdomain, localhost
myhostname = SRVWEB
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relay_domains = domain.com
relayhost =
smtp_generic_maps = hash:/etc/postfix/generic
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
transport_maps = hash:/etc/postfix/transport
24
Vincent LITUR

サーバーはメールの送信時にIPv6を使用しようとしています。 mail.example.comにはAAAAレコード(Aレコードと同じですが、IPv6の場合)がないため、機能しません。

Postfixにnever IPv6を使用する場合は、postconf(5)のマニュアルページで説明されているように、設定ファイルで変更できます。

When IPv6 support is enabled via the inet_protocols parameter,  Post-
fix will do DNS type AAAA record lookups.

When  both IPv4 and IPv6 support are enabled, the Postfix SMTP client
will attempt to connect via IPv6 before attempting to use IPv4.

Examples:

inet_protocols = ipv4
inet_protocols = all (DEFAULT)
inet_protocols = ipv6
inet_protocols = ipv4, ipv6

このドメインのみで変更する場合は、トランスポートマップを変更して読み取ります

example.com smtp-ipv4:[mail.domain.com]
34
Jenny D

私のために働いた単純なPostfix構成。

/etc/postfix/main.cf

myhostname = localhost.testing.com
myorigin = testing.com
relayhost =
inet_protocols = ipv4
inet_interfaces = loopback-only
mydestination =
0
joseph