{ Community }
  • Academy
  • Docs
  • Developers
  • Resources
    • Community Articles
    • Apigee on GitHub
    • Code Samples
    • Videos & eBooks
    • Accelerator Methodology
  • Support
  • Ask a Question
  • Spaces
    • Product Announcements
    • General
    • Edge/API Management
    • Developer Portal (Drupal-based)
    • Developer Portal (Integrated)
    • API Design
    • APIM on Istio
    • Extensions
    • Business of APIs
    • Academy/Certification
    • Adapter for Envoy
    • Analytics
    • Events
    • Hybrid
    • Integration (AWS, PCF, Etc.)
    • Microgateway
    • Monetization
    • Private Cloud Deployment
    • 日本語コミュニティ
    • Insights
    • IoT Apigee Link
    • BaaS/Usergrid
    • BaaS Transition/Migration
    • Apigee-127
    • New Customers
    • Topics
    • Questions
    • Articles
    • Ideas
    • Articles
    • Ideas
    • Leaderboard
    • Badges
  • Log in
  • Sign up

Get answers, ideas, and support from the Apigee Community

  • Home /
  • Private Cloud Deployment /
avatar image
1

How to integrate an On-Premise Edge installation with strict SMTP servers  

  • Export to PDF
Alex Toombs created · Mar 21, 2017 at 08:55 PM · 557 Views · edited · Mar 31, 2017 at 11:24 PM

Some SMTP servers have stricter requirements and/or different configurations than others. One example is Office365. This article will focus on Office365, but may be applicable to other SMTP hosts.

First, two links for later:

http://docs.apigee.com/private-cloud/latest/configuring-edge-smtp-server

http://docs.apigee.com/private-cloud/latest/how-configure-edge

If you have followed the article linked above to configure your SMTP server, but are getting the following error message, please read on:

[error] a.d.Dispatcher - Sending the email to the following server failed : smtp.office365.com:465
org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.office365.com:465
...
Caused by: javax.mail.MessagingException: Could not connect to SMTP host: smtp.office365.com, port: 465
...
Caused by: javax.net.ssl.SSLException: Unrecognized SSL message, plaintext connection?
... 

At first, you may be wondering why port 465 is showing up in logs above when you may have configured 587. If this were the only problem, a simple workaround would be to use iptables. For reference, the following iptables definitely works (but unfortunately doesn't help for this issue, as the port isn't the only problem):

sudo iptables -t nat -A OUTPUT -p tcp --dport 465 -j DNAT --to-destination :587 

(Note that even with that iptables rule, you will still see port 465 in the logs. The iptables rule technically works, but there's more to this than just the port).

After making the following changes (and removing iptables):

conf_apigee_mail.smtp.host="smtp.office365.com" 
conf_apigee_mail.smtp.port="587" 
conf_apigee_mail.smtp.channel="tls" 
conf_apigee_mail.smtp.tls="true" 

I was getting this error:

Sending the email to the following server failed : smtp.office365.com:587
org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.office365.com:587
...
Caused by: com.sun.mail.smtp.SMTPSendFailedException: 530 5.7.57 SMTP; Client was not authenticated to send anonymous mail during MAIL FROM
... 

This final error can be solved by providing the full name and email address of the user sending the mail, for example (note the below must be EXACTLY right, and you can get this info from your SMTP provider):

conf_apigee_apigee.mgmt.mailfrom="First Last <email@outlook.com>" 

Note all the above configs are set in /opt/apigee/token/application/ui.properties per the "How to Configure Edge" link above. Also, after these are set, the UI must to be restarted using apigee-service. Also note that if you change your SMTP password, you must re-run the UI installer using your silent config file from initial installation.

I hope this helps. Thanks.

thub.nodes.view.add-new-comment
Private Cloudsmtp
Add comment
10 |5000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by Apigeeks only
  • Viewable by the original poster
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Article

Contributors

avatar image

Follow this article

45 People are following this .

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Navigation

How to integrate an On-Premise Edge installation with strict SMTP servers

Related Articles

Handling special characters in passwords when installing Edge Private Cloud 4.16.01

Private Cloud 4.16.X: Edge UI not sending emails - Troubleshooting tips

How to disable TRACE method from the router configuration level

Apigee Edge for Private Cloud v4.16.09 doc available

How to enable Debug in the Apigee Edge Router and Message Processor?

LDAP_PEER variable found and not in response file

​Creating a symlink from /opt/apigee to install Edge for Private Cloud 4.16.01

How to reset a lost sysadmin password on Apigee Edge OPDK?

4.16.01 and 4.16.05 Edge for Private Cloud doc updated

Prevent password lockout of sysadmin and default cn in OPDK

  • Products
    • Edge - APIs
    • Insights - Big Data
    • Plans
  • Developers
    • Overview
    • Documentation
  • Resources
    • Overview
    • Blog
    • Apigee Institute
    • Academy
    • Documentation
  • Company
    • Overview
    • Press
    • Customers
    • Partners
    • Team
    • Events
    • Careers
    • Contact Us
  • Support
    • Support Overview
    • Documentation
    • Status
    • Edge Support Portal
    • Privacy Policy
    • Terms & Conditions
© 2021 Apigee Corp. All rights reserved. - Apigee Community Terms of Use - Powered by AnswerHub
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Post an idea
  • Create an article
  • Post an idea
  • Spaces
  • Product Announcements
  • General
  • Edge/API Management
  • Developer Portal (Drupal-based)
  • Developer Portal (Integrated)
  • API Design
  • APIM on Istio
  • Extensions
  • Business of APIs
  • Academy/Certification
  • Adapter for Envoy
  • Analytics
  • Events
  • Hybrid
  • Integration (AWS, PCF, Etc.)
  • Microgateway
  • Monetization
  • Private Cloud Deployment
  • 日本語コミュニティ
  • Insights
  • IoT Apigee Link
  • BaaS/Usergrid
  • BaaS Transition/Migration
  • Apigee-127
  • New Customers
  • Explore
  • Topics
  • Questions
  • Articles
  • Ideas
  • Articles
  • Ideas
  • Badges