简体   繁体   English

PHP + Postfix MTA:请勿使用TLS

[英]PHP + Postfix MTA: Do NOT use TLS

I've installed Postfix and PHP on one of my servers (Debian) 我已经在其中一台服务器(Debian)上安装了Postfix和PHP。

TLS in Postfix' configuration is enabled: 已在Postfix的配置中启用TLS:

  • smtp_use_tls = yes
  • smtp_tls_security_level = may

Regularly I need to send out a newsletter Email to ~1,000 addresses. 我通常需要向约1000个地址发送时事通讯电子邮件。
These mails are "send" via PHP's mail() function. 这些邮件通过PHP的mail()函数“发送”。 PHP hands these Emails over to Postfix for delivery. PHP将这些电子邮件移交给Postfix进行传递。

Is there a way to disable TLS when "sending" mails from PHP? 从PHP“发送”邮件时,有没有一种方法可以禁用TLS?
Can this be done by somehow modifying Postfix' master.cf ? 可以通过修改Postfix的master.cf来完成吗?

It should work like this: 它应该像这样工作:

  • Incoming Emails -> Use TLS 传入电子邮件->使用TLS
  • Outgoing Emails -> Use TLS 外发电子邮件->使用TLS
  • Outgoing Emails from PHP -> Do not use TLS 来自PHP的外发电子邮件->不要使用TLS

In other words: 换一种说法:
Can Postfix be configured to deliver mails without TLS if they are received via a different port? 如果通过其他端口接收邮件是否可以将Postfix配置为不使用TLS传递邮件?
Like this: 像这样:

  • Outgoing Emails when received from Port 25 -> Use TLS 从端口25接收到的外发电子邮件->使用TLS
  • Outgoing Emails when received from Port xy -> Do not use TLS 从端口xy收到的外发电子邮件->不使用TLS

除非您设置单独的Postfix实例,否则这是不可能的。

Yes it can. 是的,它可以。

You may need to use an actual SMTP client via PHP (eg SwiftMailer ), but you can host smtpd with separate options on a separate port, eg 您可能需要通过PHP使用实际的SMTP客户端(例如SwiftMailer ),但是您可以在单独的端口上托管带有单独选项的smtpd,例如

192.168.22.2:10587 inet  n       -       n       -       10      smtpd
  -o syslog_name=submission/mass-mail
  -o smtpd_tls_security_level=none
  -o smtpd_relay_restrictions=
  -o smtpd_recipient_restrictions=permit_mynetworks,reject
  -o mynetworks=127.0.0.0/8,192.168.22.2/24

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM