无法发送外发电子邮件

无法发送外发电子邮件

我在从本地主机域向出站电子邮件服务器(gmail、yahoo 等)发送电子邮件时遇到问题。我可以发送入站电子邮件,但当我尝试向我的 gmail 帐户发送电子邮件测试时,它不起作用。是否可以使用 发送出站电子邮件postfix,这非常令人沮丧,我已经尝试了 2 天,我希望得到一些帮助。这是我的main.cf文件:

# 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 (Ubuntu)
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 = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.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.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_un$
myhostname = Server
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail.mydomainlocalhost.com, Server, localhost.localdomain, localhost, domain.c$
#relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.0.0/24
mailbox_size_limit = 0
recipient_delimiter = +
myhostname = Server
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail.mydomainlocalhost.com, Server, localhost.localdomain, localhost, domain.c$
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.0.0/24
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
home_mailbox = Maildir/
smtpd_sasl_type = dovecot

答案1

根据您的邮件mail.cf服务器用户dovecot,,ssl...private cert

也许从您已有的手册或新的手册开始是一个好的解决方案。

我不知道你的愿望/需要什么。

为了急救,请尝试跑步

sudo dpkg-reconfigure postfix

和休耕wizard

1) Choose 'Internet with smarthost' (recommended) to use another mail server for relaying mail 

2) Enter system mail name (mail.your_domain.com)

3) Enter SMTP relay host (your_isp_smtp_server.com)

4) Root and postmaster mail recipient ([email protected])

5) Other destinations to accept mail for (mail.your_domain.com, localhost.foo.tld, localhost)

6) Force synchronous updates on mail queue (No)

7) Local networks (127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128)

9) Mailbox size limit (bytes) (0)

10) Local address extension character (+)

11) Internet protocols to use (ipv4 is the safe choice)

尝试。

相关内容