how to change port 25 to port 587

So I need to change port 25 to port 587 for out going smtp. Is this done in EHCP or in ubuntu server itself?


I was able to help with this, all we did for a simple port change was follow these directions and restart postfix:

1. Edit the file /etc/postfix/ and find the line below. You can comment the line below by adding # in front of the line to disable SMTP port 25.

smtp inet n - n - - smtpd
Next, add this line
25000 inet n - n - - smtpd
Replace 25000 with your preferred alternate port number.

I also found this when recently facing the problem. I haven't tried it, but wanted to share it.