Changing Port Number for OpenSMTPD

270 Views Asked by At

I am trying to telnet to my OpenSMTPD 6.0 mail server (Ubuntu 19), but I am consistently getting the error message:

telnet mymachine.xyz.com 25
telnet: connect to address XX.XX.XX.XX: Connection refused

I went through other tutorials and few of them said that it may be because my ISP would be blocking port 25. Now, I think I should now change the port number of OpenSMTPD to a new port number so that I can do a telnet. I have already allowed the port number through the firewall.

1

There are 1 best solutions below

0
On

I found a solution to the question.

We just have to go the location /etc/smtpd.conf and have to add the following line:

listen on ens160 port 8060 hostname mymachine.xyz.com

then, restart OpenSMTPD by:

sudo smtpd

Done!