我有与dovecot安装的后缀。 当我尝试从我的服务器发送电子邮件时,没有任何问题,但所有进入的电子邮件都被拒绝。
我的main.cf文件:
queue_directory = /var/spool/postfix command_directory = /usr/sbin daemon_directory = /usr/libexec/postfix mail_owner = postfix inet_interfaces = all mydestination = localhost, $mydomain, /etc/postfix/domains/domains virtual_maps = hash:/etc/postfix/domains/addresses unknown_local_recipient_reject_code = 550 mynetworks = 127.0.0.0/8 alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases home_mailbox = Maildir/ debug_peer_level = 2 debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin xxgdb $daemon_directory/$process_name $process_id & sleep 5 sendmail_path = /usr/sbin/sendmail.postfix newaliases_path = /usr/bin/newaliases.postfix mailq_path = /usr/bin/mailq.postfix setgid_group = postdrop html_directory = no manpage_directory = /usr/share/man sample_directory = /usr/share/doc/postfix-2.3.3/samples readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES smtpd_sasl_type = dovecot smtpd_sasl_path = private/auth smtpd_sasl_auth_enable = yes smtpd_recipient_restrictions = check_policy_service inet:127.0.0.1:9999, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination, smtpd_sender_restriction = reject_non_fqdn_sender broken_sasl_auth_clients = yes
更新:现在,当电子邮件到服务器,服务器尝试重新路由邮件。 例如,如果邮件发送到[email protected],我的服务器将其更改为[email protected],然后邮件会弹跳,因为我的服务器上没有这样的域。
从发布的configuration中,我看不到一个$ myhostname或一个$ mydomain – 如果在main.cf中是这种情况,它只会将@localhost视为本地,其他所有内容将被550拒绝。您可以发送是saslauthentication。
添加$ mydomain = yourdomainname.com,它应该工作。