小编Che*_*udo的帖子

带有正则表达式的 postfix smtp_generic_maps

我刚刚开始尝试使用 postfix 重写发件人地址。debian-7.11我用和运行服务器postfix-2.9.6

内容/etc/postfix/main.cf

[...]
smtp_generic_maps = hash:/etc/postfix/generic
[...]
Run Code Online (Sandbox Code Playgroud)

内容/etc/postfix/generic

santiago@uranus.caoba.fr        santiago.uranus.caoba.fr@caoba-mail.fr
auguste@uranus.caoba.fr         auguste.uranus.caoba.fr@caoba-mail.fr
Run Code Online (Sandbox Code Playgroud)

到目前为止它有效。当用户santiago发送电子邮件时,它会按照santiago.uranus.caoba.fr@caoba-mail.fr我想要的方式发送。

我的问题是我希望任何用户都可以执行此重写,而不必向/etc/postfix/generic. 所以我想知道是否可以通过某种正则表达式来完成,例如:

(.*)@$hostname  $1.$hostname@caoba-mail.fr
Run Code Online (Sandbox Code Playgroud)

这有可能吗?

感谢您的帮助

圣地亚哥

postfix regular-expressions rewritemap

3
推荐指数
1
解决办法
6224
查看次数

标签 统计

postfix ×1

regular-expressions ×1

rewritemap ×1