Does anyone have experience setting up Fleet SMTP ...
# fleet
b
Does anyone have experience setting up Fleet SMTP with a Google Workspace email that has 2FA enabled? I've followed all the Fleet provided and Google provided documentation and I just can't seem to find any combination of it that works. Currently have it all loaded up with an app password but still no dice
r
@Billy H I'm looking into this for you and will return with more info. 🙂
@Billy H Are you getting any errors during the setup process?
b
just a generic error:
Could not connect to SMTP server. Please try again.
Hey @Rebecca Cowart! just checking in on this, any help would be appreciated!
r
@Billy H The Fleet logs may have more detailed information on why the setup failed. If there's nothing there, your mail admin may also have relevant information.
b
Well I am the mail admin! So that may be a problem hahaha
i'll check the fleet logs though
@Rebecca Cowart how do I check the Fleet logs? Been searching around with not much luck. I enabled the server logging here: https://fleetdm.com/docs/configuration/fleet-server-configuration#logging-fleet-server-logging But I don't know where it's dropping the logs. I self host in AWS, but AWS Lambda, Firehose, and kinesis don't show any relevant logs
r
@Billy H Take a look at this guide, which explains how to find the fleetd logs. Let me know if you find anything in the logs!
b
So this is logs for the fleet agent on workstations no? Where would I find the logs for the Fleet server errors (ie. this SMTP error)?
r
@Billy H That's correct. The Fleet server logs live on the server and go to their own stdout and stderr files. Their location is dependent on your deployment setup. For instance, if you're using AWS with Terraform modules, those logs will be in AWS Cloudwatch.
b
@Rebecca Cowart do you know where in Cloudwatch these would be? I'm searching through all the log groups in cloud watch and see no issues related to SMTP or that contain the string gmail
r
@Billy H I've been looking into this. Searching log groups for "fleet" would be a good method to try. You should also be able to pull up the Fleet container's logs in ECS.
b
@Rebecca Cowart Sorry for the super long delay on this. I was able to get the logs from the ECS service:
{"component":"http","err":"validation failed: SMTP Options a mail error occurred: sending mail: could not dial smtp host: dialing with timeout: tls: first record does not look like a TLS handshake","level":"debug","method":"PATCH","took":"30.00228408s","ts":"2025-05-21T19:14:13.013366732Z","uri":"/api/latest/fleet/config","user":"<mailto:sanitized@example.com|sanitized@example.com>","uuid":"c261cdd4-234d-4b3e-82e5-27c9148a76e4"}
I was able to test sending SMTP mail with the exact same settings that I have in fleet from a python script and they seem to be going through just fine so I know that the issue is not on the Google Workspace side
Was finally able to get it working with SSL and port 465, but I'm guessing that Fleet doesn't use STARTTLS which is why Google wont accept it on port 587