Unifi-controller: Any luck getting Settings-->Controller-->Mail Server SMTP to work?

EDIT: I ran a tcpdump and I can see that Unifi-controller is reaching out the SMTP server I am using (mail.twc.com). But that server requires a log in, and perhaps I am messing up that part.

SO, I have Postfix working on my system listening on port 25, and I configured Unifi controller to point to it (the IP address of the host Docker is running on). When I run tcpdump on port 25, I see ZERO traffic. Is there something I need to do to the container to make it able to talk to port 25 on the host?

First of all, big thanks to the folks who created and maintain this Docker image.

Has anyone had issues getting the Mail Server SMTP settings to work? In the UI I get message that SMTP failed for an “unknown reason”.

In my server.log, I get this ambiguous message:

[2020-02-25T17:44:24,098] WARN event - fail to send email: api.err.SmtpSendFailed

I am uncertain of where else I can go to troubleshoot the failure.

Appreciate any help!

my smtp works fine, i think you’ll need to provide more information…

can you share your docker host os and version along with you docker run or compose? thanks

also, you can try increasing the debug level, i think debug.system to debug would help

Solved the first problem… user error… mail.twc.com uses TLS but not SSL. So I had to set port 587 but disable SSL in the Controller settings. tcpdump on port 587 of my host confirms that the Container is reaching out.

Second problem is more mysterious: I am not sure why when I put my host IP (which is running Postfix on port 25) into my Controller config and run tcpdump on port 25 on my host, I see no traffic at all.

I am unsure which logging level (Docker or Unifi?) and where to set the debug setting?

Docker config:

docker container create
-e PUID=1000
-e PGID=1000
-e MEM_LIMIT=1024M #optional
-p 3478:3478/udp
-p 10001:10001/udp
-p 8080:8080
-p 8081:8081
-p 8443:8443
-p 8843:8843
-p 8880:8880
-p 6789:6789
-v ~/unifi-files:/config
–restart unless-stopped

I would suggest joining us on discord to get more optimal assistance. That said, i dont see anything in your compose that would cause a problem. for logging level (in unifi) just google unifi-controller log level. i think system is what you will want

So I’m a little unclear how you send the mail to your host on port 25. Why I say that is I have a postfix server up and running within an Arch Linux VM. The VM has a fully resolvable host name or URL with SSL certs running on either ports 465 or 587. Since it’s internal I have a DNS override at the router level to redirect requests for the URL to the machine running postfix.

I’m not sure how you are trying to access postfix. I think your problem is going to come down to your SMTP client and server settings to best answer this question.