title: Postfix-Mailman "Recipient address rejected: User unknown in local recipient table"
body: <p>I assume the error is an issue with my postfix configuration. I've followed the steps in the instructions <a href="https://help.ubuntu.com/lts/serverguide/mailman.html" rel="nofollow">here</a> to set up apache/postfix/mailman.</p>
  
  <p><em>Real domain replaced with mydomain.com</em>
  I've created a default mail list called mailman. When I send an email to mailman@mydomain.com I get the error "Recipient address rejected: User unknown in local recipient table" in the mail.log.</p>
  
  <pre><code>550 5.1.1 &lt;mailman@mydomain.com&gt;: Recipient address rejected: User unknown in local recipient table; from=&lt;-----@gmail.com&gt; to=&lt;mailman@mydomain.com&gt; proto=ESMTP helo=&lt;mail-wi0-f174.google.com&gt;
  </code></pre>
  
  <p>Excerpts from my postfix/main.cf:</p>
  
  <pre><code>myhostname = mydomain.com
  mydestination = mydomain.com, localhost
  inet_protocols = ipv4
  relay_domains = mydomain.com
  transport_maps = hash:/etc/postfix/transport
  mailman_destination_recipient_limit = 1
  </code></pre>
  
  <p>Excerpts from /etc/postfix/transport</p>
  
  <pre><code>mydomain.com mailman:
  </code></pre>
  
  <p>Excerpt from postfix/master.cf</p>
  
  <pre><code>mailman   unix  -       n       n       -       -       pipe
    flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
    ${nexthop} ${user}
  </code></pre>
  
  <p>If I understand correctly how it should work...</p>
  
  <ol>
  <li>mail comes in to mydomain.com</li>
  <li>postfix validates the hostname against $myhostname</li>
  <li>postfix finds mydomain.com under relay_domains</li>
  <li>postfix relays the mail to the transport listed under transport_maps</li>
  <li><em>failing here?</em> the postmap table finds that mailman@mydomain.com matches mydomain.com</li>
  <li>postmap directs the mail to the mailman: transport defined in master.cf</li>
  <li>the transport mailman: calls postfix-to-mailman.py, and mailman handles the mail</li>
  </ol>