Postfix错误发送邮件

时间:2018-03-31 17:19:05

标签: email postfix dovecot roundcube

我正在设置一个带有postfix,dovecot和roundcubemail的邮件服务器,我会收到电子邮件,但是当我向任何地址发送电子邮件时,系统SMTP Error (454): inserting the recipient "<email>" failed (4.7.1 <email>: Relay access denied) 我的main.cf是这样的:

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no
smtpd_tls_cert_file = /etc/postfix/ssl/mailserver.crt
smtpd_tls_key_file = /etc/postfix/ssl/mailserver.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = <mydomain>
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = <mydomain>, localhost.<mydomain>, localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_tls_auth_only = no
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

注意:当我向我的主机发送邮件时,我会收到它,但是如果我发送邮件到live或gmail,它就不会发送任何内容。

1 个答案:

答案 0 :(得分:0)

您已定义允许sasl auth中继

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination

但是您还没有定义sasl auth应该如何工作

smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous

请参阅我先前类似问题的答案

How to configure my postfix to use Outlook,Thunderbird

相关问题