Recipient address rejected: User unknown in local recipient table

Discussion in 'Installation/Configuration' started by djcronos, Aug 17, 2006.

  1. djcronos

    djcronos New Member

    Hi all,

    I used the Perfect Setup Ubuntu Dapper 6.06 howto install, and I'm having problems getting email to work on my machine. When following the install, I changed server1.example.com to foo.com (real domain name replaced with generic). Inside ISPConfig I set up another domain name, bar.com. Going to www.foo.com and www.bar.com via Firefox works just fine, but it's the email I'm having problems with. When I go under sites and into www.bar.com and go to add an email, I add it there successfully. If I go into /etc/local-host-names I see that bar.com is in there, and when I go to /etc/postfix/virtusertable I see that the email accounts I add are there.

    However, when I send an email to any account I have set up, I always get the same error message:

    Code:
    PERM_FAILURE: SMTP Error (state 9): 550 <[email protected]>: Recipient address rejected: User unknown in local recipient table
    
    When I go into the ISPConfig Admin Panel, Under Server Settings, the VirtUserFile is /etc/postfix/virtusertable and the Sendmail CW is /etc/postfix/local-host-names.

    If there is any other information I can provide, please let me know.

    Thanks in advance.
     
  2. djcronos

    djcronos New Member

    Here are outputs of my /etc/main.cf and /etc/master.cf:

    /etc/main.cf:
    Code:
    #myorigin = /etc/mailname
    
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    biff = no
    
    # appending .domain is the MUA's job.
    append_dot_mydomain = no
    
    # Uncomment the next line to generate "delayed mail" warnings
    #delay_warning_time = 4h
    
    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_use_tls = yes
    smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
    
    # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
    # information on enabling SSL in the smtp client.
    
    myhostname = foo.com
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    myorigin = /etc/mailname
    mydestination = /etc/postfix/local-host-names
    relayhost =
    mynetworks = 127.0.0.0/8
    mailbox_command = procmail -a "$EXTENSION"
    mailbox_size_limit = 0
    recipient_delimiter = +
    inet_interfaces = all
    inet_protocols = all
    smtpd_sasl_local_domain =
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_security_options = noanonymous
    broken_sasl_auth_clients = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_tls_auth_only = no
    smtp_use_tls = yes
    smtp_tls_note_starttls_offer = yes
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_timeout = 3600s
    tls_random_source = dev:/dev/urandom
    
    /etc/master.cf:
    Code:
    smtp      inet  n       -       -       -       -       smtpd
    #submission inet n      -       -       -       -       smtpd
    #       -o smtpd_etrn_restrictions=reject
    #       -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #smtps    inet  n       -       -       -       -       smtpd
    #  -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
    #submission inet n      -       -       -       -       smtpd
    #  -o smtpd_etrn_restrictions=reject
    #  -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
    #628      inet  n       -       -       -       -       qmqpd
    pickup    fifo  n       -       -       60      1       pickup
    cleanup   unix  n       -       -       -       0       cleanup
    qmgr      fifo  n       -       n       300     1       qmgr
    #qmgr     fifo  n       -       -       300     1       oqmgr
    tlsmgr    unix  -       -       -       1000?   1       tlsmgr
    rewrite   unix  -       -       -       -       -       trivial-rewrite
    bounce    unix  -       -       -       -       0       bounce
    defer     unix  -       -       -       -       0       bounce
    trace     unix  -       -       -       -       0       bounce
    verify    unix  -       -       -       -       1       verify
    flush     unix  n       -       -       1000?   0       flush
    proxymap  unix  -       -       n       -       -       proxymap
    smtp      unix  -       -       -       -       -       smtp
    # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
    relay     unix  -       -       -       -       -       smtp
            -o fallback_relay=
    #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq     unix  n       -       -       -       -       showq
    error     unix  -       -       -       -       -       error
    discard   unix  -       -       -       -       -       discard
    local     unix  -       n       n       -       -       local
    virtual   unix  -       n       n       -       -       virtual
    lmtp      unix  -       -       -       -       -       lmtp
    anvil     unix  -       -       -       -       1       anvil
    scache    unix  -       -       -       -       1       scache
    maildrop  unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
    #
    # See the Postfix UUCP_README file for configuration details.
    #
    uucp      unix  -       n       n       -       -       pipe
      flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    #
    # Other external delivery methods.
    #
    ifmail    unix  -       n       n       -       -       pipe
      flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    bsmtp     unix  -       n       n       -       -       pipe
      flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
    scalemail-backend unix  -       n       n       -       2       pipe
      flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
    mailman   unix  -       n       n       -       -       pipe
      flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
      ${nexthop} ${user}
    
     
  3. narut0b0y

    narut0b0y New Member

    what's inside your virtusertable file? mine contain this

    ###################################
    #
    # ISPConfig virtusertable Configuration File
    # Version 1.0
    #
    ###################################
    [email protected] web1_test.1.real.name
    [email protected] web1_test.1.real.name
    [email protected] web1_test.1.real.name
    [email protected] web1_test.1.real.name
    #### MAKE MANUAL ENTRIES BELOW THIS LINE! ####

    i only have one user since i just recently installed the ispconfig application. mail sending and receiving are both working properly.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please add this line at the end of the main.cf file:

    virtual_maps = hash:/etc/postfix/virtusertable

    and restart postfix.
     
  5. Ben

    Ben ISPConfig Developer ISPConfig Developer

    shouldn't he run a
    postmap /etc/postfix/virtusertable

    before restarting or does the hashfile already exist?
     
  6. djcronos

    djcronos New Member

    Hi everyone,

    Thanks till and Ben for the replies. I did what till requested, restarted postfix, and it worked!

    Just a few questions so I can understand this more. What does that line do till, and secondly, what does a postmap /etc/postfix/virtusertable do?

    And finally, did I do something wrong in the initial setup, or is this an extra step that needs to be added to the HOWTO?

    Thanks guys!!
     
  7. falko

    falko Super Moderator ISPConfig Developer

    It adds the "database" (well, it's just a text file) with the valid email addresses to the Postfix configuration.

    It transforms the text file into a format Postfix can read.

    The virtual_maps = hash:/etc/postfix/virtusertable line is added by the ISPConfig installer, so I guess you or someone else accidentally removed it. And the postmap command is run automatically by ISPConfig.
     
  8. quannv

    quannv New Member

    I use google mail hosting for my domain, and I get same error although I have been added virtual_maps = hash:/etc/postfix/virtusertable to main.cf.

    Before moving mail hosting to google, mail sever is working fine
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    @quannv Ok, you mean that google is now the responsible mail server and not your server. This is something totally different as your server shall not be responsible for the mail anymore. You will have to set mailserver to external under Options in the website AND the co-domain options.
     
  10. quannv

    quannv New Member

    Thank so much, I am done
     

Share This Page