大网数据广告活动
服务器运维问答

Does filling out the Country Name, State etc. matter when creating a self-signed certificate for Postfix?

· 52CE 我爱测

When I set up Postfix I have to create a cert because the snakeoil cert included with Postfix is there strictly for the purpose of demonstration. I use this command: sudo openssl req -x509 -newkey rsa:4096 -sha512 -keyout postfix…

问题原文

原帖链接 · Harold Fischer · CC BY-SA 4.0

When I set up Postfix I have to create a cert because the snakeoil cert included with Postfix is there strictly for the purpose of demonstration. I use this command:

sudo openssl req -x509 -newkey rsa:4096 -sha512 -keyout postfix-key.pem -out postfix-cert.pem -days 3650

This prompts me with Country Name, State or Province Name, etc.

Is there any purpose in the context of Postfix that one would bother to fill out the certificate as accurately as possible instead of using the defaults? I'm trying to make my Postfix server as legit as possible to avoid blacklisting and such, so I am wondering if filling out the cert as accurately as possible would make any difference, for example, when sending an email from my Postfix server to a Gmail account.

已采纳解答

原帖链接 · Anthony Geoghegan · CC BY-SA 4.0

If you’re happy to have that information in the public domain, it doesn’t do any harm to fill it in. However, there’s no real need to broadcast this data (e.g., as a private citizen, I dislike having that kind of information publicised in the WHOIS database). For receiving MTAs to accept SMTP over TLS, you don’t even have to ensure that the FQDN of your mail server is listed in the certificate Common Name or DNS Names (Subject Alternative Name) as is required for HTTPS.

In my experience, the details of X.509 certificate has no bearing on whether a remote MTA treats SMTP connections as legitimate. I conducted an experiment just now by reconfiguring my Postfix server to use an X.509 certificate that had expired 6 days ago and sent a few emails using it. All receiving MTAs accepted the messages; GMail headers verified that the message had been received via TLS 1.2.

Using a non-blacklisted IP address and configuring SPF, DKIM, Forward-confirmed reverse DNS and other related techniques are the best ways for your email to be treated as legitimate.

Currently, most mail servers are configured to accept self-signed certificates for SMTP over TLS but that may not remain the case over the coming years. To be on the safe side, I ensure that my mail server’s FQDN is included in the certificate’s DNS Names (Subject Alternative Name) and that the certificate is signed (gratis) by the awesome Let’s Encrypt Certificate Authority.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-05-16)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。