这可能保存其他偷看生产力损失了整整一天浪费了我得到这个权利...提防的标签,如果你复制/粘贴)
SParse1
# Append .custom.local to all incoming emails from 12.34.56.78
R$* < $* > $* $: $1 < $2 taglocal. $&{client_addr} .custom.local > $3 add IP into addresses
R$* < $* taglocal.12.34.56.78.custom.local > $* $: $1 < $2 custom.local > $3 convert just this 1 IP we want
R$* < $* taglocal $* > $* $: $1 < $2 > $4 remove IP we added above
对于那些希望爆炸自己的大脑 - Parse1是收件人地址(已经过清理的地方,以及早先规则中已经添加的“<”和“>”)被检查并用于东西。我们所做的是添加任何到达电子邮件地址的IP地址(一个< @ b.com.taglocal.192.168.0.2.custom.local>),然后我们将我们感兴趣的一个IP更改为我们真正想要的,然后我们删除那些我们不想要的东西。
是的 - 很奇怪 - sendmail不能做简单普通的“if/then”,所以我们必须用这个愚蠢的想法来纠缠我们的头。无论谁写这个.cf/.mc的东西都值得获得灵活性的天才勋章,然后被愚蠢到可以写和释放它的同一个中间人扼杀。
来源
2015-05-09 08:24:19
cnd