我的服务器上托管了两个域名,现在我想为我的邮件服务器设置这两个域名,但我遇到了麻烦。本地运行正常,但当它来自外部(hotmail、gmail...)时,它不起作用。
如果我尝试检查我的日志,什么都没有发生。(/var/log/mail.log
& /var/log/mail.err
)
# DKIM
# --------------------------------------
milter_default_action = accept
milter_protocol = 2
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
content_filter = scan:127.0.0.1:10026
receive_override_options = no_address_mappings
header_checks = regexp:/etc/postfix/header_checks
smtp_header_checks=regexp:/etc/postfix/add_x_header
和我的master.cnf
smtp inet n - - - - smtpd -o content_filter=spamassassin
spamassassin unix - n n - - pipe
user=spamd argv=/usr/bin/spamc -f -e
/usr/sbin/sendmail -oi -f ${sender} ${recipient}
smtp-amavis unix - - n - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes
-o max_use=20
127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o smtpd_delay_reject=no
-o smtpd_client_restrictions=permit_mynetworks,reject
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o smtpd_data_restrictions=reject_unauth_pipelining
-o smtpd_end_of_data_restrictions=
-o smtpd_restriction_classes=
-o mynetworks=127.0.0.0/8
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o smtpd_client_connection_count_limit=0
-o smtpd_client_connection_rate_limit=0
-o receive_override_options=no_header_body_checks,no_unknown_recipient_checks
-o local_header_rewrite_clients=
针对这个问题有什么建议吗?
答案1
您需要MX
在 DNS 设置中添加一条记录。假设您的mailserver
IP 为1.2.3.4
,则需要在my.doomain.zone
文件中添加:
domain.com. MX 10 mail.domain.com.
mail A 1.2.3.4