Postfix SMTP 服务器问题

Postfix SMTP 服务器问题

所以我的网站有一台 Ubuntu Linux 机箱机器。(不是在家里本地运行的,它是一个公共 Linux 机箱)。但出于某种奇怪的原因,我只能在 Outlook 中从我的家用机器向这个机箱发送电子邮件。如果我使用不同的 IP/运营商,我在 telnet 时会收到拒绝连接的信息。

房屋外部

$ telnet allocatethis.com 25
Trying 64.34.218.41...
telnet: Unable to connect to remote host: Connection refused

屋内

$ telnet allocatethis.com 25
Trying 64.34.218.41...
Connected to www.AllocateThis.com.
Escape character is '^]'.
220 ALLOCATETHIS-L101 ESMTP Postfix powered by Easy Hosting Control Panel (ehcp) on Ubuntu, www.ehcp.net

查看 mail.log 时我也没有看到错误 下面是我的 main.cf 我对 postfix 还不太熟悉,希望能解决这个问题。

谢谢!!

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name powered by Easy Hosting Control Panel (ehcp) on
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = /usr/share/doc/postfix

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.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

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = ALLOCATETHIS-L101
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailnamepostfix/cacert.pem
mydestination = localhost, 64.34.218.41 localhost.allocatethis.com
relayhost =
relay_domains = allocatethis.coma 3600s
mynetworks = 127.0.0.0/8, 192.168.0.0/16, 172.16.0.0/16, 10.0.0.0/8,  64.34.218.0/24
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
html_directory = /usr/share/doc/postfix/html
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,check_client_access hash:/var/lib/pop-before-smtp/hosts,reject_unauth_destinationsmtp_use_tls = yes
smtpd_tls_auth_only = no
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
debug_peer_list =
sender_canonical_maps =
debug_peer_level = 1
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $cano$inet_protocols = all
smtpd_sasl_local_domain =

答案1

ISP 倾向于阻止到端口 25/tcp 的出站连接,以防止僵尸网络垃圾邮件。启用提交(端口 587/tcp,必须需要身份验证)/etc/postfix/master.cf并重新启动 Postfix。配置您的邮件客户端以通过 提交邮件allocatethis.com:587

答案2

该问题与您朋友的 ISP 有关。

端口 25 上的 telnet 在这里起作用。

# telnet allocatethis.com 25
Trying 64.34.218.41...
Connected to allocatethis.com.
Escape character is '^]'.
220 ALLOCATETHIS-L101 ESMTP Postfix powered by Easy Hosting Control Panel (ehcp) on Ubuntu, www.ehcp.net

相关内容