Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using postfix to send emails. So, and correct me if I'm wrong, I'm using port 25 TCP inbound for entering emails, and port 25 TCP outbound for sending emails. Is it possible to alter the 25 outbound port value used by postfix to 60000 for example?

share|improve this question
    
Sorry, I read this question as "How can I change my configuration in order to connect to the remote server on a port different than 25?" –  David Costa Jan 20 '12 at 11:29
add comment

2 Answers

up vote 2 down vote accepted

You are listening on port 25 for incoming emails.

You are connecting to a remote server on port 25 for outgoing emails.

The port you connect from is randomly generated.

share|improve this answer
add comment

You have to modify the transport table using the command postmap. With postmap you can modify the way postfix interacts with the other servers for the outgoing message.

See http://www.postfix.org/transport.5.html in order to understand how you can accomplish this for a particular user/recipient/domain as almost every public SMTP server is listening to 25 and 587 TCP only!

share|improve this answer
    
I think what you need is the page examples. You have to create a text file and call postmap to process that file with the transport directives. Or as you can see from the first part of the webpage call postmap with the desired string –  David Costa Apr 13 '11 at 14:26
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.