发件人地址需要域名

发件人地址需要域名

我正在尝试在刚买的新 VPS 上设置 Postfix,这是我第一次进行任何类型的电子邮件设置。我在尝试执行测试电子邮件时收到错误。我发布了我的配置和错误,我想知道我是否在某个地方犯了错误?我正在运行 Ubuntu 12.04 LTS VPS。

收到错误:

mail from:<jhvisser>
250 2.1.0 <jhvisser>... Sender ok
rcpt to:<jhvisser>
553 5.5.4 <jhvisser>... Domain name required for sender address jhvisser

配置如下:

# 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 = yes

# Uncomment the next line to geneAug 23 10:15:36 jhvisser sm-mta[15093]: r7NEExQ1015093: from=<[email protected]>, size=5, class=0, nrcpts=1, proto=SMTP, daemon=MTA-v4, relay=localhost.localdomain [127.0.0.1]

8 月 23 日 10:15:36 jhvisser sm-mta[15093]: r7NEExQ1015093: from=, size=5, class=0, nrcpts=1, proto=SMTP, daemon=MTA-v4, reply=localhost.localdomain [127.0.0.1] 速率“延迟邮件”警告 #delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt
smtpd_tls_key_file = /etc/ssl/private/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 = jhvisser.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = jhvisser.com
mydestination = jhvisser.com, localhost.com, , localhost
relayhost = 
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = 
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
home_mailbox = Maildir/
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/ssl/certs/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

新错误:

helo localhost
250 jhvisser.com Hello localhost.localdomain [127.0.0.1], pleased to meet you
mail from:<[email protected]>
250 2.1.0 <[email protected]>... Sender ok
rcpt to:<[email protected]>
250 2.1.5 <[email protected]>... Recipient ok
data
354 Enter mail, end with "." on a line by itself
test
.
421 4.3.0 collect: Cannot write ./dfr7NDpBPF014521 (bfcommit, uid=0, gid=112): No such file or directory
Connection closed by foreign host.

日志:

Aug 23 10:15:36 jhvisser sm-mta[15093]: r7NEExQ1015093: from=<[email protected]>, size=5, class=0, nrcpts=1, proto=SMTP, daemon=MTA-v4, relay=localhost.localdomain [127.0.0.1]

答案1

postconf -n | grep reject并查看参数“smtpd_sender_restrictions”:检查是否有“reject_non_fqdn_sender”。

事实上,你应该使用“[电子邮件保护]“作为发件人地址,因为如果出现问题,目标用户将无法回复您。

相关内容