【发布时间】:2012-01-07 03:41:44
【问题描述】:
尝试匿名接收来自经过身份验证的 postfix 用户的中继消息的标头,https://we.riseup.net/debian/anonymizing-postfix 中有一个示例:
/^Received: from (.* \([-._[:alnum:]]+ \[[.[:digit:]]{7,15}\]\)).*?([[:space:]]+).*\(Authenticated sender: ([^)]+)\).*by (auk\.riseup\.net) \(([^)]+)\) with (E?SMTPS?A?) id ([A-F[:digit:]]+).*/ REPLACE Received: from [127.0.0.1] (localhost [127.0.0.1])$2(Authenticated sender: $3)${2}with $6 id $7
编辑文件regexp:/etc/postfix/header_checks时,结果是错误消息:
第 15 行:重复运算符操作数无效
现在我的猜测是上面的正则表达式是 PCRE 格式,我的 Postfix 请求一个 POSIX 兼容的正则表达式。
如何使上述正则表达式 POSIX regexp 兼容以在 Postfix header_checks 文件中使用?
【问题讨论】:
标签: regex posix pcre postfix-mta