msmtp和多个网站

时间:2017-08-31 14:26:22

标签: php email nginx smtp

我有一个带有linode的VPS,我正在运行5个网站,其中一些是基本的php网站,其中一些是wordpress网站。

我使用nginx;

#nginx -v
nginx version: nginx/1.8.0

每个站点使用PHP池;

# php5-fpm -v
PHP 5.5.9-1ubuntu4.20 (fpm-fcgi) (built: Oct  3 2016 13:03:22)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.5.0, Copyright (c) 1998-2014 Zend Technologies
with Zend OPcache v7.0.3, Copyright (c) 1999-2014, by Zend Technologies

我前段时间安装了“msmtp”

 # cat .msmtp_php 
account gmail
tls on
tls_certcheck on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
auth on
host smtp.gmail.com
port 587
user user@domain.com
from noreply@domain.com
password <password>

我想完成以下任务; 每个域都从其自己的域发送一封电子邮件。 基本上;

domain1.com -> noreply@domain1.com
domain2.com -> noreply@domain2.com
domain3.com -> noreply@domain3.com

所有noreply @电子邮件都存在且工作正常。

P.S 每个站点都配置为从同一个域发送电子邮件,但由于我的msmtp设置为硬编码域,因此无效。

请随时发送任何其他建议。

0 个答案:

没有答案