Postfix can send but not receive

Discussion in 'Installation/Configuration' started by josephip, Jul 19, 2011.

  1. josephip

    josephip New Member

    I've searched the forums for two days and cannot find the answer to this, so my apologies if it was already posted somewhere, I could not find it.

    So I followed this guide to setup the perfect server:

    Everything seems to be working fine, except I cannot receive emails. Postfix can send them fine, just not receive:

    This is the mail system at host

    I'm sorry to have to inform you that your message could not
    be delivered to one or more recipients. It's attached below.

    For further assistance, please send mail to <postmaster>

    If you do so, please include this problem report. You can
    delete your own text from the attached returned message.

    The mail system

    <[email protected]>: unknown user: "test"

    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.1.1
    Diagnostic-Code: X-Postfix; unknown user: "test"

    This is the output from postconf-n:

    [[email protected] install]# postconf -n
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    body_checks = regexp:/etc/postfix/body_checks
    broken_sasl_auth_clients = yes
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    content_filter = amavis:[]:10024
    daemon_directory = /usr/libexec/postfix
    debug_peer_level = 2
    header_checks = regexp:/etc/postfix/header_checks
    html_directory = no
    inet_interfaces = all
    mail_owner = postfix
    mailbox_size_limit = 0
    mailq_path = /usr/bin/mailq.postfix
    manpage_directory = /usr/share/man
    message_size_limit = 0
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    mydestination =, localhost, localhost.localdomain
    myhostname =
    mynetworks = [::1]/128
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    newaliases_path = /usr/bin/newaliases.postfix
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virt
    ual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipien
    t_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonica
    l_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
    receive_override_options = no_address_mappings
    relay_domains = mysql:/etc/postfix/
    relay_recipient_maps = mysql:/etc/postfix/
    relayhost =
    sample_directory = /usr/share/doc/postfix-2.3.3/samples
    sendmail_path = /usr/sbin/sendmail.postfix
    setgid_group = postdrop
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, che
    ck_recipient_access mysql:/etc/postfix/, reject_unauth
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_sasl_path = private/auth
    smtpd_sasl_type = dovecot
    smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_tls_security_level = may
    smtpd_use_tls = yes
    transport_maps = proxy:mysql:/etc/postfix/
    unknown_local_recipient_reject_code = 550
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/, mysq
    virtual_gid_maps = static:5000
    virtual_mailbox_base = /var/vmail
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/
    virtual_transport = dovecot
    virtual_uid_maps = static:5000
    [[email protected] install]#

    And this is the error log for it:

    Jul 19 11:42:20 localhost postfix/smtpd[21355]: connect from
    Jul 19 11:42:20 localhost postfix/smtpd[21355]: 608F96D40431: client=mail-gw0-f4[]
    Jul 19 11:42:20 localhost postfix/cleanup[21424]: 608F96D40431: message-id=<E3C8
    [email protected]>
    Jul 19 11:42:20 localhost postfix/qmgr[26614]: 608F96D40431: from=<[email protected]>, size=1871, nrcpt=1 (queue active)
    Jul 19 15:42:21 localhost postfix/smtpd[21431]: connect from unknown[]
    Jul 19 15:42:21 localhost postfix/smtpd[21431]: 0A5E76D40432: client=unknown[127
    Jul 19 11:42:21 localhost postfix/cleanup[21424]: 0A5E76D40432: message-id=<E3C8
    [email protected]>
    Jul 19 11:42:21 localhost postfix/qmgr[26614]: 0A5E76D40432: from=<[email protected]>, size=2348, nrcpt=1 (queue active)
    Jul 19 15:42:21 localhost postfix/smtpd[21431]: disconnect from unknown[127.0.0.
    Jul 19 11:42:21 localhost postfix/trivial-rewrite[21416]: warning: do not list d
    omain in BOTH mydestination and virtual_mailbox_domains
    Jul 19 11:42:21 localhost amavis[26659]: (26659-04) Passed CLEAN, []
    [] <[email protected]> -> <[email protected]>, Message-ID
    : <[email protected]>, mail_id: f84Qam8QTIDa, Hits:
    0.556, size: 1871, queued_as: 0A5E76D40432, 573 ms
    Jul 19 15:42:21 localhost postfix/smtp[21425]: 608F96D40431: to=<[email protected]>, relay=[]:10024, delay=0.74, delays=0.17/0/0/0.57,
    dsn=2.0.0, status=sent (250 2.0.0 Ok, id=26659-04, from MTA([]:10025):
    250 2.0.0 Ok: queued as 0A5E76D40432)
    Jul 19 11:42:21 localhost postfix/qmgr[26614]: 608F96D40431: removed
    Jul 19 11:42:21 localhost postfix/local[21484]: 0A5E76D40432: to=<[email protected]>, relay=local, delay=0.11, delays=0.05/0.01/0/0.05, dsn=5.1.1, statu
    s=bounced (unknown user: "test")
    Jul 19 11:42:21 localhost postfix/cleanup[21424]: 24C106D40433: message-id=<2011
    [email protected]>
    Jul 19 11:42:21 localhost postfix/bounce[21485]: 0A5E76D40432: sender non-delive
    ry notification: 24C106D40433
    Jul 19 11:42:21 localhost postfix/qmgr[26614]: 24C106D40433: from=<>, size=4221,
    nrcpt=1 (queue active)
    Jul 19 11:42:21 localhost postfix/qmgr[26614]: 0A5E76D40432: removed
    Jul 19 11:42:22 localhost postfix/smtp[21433]: 24C106D40433: to=<[email protected]
    .com>,[]:25, delay=1.6, delays=0.06
    /0/0.2/1.3, dsn=2.0.0, status=sent (250 2.0.0 OK 1311090138 u61si18070012yhm.41)
    Jul 19 11:42:22 localhost postfix/qmgr[26614]: 24C106D40433: removed
    Jul 19 11:42:50 localhost postfix/smtpd[21355]: disconnect from[]

    Can anyone point me in the right direction as to what I have setup wrong? I looked in the dbispconfig database and the user is there
    Last edited: Jul 19, 2011
  2. falko

    falko Super Moderator ISPConfig Developer

    It seems as if you have in mydestination in /etc/postfix/, but not in the MySQL database. It must be the other way round. Remove it from mydestination and create the email domain in ISPConfig.
  3. josephip

    josephip New Member

    Yeah, it was in mydestination AND in the database, I removed it from mydestination and it works now :) Thanks for the help!

Share This Page