Recipient address rejected 5.1.1

Discussion in 'Installation/Configuration' started by kopurka, Feb 9, 2012.

  1. kopurka

    kopurka New Member

    Brand new single server Centos 6 ISPConfig 3 /last version/

    Postfix works - sending and receiving email for root without problem.

    In ISPConfig I have added: Email -> Email accounts -> Domain
    added new domain
    after that in Email -> Email accounts -> Email Mailbox
    added new mailbox [email protected]

    Now I login thru Webmail (squirrelmail) to this virtual account. Sending emails without problem. Rceiving emails from myself (from [email protected] to [email protected]). The problem is that I can not receive email to this box from outside. Always receive SMTP 5.1.1 Recipient address rejected. User unknown in local recipient table.

    I'm fighting with this second day without any success ... Please help. Nothing in mail error log. Most probably postfix does not loading properly virtual mailboxes from mysql table. How to fix this?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    This might be a dns problem and not a email problem. If sending in webmail works, then your ispconfig server is configured correctly and that you dont get error in the mail log seconds that. My guess is that the MX record of the domain points to a different server and not your ispconfig server.

    If that would be the case, then webmail would not be working too.
  3. kopurka

    kopurka New Member

    Just checked with mxtoolbox

    Everything seems ok. MX points to right server.

    Reverse DNS FAILED! This is a problem.

    0 seconds - Good on Connection time
    Not an open relay.
    1.295 seconds - Good on Transaction time

    Can this reverse DNS be the problem?
  4. kopurka

    kopurka New Member

  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The reverse dns should be fixed, but ist most likely not the source of the problem. I dont think that mxtoolbox can check if your server is the right one, it just checks that the dns configuration is valid.


    dig MX yourdomain.tld

    on the shell of your server. It should return you the MX record and also the a record where the mx points to. The IP address of the a record that dig returns must be identical with the IP address of your server.

    Beside that, where do you get the error "SMTP 5.1.1 Recipient address rejected. User unknown in local recipient table."? In the mail.log of your server or in the email that is returned.
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Have you used as hostname or mailname for the server? As written in the perfect setup guides, the hostname and mailname have to be a subdomain like and not If you would use as hostname, then this domain is blocked for mail receiving in postfix for all virtual mail users.

    So if you used as name of your server, then you will have to change that in the postfix, in /etc/hosts and also in the centos network configuration utility.
  7. kopurka

    kopurka New Member

    I have just run it and all is perfect. MX record shows
    and the A record for is the right IP.

    I got this as pop-up from my Mozzila Thunderbird on my home PC, when I'm trying to send email to [email protected]

    I mean the message is right after I click "Send" not some "failed delivery" email.
  8. kopurka

    kopurka New Member

    My hostname is

    I have added in ISPConfig (there is also vhost for this domain which works ok)
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post your postfix file.
  10. kopurka

    kopurka New Member

    queue_directory = /var/spool/postfix

    command_directory = /usr/sbin

    daemon_directory = /usr/libexec/postfix

    data_directory = /var/lib/postfix

    mail_owner = postfix

    inet_interfaces = all

    inet_protocols = all

    mydestination =,, localhost, localhost.localdomain

    unknown_local_recipient_reject_code = 550

    alias_maps = hash:/etc/aliases

    alias_database = hash:/etc/aliases

    debug_peer_level = 2

    debugger_command =
    ddd $daemon_directory/$process_name $process_id & sleep 5

    sendmail_path = /usr/sbin/sendmail.postfix

    newaliases_path = /usr/bin/newaliases.postfix

    mailq_path = /usr/bin/mailq.postfix

    setgid_group = postdrop

    html_directory = no

    manpage_directory = /usr/share/man

    sample_directory = /usr/share/doc/postfix-2.6.6/samples

    readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
    myhostname =
    mydomain =
    mynetworks = [::1]/128
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/, mysql:/etc/postfix/
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/
    virtual_mailbox_base = /var/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/, reject_unauth_destination
    smtpd_use_tls = yes
    smtpd_tls_security_level = may
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    transport_maps = proxy:mysql:/etc/postfix/
    relay_domains = mysql:/etc/postfix/
    relay_recipient_maps = mysql:/etc/postfix/
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
    smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/
    maildrop_destination_concurrency_limit = 1
    maildrop_destination_recipient_limit = 1
    virtual_transport = maildrop
    header_checks = regexp:/etc/postfix/header_checks
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    body_checks = regexp:/etc/postfix/body_checks
    content_filter = amavis:[]:10024
    receive_override_options = no_address_mappings
    relayhost =
    mailbox_size_limit = 0
    message_size_limit = 0
  11. kopurka

    kopurka New Member

  12. kopurka

    kopurka New Member

    FIXED !!!! Already working.

    I have added smtp to /etc/hosts
    There was only server1

    Now works. Very strange but fact.


Share This Page