How to configure port 465 for my internal email server as environment variable

Posted October 4, 2021 62 views
EmailFirewallAngularDigitalOcean Droplets

My newly deployed web app seems stuck at email service port as the server keeps complaining null value of it and thus preventing other access to api requests. Please correct my config or point out what I have missed other than this config to get email configuration work.

here is my service config:

Description=Kestrel service running on Ubuntu 20.04
ExecStart=/usr/bin/dotnet /var/myfolder/API.dll

Besides, I tried allow firewall as below:
sudo ufw allow 465/tcp

Using netstate -ntpl, I didn’t see 465 is listed
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0* LISTEN 77669/dotnet
tcp 0 0* LISTEN 40751/docker-proxy
tcp 0 0* LISTEN 7207/containerd
tcp 0 0* LISTEN 80693/docker-proxy
tcp 0 0* LISTEN 31727/docker-proxy
tcp 0 0* LISTEN 19179/systemd-resol
tcp 0 0* LISTEN 18860/sshd: /usr/sb
tcp 0 0* LISTEN 37713/docker-proxy
tcp6 0 0 ::1:5000 :::* LISTEN 67679/dotnet
tcp6 0 0 :::6379 :::* LISTEN 60755/docker-proxy
tcp6 0 0 :::80 :::* LISTEN 33532/apache2
tcp6 0 0 :::8080 :::* LISTEN 50700/docker-proxy
tcp6 0 0 :::8081 :::* LISTEN 37035/docker-proxy
tcp6 0 0 :::22 :::* LISTEN 17860/sshd: /usr/sb
tcp6 0 0 :::5432 :::* LISTEN 37719/docker-proxy

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer


As you are connecting to an external SMTP service, it is normal that port 465 is not shown in the netstat command output. Only if you were running your own SMTP server, then you would see the port in there.

Regarding the environment variables definition, have you tried adding each environment variable on a separate line rather than separated by a semicolon?