首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >后缀smtpd_restriction_classes不工作

后缀smtpd_restriction_classes不工作
EN

Server Fault用户
提问于 2018-10-01 15:18:05
回答 1查看 535关注 0票数 1

我试图限制谁可以在服务器上发送电子邮件。我在main.cf中使用这个指令:

代码语言:javascript
复制
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access

/etc/mailname的内容是:

代码语言:javascript
复制
cassiopeia.caoba.fr

/etc/后缀/发件人_access的内容是:

代码语言:javascript
复制
santiago@cassiopeia.caoba.fr   REJECT

当然,散列文件是用以下内容创建的:

代码语言:javascript
复制
sudo postmap /etc/postfix/sender_access

“后缀”重新启动时:

代码语言:javascript
复制
sudo /etc/init.d/postfix restart

尽管如此,圣地亚哥仍然能够完美地发送电子邮件。示例:

代码语言:javascript
复制
echo $RANDOM | mail -s "Test" my_personnal_address@gmail.com

我的main.cf文件是:

代码语言:javascript
复制
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
readme_directory = no
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
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
smtp_generic_maps = pcre:/etc/postfix/generic
myorigin = /etc/mailname
mydestination = localhost localhost.$mydomain $myhostname
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_mechanism_filter =
smtp_sasl_security_options =
relayhost = mail.authsmtp.com:2525
smtp_tls_security_level = encrypt
smtp_tls_mandatory_ciphers = high
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4

含金量

EN

回答 1

Server Fault用户

发布于 2018-10-01 21:24:19

mail不使用SMTP协议,因此smtpd_sender_restrictions不适用。

票数 1
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/933480

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档