【问题标题】:Postfix error sending mailPostfix 发送邮件出错
【发布时间】:2018-08-02 02:59:00
【问题描述】:

我正在设置一个带有 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,它不会发送任何内容。

【问题讨论】:

    标签: email postfix dovecot roundcube


    【解决方案1】:

    您已定义允许 sasl auth 中继

    smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
    

    但您尚未定义 sasl 身份验证应该如何工作

    smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    

    查看我之前类似问题的回答

    How to configure my postfix to use Outlook,Thunderbird

    【讨论】:

      猜你喜欢
      • 2014-07-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-24
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-19
      相关资源
      最近更新 更多