linux – 如何在Postfix中强制发件人地址为“logged-in-user@example.org”?
发布时间:2020-05-23 19:47:14 所属栏目:Linux 来源:互联网
导读:我已经设置了一个带有SMTP AUTH的Postfix服务器(端口587上的STARTTLS).我的所有用户都在“example.org”域中.我想强制发件人地址为“logged-in-user@example.org”. 我了解到这可以通过main.cf选项实现 smtpd_sender_restrictions = reject_sender_login_mism
|
我已经设置了一个带有SMTP AUTH的Postfix服务器(端口587上的STARTTLS).我的所有用户都在“example.org”域中.我想强制发件人地址为“logged-in-user@example.org”. 我了解到这可以通过main.cf选项实现 smtpd_sender_restrictions = reject_sender_login_mismatch,... smtpd_sender_login_maps = hash:/etc/postfix/smtpd_sender_login_maps 使用login_maps文件,如: a@example.org a b@example.org b c@example.org c ... (另请参阅Block sender address spoofing with SMPT AUTH),但这意味着每次有新用户时我都必须编辑login_maps文件.我不需要这样灵活的映射:它应该始终是“logged-in-user@example.org”.有更简单的选择吗? 解决方法首先,通过输入命令postconf -m并在其中查找带有pcre的行来检查Postfix的安装是否支持pcre.一旦确认您有pcre支持,您可以执行以下操作:/etc/postfix/login_maps.pcre: /^(.*)@example.org$/ ${1}
在main.cf中: smtpd_sender_login_maps = pcre:/etc/postfix/login_maps.pcre 这应该工作正常. (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- linux – 限制用户可以使用supervisor重启哪些进程?
- linux – Cron API:有没有这样的事情?
- 我们可以使用c在linux中创建进程的方法有多少
- linux – / sbin / nologin和/ bin / false有什么区别?
- 在Linux上运行Subversion服务器与Windows相比有什么好处吗?
- linux – Glibc需要多长时间才能编译?
- java – 为什么我能直接从bash执行JAR?
- 为什么我的ZFS池在Linux上使用ZFS不能扩展?
- linux – du -h –max-depth = 1需要很长时间
- linux – 使用xfs,20个磁盘和Ceph的“大型”服务器上的页面
