title: How to configure postfix client on port 465?
body: <p>I installed postfix on a server, but port 25 was blocked by ISP. I followed <a href="http://www.postfix.org/TLS_README.html#client_smtps" rel="nofollow noreferrer">http://www.postfix.org/TLS_README.html#client_smtps</a> to configure smtps on port 465.
  I follow the configuration as <code>Postfix ≥ 3.0: Sending only mail for a specific destination via SMTPS</code>,
  But I have to add mail domain to /etc/postfix/transport.</p>
  <pre><code>a.com  relay-smtps:mx.a.com:465
  b.com relay-smtps:mx.b.com:465
  </code></pre>
  <p>part of /etc/postfix/main.cf:</p>
  <pre><code>smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_scache
  smtp_tls_security_level = may
  tls_random_source = dev:/dev/urandom
  smtp_tls_loglevel = 1
  transport_maps = hash:/etc/postfix/transport
  </code></pre>
  <p>part of /etc/postfix/master.cf:</p>
  <pre><code>relay-smtps  unix  -       -       n       -       -       smtp
      # Client-side SMTPS requires &quot;encrypt&quot; or stronger.
      -o smtp_tls_security_level=encrypt
      -o smtp_tls_wrappermode=yes
  </code></pre>
  <p>For destination not in transport, postfix tries connect to port 25.</p>
  <p>I can only send email to destination listed in transport.</p>
  <p>How do I change the postfix so that it tries send all emails to <code>[their own DNS MX record]:465</code> ?
  I have tried <code>Postfix ≥ 3.0: Sending all remote mail to an SMTPS server</code>:</p>
  <pre><code>relayhost = [mx.a.com]:465
  </code></pre>
  <p>But it was regarded as spam.</p>
  <p>If I do like:</p>
  <pre><code>mydomain.com :
  * relay-smtps:how can use DNS MX recode auto:465
  </code></pre>
  <p>How can I specify port 465 and use DNS MX record?</p>
  <p>Thanks!</p>