DependencyTrack / dependency-track

Dependency-Track is an intelligent Component Analysis platform that allows organizations to identify and reduce risk in the software supply chain.
https://dependencytrack.org/
Apache License 2.0
2.46k stars 536 forks source link

Test mail is not sent #3501

Open bobro99 opened 4 months ago

bobro99 commented 4 months ago

Hi all đź‘‹

Current Behavior

  1. I launch dependencytrack as a docker swarm stack with an attached compose file
  2. Fill in Home\Administration\Configuration\Email
  3. I try to send a Configuration test, but nothing happens
  4. I receive a log in the attached file in the dtrack_dtrack-apiserver service log log_dependencytrack.txt docker-compose_dependencytrack.txt

At the same time the command curl --url 'smtps://smtp.gmail.com:465' --ssl-reqd --mail-from "'$user'" --mail-rcpt myemail@mydomain.my --user $user:$passwd -T <(echo -e "'From: $user\nTo: myuser\nSubject: mysub \n\nmy_email_body'") It works correctly and the letter goes out to the specified addressee myemail@mydomain.my I also tried various combinations of “Enable SSL/TLS encryption” and “Trust the certificate provided by the SMTP server”, the result was negative.

Steps to Reproduce

  1. I launch dependencytrack as a docker swarm stack with an attached compose file
  2. Fill in Home\Administration\Configuration\Email
  3. I try to send a Configuration test, but nothing happens
  4. I receive a log in the attached file in the dtrack_dtrack-apiserver service log

Expected Behavior

I am expecting to receive a test letter to the e-mail address I specified.

Dependency-Track Version

4.7.x

Dependency-Track Distribution

Container Image

Database Server

N/A

Database Server Version

No response

Browser

Google Chrome

Checklist

mwildt commented 4 months ago

same here !!

msymons commented 3 months ago

From the original description above, the attached log_dependencytrack.txt contained useful error that was returned by the SMTP MTA at gmail:

Caused by: javax.mail.MessagingException: Got bad greeting from SMTP host: smtp.gmail.com, port: 465, response: [EOF]

A quick google returns results such as this:

https://stackoverflow.com/questions/57063411/go-smtp-unable-to-send-email-through-gmail-getting-eof

So, @bobro99 and @mwildt, what happens when you try port 587 instead of 465?