Concrete5 email problems
Permalink
concrete5 is not properly constructing emails.
The email software on the server expects a proper “From:” header in the input. If missing, the “From:” is constructed from the Unix username and @server name.
The email log on the server is showing all the emails are being sent as Unix username@server name
Here is an example from the mail log:
Jan 29 14:34:33 cmsserver postfix/qmgr[926]: 79AD4204D3C: from=<testsite02@localdomain>, size=713, nrcpt=1 (queue active)
Jan 29 14:34:33 cmsserver postfix/smtp[1816]: 79AD4204D3C: to=<kathy@testdomain.org>, relay=smtp.testserver.net[192.168.212.25]:25, delay=0.12, delays=0.02/0/0.06/0.04, dsn=2.6.0, status=sent (250 2.6.0 message accepted (2rywxz))
If the from= does not contain a valid domain, it will be rejected by some servers.
To fix this, we had to change Line 1176 of concrete/libraries/3rdparty/Zend/Mail.php
Replaced:
$transport = new Zend_Mail_Transport_Sendmail();
With:
$transport = new Zend_Mail_Transport_Sendmail('-fNoReply@testdomain.com');
After that change, this is what the email log shows:
Jan 29 14:31:18 cmsserver postfix/qmgr[926]: 4143A204D3B: from=<NoReply@testdomain.com>, size=1115, nrcpt=1 (queue active)
Jan 29 14:31:18 cmsserver postfix/smtp[1653]: 4143A204D3B: to=<kathy@testdomain.org>, relay= smtp.testserver.net[192.168.212.25]:25, delay=0.21, delays=0.08/0.03/0.06/0.05, dsn=2.6.0, status=sent (250 2.6.0 message accepted (2rywvs))
This will not change the From address that is displayed in the email. The NoReply@testdomain.com is only important for other email servers to validate it’s a real email.
I don’t know how concrete5 is constructing the emails but it is definitely doing something wrong. I’d prefer not to change code in concrete5’s Zend libraries so if this can be fixed another way (maybe there is a variable, parameter or function I don’t know about) I’d prefer to do that.
The email software on the server expects a proper “From:” header in the input. If missing, the “From:” is constructed from the Unix username and @server name.
The email log on the server is showing all the emails are being sent as Unix username@server name
Here is an example from the mail log:
Jan 29 14:34:33 cmsserver postfix/qmgr[926]: 79AD4204D3C: from=<testsite02@localdomain>, size=713, nrcpt=1 (queue active)
Jan 29 14:34:33 cmsserver postfix/smtp[1816]: 79AD4204D3C: to=<kathy@testdomain.org>, relay=smtp.testserver.net[192.168.212.25]:25, delay=0.12, delays=0.02/0/0.06/0.04, dsn=2.6.0, status=sent (250 2.6.0 message accepted (2rywxz))
If the from= does not contain a valid domain, it will be rejected by some servers.
To fix this, we had to change Line 1176 of concrete/libraries/3rdparty/Zend/Mail.php
Replaced:
$transport = new Zend_Mail_Transport_Sendmail();
With:
$transport = new Zend_Mail_Transport_Sendmail('-fNoReply@testdomain.com');
After that change, this is what the email log shows:
Jan 29 14:31:18 cmsserver postfix/qmgr[926]: 4143A204D3B: from=<NoReply@testdomain.com>, size=1115, nrcpt=1 (queue active)
Jan 29 14:31:18 cmsserver postfix/smtp[1653]: 4143A204D3B: to=<kathy@testdomain.org>, relay= smtp.testserver.net[192.168.212.25]:25, delay=0.21, delays=0.08/0.03/0.06/0.05, dsn=2.6.0, status=sent (250 2.6.0 message accepted (2rywvs))
This will not change the From address that is displayed in the email. The NoReply@testdomain.com is only important for other email servers to validate it’s a real email.
I don’t know how concrete5 is constructing the emails but it is definitely doing something wrong. I’d prefer not to change code in concrete5’s Zend libraries so if this can be fixed another way (maybe there is a variable, parameter or function I don’t know about) I’d prefer to do that.