【问题标题】:Configure Postfix to allow incoming mails only from one (defined) mail-id将 Postfix 配置为仅允许来自一个(定义的)邮件 ID 的传入邮件
【发布时间】:2014-08-24 06:48:31
【问题描述】:
我在 Ubuntu 12.04.5 上使用 Spamassassin 设置了 Postfix。 Postfix 的基本用途是(管道)触发 PHP 文件。到这里我已经成功到达了。
现在,为了避免服务器上不必要的负载,也为了避免不需要的邮件触发我的 PHP 脚本,我想将 Postfix 配置为仅允许来自 my@domain.com 的邮件并拒绝其他所有邮件。
除非邮件来自 my@domain.com,否则如何在邮件服务器上实现这种绝对锁定?
【问题讨论】:
标签:
php
ubuntu-12.04
postfix-mta
email-validation
piping
【解决方案1】:
请将以下smtpd_sender_restrictions 添加到您的main.cf 以仅接收来自my@domain.com 的邮件
#/etc/postfix/main.cf
smtpd_sender_restrictions = check_sender_access regexp:/etc/postfix/mine_only
#/etc/postfix/mine_only
/^my@domain.com$/ OK
/^/ REJECT