无法从我的服务器发送邮件,但可以接收邮件

无法从我的服务器发送邮件,但可以接收邮件

我无法从我的服务器发送邮件;但是,我可以接收邮件。我正在使用 Postfix。当我远程登录到端口 25 时,我得到以下输出:

telnet server.example.in 25
Trying 52.xx.xxx.21...
Connected to server.example.in.
Escape character is '^]'.
220 *****************************
421 4.4.2 mail.server.example.in Error: timeout exceeded
Connection closed by foreign host.

问题可能出在哪里?

这是我的 postfix 配置:

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
debug_peer_list = 127.0.0.1
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
default_privs = nobody
dovecot_destination_recipient_limit = 1
home_mailbox = Maildir/
html_directory = no
inet_protocols = all
local_recipient_maps = $virtual_mailbox_maps, $virtual_alias_maps
mail_spool_directory = /var/spool/mail
mailbox_command = /usr/bin/php /var/www/public_html/script/email/incoming_parse.php
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mydomain = server.example.in
myhostname = mail.server.example.in
mynetworks = 0.0.0.0/0 168.100.189.0/28, 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
readme_directory = /usr/share/doc/postfix-2.10.1/README_FILES
relay_domains = $mydestination
sample_directory = /usr/share/doc/postfix-2.10.1/samples
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_banner = $myhostname ESMTP
smtpd_sasl_auth_enable = yes
smtpd_sasl_exceptions_networks = $mynetworks
smtpd_sasl_path = /var/spool/postfix/private/dovecot-auth
smtpd_sasl_security_options = noanonymous
smtpd_sasl_type = dovecot
soft_bounce = no
transport_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = mysql:$config_directory/sql/valias.cf
virtual_gid_maps = static:12
virtual_mailbox_base = /var/vmail
virtual_mailbox_domains = mysql:$config_directory/sql/vdomains.cf
virtual_mailbox_maps = mysql:$config_directory/sql/vmailbox.cf
virtual_minimum_uid = 1150
virtual_transport = dovecot
virtual_uid_maps = static:1150

编辑:

服务器作为 AWS 上的 EC2 实例运行。

答案1

Amazon 限制从 EC2 实例发送电子邮件。这是为了防止服务器被垃圾邮件发送者滥用。

相关内容