现在,postfix 已通过 auth 设置。我想删除使用用户名和密码的用户登录。我想创建匿名 SMTP 邮件服务器。我应该更改哪个路径或删除哪一行?
我的 main.cf 正在关注
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
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
myhostname = smtp.wpecho.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = smtp.wpecho.com, localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
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
smtpd_tls_auth_only = no
#Use these on Postfix 2.2.x only
#smtp_use_tls = yes
#smtpd_use_tls = yes
#For Postfix 2.3 or above use:
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/ssl/private/smtpd.key
smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt
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
always_bcc = [email protected]
答案1
它已配置为接受经过身份验证的用户、您网络中的用户或已知邮件地址(smtpd_recipient_restrictions
)。
因此,最简单的解决方法是将内部网络添加到mynetworks
变量中。类似这样的操作应该可以满足您的要求(假设这192.168.x.x
是您的内部网络)。这/8
意味着直到第一个点的所有内容都必须相同,并且意味着/16
直到第二个点的所有内容都必须与您的定义相等。
mynetworks = 127.0.0.0/8 192.168.0.0/16
答案2
您想通过互联网还是仅在私有 LAN 上访问它?如果在互联网上:这是一个糟糕的想法,您会在短时间内吸引大量垃圾邮件发送者,并且此后不久将无法发送任何邮件,因为您将被合法邮件服务器阻止。
答案3
你没有说明要从哪里接收匿名邮件,所以要小心不要让自己成为开放中继。然而,这smtpd_recipient_restrictions
是你需要更改的,这里有相关文档http://www.postfix.org/postconf.5.html#smtpd_recipient_restrictions