title: Postfix relay on multiple local smtp servers
body: <p>I have two SMTP servers listening on ports 2525 and 2526.
  But I have  only 1 public IP address.
  I'd like to use postfix (already installed on my server) to receive emails only for domain xxx.company.com and domain yyy.company.com, and redirect those emails to server 1 (port 2525) for domain xxx.company.com and server 2 (port 2526) for domain yyy.company.com.</p>
  
  <p>Postfix will not be used to send emails. Just receive.</p>
  
  <p>I tried several postfix configurations but I haven't figured out how to do this properly.
  For now, I end up with this:
  In main.cf:</p>
  
  <pre><code>mydomain = company.com
  mydestination = xxx.company.com, yyy.company.com
  relay_domains = xxx.company.com, yyy.company.com
  transport_maps = hash:/etc/postfix/transport
  local_recipient_maps =
  unknown_local_recipient_reject_code = 550
  </code></pre>
  
  <p>In transport.cf:</p>
  
  <pre><code>*xxx.company.com 2525:[localhost]
  *yyy.company.com 2526:[localhost]
  </code></pre>
  
  <p>In master.cf, the following line has been uncommented:</p>
  
  <pre><code>local     unix  -       n       n       -       -       local
  </code></pre>
  
  <p>But I still have an "unknown user" error if my maillog file.
  I would like to be more accurate for local_recipients so I don't let the entire world enter my postfix.</p>
  
  <p>Does anyone have an out-of-the-box example of such kind of configuration ?</p>
  
  <p>Thanks,
  Jeremy B.</p>