1

After upgrading CiviCRM from 4.6 to 4.7.14 I was not able to send (test) emails via SMTP. I got the following error:

authentication failure [SMTP: STARTTLS failed (code: 220, response: 2.0.0 Ready to start TLS)]

After replacing some code in /packages/Net/SMTP.php like Matt suggested I'm now receiving the error:

authentication failure [SMTP: Invalid response code received from SMTP server while sending email. This is often caused by a misconfiguration in Outbound Email settings. Please verify the settings at Administer CiviCRM >> Global Settings >> Outbound Email (SMTP). (code: 535, response: 5.7.8 Error: authentication failed: authentication failure)]

Maillog says:

Dec 21 11:19:55 rs0815 postfix/smtpd[31606]: warning: SASL authentication failure: client response doesn't match what we generated Dec 21 11:19:55 rs0815 postfix/smtpd[31606]: warning: rs0815.rs.example.de[123.123.123.123]: SASL DIGEST-MD5 authentication failed: authentication failure

I doesn't make a difference if I use PHP 5.5 or 5.6.

Any idea what could cause this?

  • Can you provide more information? E.g. are you prefixing your outgoing mail address with "ssl://"? In Civi 4.7 you should remove that since it's technically incorrect; see github.com/civicrm/civicrm-packages/pull/66 – Jon G - Megaphone Tech Dec 20 '16 at 21:21
  • The SMTP-server is not prefixed with "ssl://", besides it is suggested in the input help: "If the server uses SSL, add 'ssl://' to the beginning of the server name[...]". It's just like smtp.example.com and port 25 with an authentication. – Philipp Michael Dec 21 '16 at 7:59
  • I've checked the log, see my updated question. – Philipp Michael Dec 21 '16 at 10:24
  • Hi Philipp, are you also the administrator of the SMTP server. The log suggests it is postfix. Maybe the post unix.stackexchange.com/questions/204515/… offers some help. But it involves altering the configuration of postfix. – Kainuk - CiviCooP Jan 22 '17 at 11:38
  • It's now working, but I don't know why. I didn't do anything conscious. So I'm still interested in a solution of this problem. – Philipp Michael Feb 10 '17 at 11:54
0

I had this very same problem with SMTP and couldn't find a solution with the configuration, although I didn't change the code you mention. I found a workaround by choosing mail() instead of SMTP in Administer>system settings>outbound email, since when I've had no problems. The default option should apparently work fine on linux systems, if that is appropriate.

  • Yes, I can send mails with the mail() function but I wan't to use a specific smtp server. So unfortunately this is no option. – Philipp Michael Dec 21 '16 at 13:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.