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?

Thanks
Chris

I was able to help with this, all we did for a simple port change was follow these directions and restart postfix:
http://www.linuxmail.info/postfix-change-port/

1. Edit the file /etc/postfix/master.cf 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.

http://major.io/2007/07/04/enable-submission-port-587-in-postfix/