Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have server with postfix installed. It is configured so that when system sends mail to root, it is forwarded to It is configured in /etc/aliases like this:

postmaster: root

Now it stopped sending any emails to because my ISP blocked port 25. How to configure postfix to send this emails to port 587?

My system is ubuntu 9.10, if it matters.


share|improve this question
up vote 3 down vote accepted

You need to create an entry in the Postfix transport table - has full details, and even an example that almost does what you want:

In the case of delivery via SMTP, one  may  specify  host-
       name:service instead of just a host:


       This directs mail for to host bar.example
       port 2025. Instead of a numerical port a symbolic name may
       be used. Specify [] around the hostname if MX lookups must
       be disabled.

You'll have to configure your to use the transport map as well - see the DATABASE_README linkd at the bottom of that page for more.

share|improve this answer
Although, as Womble says, a better solution is to get a proper ISP, one that actually provides an Internet service, instead of just something closely resembling internet service. FWIW,… has an apparently complete (although I've not tested it) guide to setting up the neccessary authentication. – James Polley Dec 26 '09 at 22:59

In general, you can forward to a non-standard port on another mail server with a transport map (see transport(5) and the transport_maps option in postconf(5)). However, the submission port (587) isn't designed to be used without authentication, so you'll also want to look at the smtp_sasl_* options in postconf(5). However, that's a lot of hassle to go through when the best answer is to tell your ISP to remove the port 25 block on your connection. If they're too stupid or intransigent to permit that on a per-customer basis, find a new ISP.

share|improve this answer

Your Answer


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.