mail/postfix: Missing TLS certificate verification for upstream SMTP authentication
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 54/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- php
调研方向
Start with the Postfix model at mail/postfix/src/opnsense/mvc/app/models/OPNsense/Postfix/General.xml and the main.cf template at mail/postfix/src/opnsense/service/templates/OPNsense/Postfix/main.cf. Check how TLS security levels and SMTP authentication settings are exposed and generated, then compare them with the Postfix TLS and SASL requirements cited in the issue. Done means the plugin provides authenticated TLS options and handles upstream authentication consistently with those requirements.
由索引模型根据 Issue 内容生成。
描述
Important notices
Before you add a new report, we ask you kindly to acknowledge the following:
- I have read the contributing guide lines at https://github.com/opnsense/plugins/blob/master/CONTRIBUTING.md
- I have searched the existing issues, open and closed, and I'm convinced that mine is new.
- The title contains the plugin to which this issue belongs
Describe the bug
First off, thanks for all the great work! This is more of a security-relevant configuration limitation than a bug.
I was about to set up the Postfix plugin (for the first time), but noticed it currently exposes only none, may, encrypt and dane as SMTP client TLS security levels. See here.
The encrypt security level requires encryption but does not require successful certificate or hostname verification. When SMTP authentication is enabled, this can expose SMTP credentials to an active man-in-the-middle attacker.
Enabling TLS without server authentication is not sufficiently secure in this context. See postfix docs.
Even though TLS encryption is always used, mail delivery continues even if the server certificate is untrusted or bears the wrong name.
The plugin's main.cf template also clears smtp_sasl_security_options when upstream SMTP authentication is enabled, allowing plaintext authentication mechanisms such as SASL PLAIN.
Using SASL PLAIN with the encrypt security level is at odds with RFC 4954, Section 14, which requires successful server certificate and hostname verification before authentication. See RFC4954.
If the server has not provided any certificate, or if the certificate verification fails, the client MUST NOT attempt to authenticate using the SASL PLAIN mechanism.
I didn't try to override the config because this open issue reports that modifications to the main.cf template are overwritten on every upgrade.
Please consider exposing the verify and secure TLS security levels and enforcing or recommending authenticated TLS when upstream SMTP authentication is enabled. This would protect SMTP credentials against server impersonation.
Additional context
This report is based on looking for the option, followed by source-code inspection and the documented behavior of Postfix. I have not reproduced credential disclosure in a live environment.
Environment
OPNsense 26.7.10
- 主要语言
- PHP
- 星标
- 1.2k
- 派生
- 932
- 平均合并
- 1 天 11 小时
- 30 天内合并 PR
- 22
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
opnsense/plugins 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
www/squid: configctl proxy stop returns before Squid exits, so stop+start (e.g. Monit restart) fails未关闭support
难度 2/5 1-3 小时 新手友好度 70/100
opnsense/plugins#5983 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 83/100
维护者通常 1 天内回复
-
net/haproxy: IPv6 literal in real server "Source address" generates an invalid `source` directive可能已有人在做 @fraenki 于 6 天前认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 68/100
opnsense/plugins#5973 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[dns/ddclient] Support hiding unused standard fields per service (optional_hiding)可能已有人在做 @bringha1 于 9 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
Automattic/blocks-engine#7881 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 86/100
iruzen-dono/workless#117 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
magicsunday/webtrees-docker#285 ·
维护者通常 1 天内回复
-
area/tests type/bug when/soon
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
WP-CLI 3.0 fixes the cron lock and core download bugs described in the handbook可能已有人在做 @mayankmajeji 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 85/100
WordPress/hosting-handbook#521 ·