主题:状态=退回(未找到主机或域名。名称服务错误,名称=e-address.myserver.com,类型=A:

主题:状态=退回(未找到主机或域名。名称服务错误,名称=e-address.myserver.com,类型=A:

我想使用 seamonkey mail 发送消息,但没有成功。服务器是 redhat 7.6,postfix 为 2:2.10.1-7.el7。Linux 服务器上的防火墙已禁用。

我向你提供以下信息:

我正在检查 /var/log/mailog 并得到如下行:

[root@myserver ~]# tail -f /var/log/maillog
Jun 20 09:44:56 midomicilio postfix/cleanup[7520]: 6EB8C12D4D9: message-id=<[email protected]>
Jun 20 09:44:56 midomicilio postfix/bounce[7524]: 630A912D4D7: sender non-delivery notification: 6EB8C12D4D9
Jun 20 09:44:56 midomicilio postfix/qmgr[6585]: 6EB8C12D4D9: from=<>, size=2918, nrcpt=1 (queue active)
Jun 20 09:44:56 midomicilio postfix/qmgr[6585]: 630A912D4D7: removed
Jun 20 09:44:56 midomicilio postfix/smtp[7523]: 6EB8C12D4D9: to=<[email protected]>, relay=none, delay=0.02, delays=0/0/0.01/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=e-address.myserver.com type=A: Host not found)
Jun 20 09:44:56 midomicilio postfix/qmgr[6585]: 6EB8C12D4D9: removed

在 /etc/hosts 上我得到:

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
172.24.4.179 e-address.myserver.com

Postfix 配置

[root@myserver ~]# postconf -n
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_sender_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_client_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_helo_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_sender_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_client_restrictions
postconf: warning: /etc/postfix/master.cf: undefined parameter: mua_helo_restrictions
postconf: warning: /etc/postfix/main.cf: undefined parameter: virtual_mailbox_limit_maps
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
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
dovecot_destination_recipient_limit = 1
html_directory = no
inet_interfaces = all
inet_protocols = ipv4
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 30720000
mydestination = localhost, localhost.localdomain
myhostname = e-address.myserver.com
mynetworks = 127.0.0.0/8
newaliases_path = /usr/bin/newaliases.postfix
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = private/auth
smtpd_sasl_type = dovecot
smtpd_tls_cert_file = /etc/pki/dovecot/certs/dovecot.pem
smtpd_tls_key_file = /etc/pki/dovecot/private/dovecot.pem
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 550
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_transport = dovecot
virtual_uid_maps = static:5000
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_create_maildirsize=yes
postconf: warning: /etc/postfix/main.cf: unused parameter: virtual_maildir_extended=yes

答案1

将这些添加到您的配置中,因为您使用的是 /etc/hosts 而不是 DNS

lmtp_host_lookup = native
smtp_host_lookup = native

https://userlinux.net/postfix-resolving-etchosts-entries.html

答案2

感谢您的支持。尽管我成功解决了问题。我会解释的。

为了使它能够通过 seamonkey 邮件发送。我所做的是从其 mysql 数据库的域表上插入行。我的意思是:

insert into insert into domains(domain) values ('e-address.myserver.com');

我有个问题:是否需要执行 postmap /etc/postfix/transport?如果需要,为什么?

相关内容