OpenWIS / openwis

http://openwis.github.io/openwis
GNU General Public License v3.0
11 stars 15 forks source link

No SMTP Email #417

Closed mgiannoni closed 1 year ago

mgiannoni commented 1 year ago

No SMTP Email

I cannot get any email to come from either the User Portal, or the DataService.

User Portal Self-Registration

2023-02-14 16:35:32,872 INFO  [openwis.selfRegister] - Self-registration: username=marc.giannoni@noaa.gov, firstName=haquer, lastName=wiley
2023-02-14 16:35:33,047 DEBUG [openwis.selfRegister] - User created on Security Server
2023-02-14 16:35:33,047 DEBUG [openwis.selfRegister] - Sending an email to the user
2023-02-14 16:35:33,047 DEBUG [openwis.selfRegister] - mail content :
 Dear User,

Your registration at giscdev was successful.

Your account is:
 username : marc.giannoni@noaa.gov

To log in and access your account, please click on the link below.
 http://http://giscdev-washington.mdl.nws.noaa.gov:8080/openwis-user-portal/srv/en/xml.info:443/openwis-user-portal

Thanks for your registration.
 Yours sincerely,
 The team at giscdev
2023-02-14 16:35:33,047 DEBUG [openwis.selfRegister] -  from :  to : marc.giannoni@noaa.gov
2023-02-14 16:35:33,059 ERROR [openwis.selfRegister] - Error during Self-Registration : error while sending email
2023-02-14 16:35:33,059 DEBUG [jeeves.engine] - Sanitize json array: {"ok":true} 

openwis-metadataportal.properties

# AWS SES credentials
openwis.metadataportal.email.region=IV
openwis.mail.senderAddress=giscadmin@ip-205-156-8-235.ec2.internal
openwis.mail.adminAddress=giscadmin@ip-205-156-8-235.ec2.internal

# Add for 3.16 in smtp mail case
# Send Mail smtp properties
mail.smtp.from=giscadmin
mail.transport.protocol=smtp
mail.smtp.host=127.0.0.1
mail.smtp.port=25
mail.smtp.password=
mail.smtp.auth=false
mail.smtp.starttls=false

Data Service Public Email Dissemination

Email delivery of subscription products appears to need the openwis-harness-dissemination, for subscriptions to be delivered by email. However there are no instructions on deploying any of the openwis-harness components:

  1. openwis-harness-client
  2. openwis-harness-dissemination
  3. openwis-harness-localdatasource
  4. openwis-harness-mssfss
  5. openwis-harness-subselectionparameters
1:18:04,107 INFO  [org.openwis.dataservice.dissemination.DisseminationDelegateImpl] (Thread-10151 (ActiveMQ-client-global-threads)) Diffusion is via Mail. Threshold = 8000000
01:18:07,085 ERROR [org.openwis.dataservice.dissemination.DisseminationDelegateImpl] (EJB default - 1) Could not get hold of the MailSender EJB.
02:18:04,102 INFO  [org.openwis.dataservice.dissemination.DisseminationDelegateImpl] (Thread-10367 (ActiveMQ-client-global-threads)) Diffusion is via Mail. Threshold = 8000000
02:18:07,112 ERROR [org.openwis.dataservice.dissemination.DisseminationDelegateImpl] (EJB default - 5) Could not get hold of the MailSender EJB.
03:18:04,103 INFO  [org.openwis.dataservice.dissemination.DisseminationDelegateImpl] (Thread-10579 (ActiveMQ-client-global-threads)) Diffusion is via Mail. Threshold = 8000000

openwis-dataservice.properties


# Dissemination harness URLs
cache.dissemination.disseminationHarness.public.url=@harnessDisseminationPublicServer@
cache.dissemination.disseminationHarness.rmdcn.url=@harnessDisseminationRMDCNServer@

# The maximum number of bytes to send via email/ftp
cache.dissemination.threshold.mail=8000000
cache.dissemination.threshold.ftp=1000000000

# Send Mail properties
mail.from=openwis@ip-205-156-8-208.ec2.internal
mail.transport.protocol=smtp
mail.smtp.host=127.0.0.1
mail.smtp.port=25
mgiannoni commented 1 year ago

Configuration Changes Resolved The Issue

Incorrectly configured the AWS Simple Email Service settings The following setup works for our simple closed loop SMTP test

# AWS SES credentials
openwis.metadataportal.email.region=
openwis.mail.senderAddress=
openwis.mail.adminAddress=

# SMTP credentials
mail.smtp.from=[no-reply@giscdev-washington.mdl.nws.noaa.gov)
mail.transport.protocol=smtp
mail.smtp.host=localhost
mail.smtp.port=25
mail.smtp.password=
mail.smtp.auth=false
mail.smtp.starttls=false