Email Forward Accounts "User unknown in virtual mailbox table."

Discussion in 'Installation/Configuration' started by blinden, Oct 15, 2012.

  1. blinden

    blinden Member

    When I create email forwards, it doesn't seem to pass a test, and refuses to let the remote server send the email into the server. I checked the DB, and the accounts are listed in the 'Mail_forwarding' table.

    sending from a remote account using thunderbird, I get the message:

    An error occurred while sending mail. The mail server responded: 5.1.1 <[email protected]>: Recipient address rejected: User unknown in virtual mailbox table. Please check the message recipient [email protected] and try again.

    I've tried searching a bit, and haven't found any luck finding information on this specific situation.

    Ubuntu 12.04
    ISPConfig Mulitserver Setup
  2. blinden

    blinden Member

    So, I guess this comes down to the fact that when the email attempts to send to the server, it is looking at the mailbox table and not seeing the accounts.

    Is there something missed or messed up that would make the server reference the mail_forwarding table additionally to verify the accounts. I've not had any luck finding much info because everything I search for returns a bunch of results about real email addresses not working, but not a lot of info for cases where it's only the forwards that aren't working.
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    What is the hostname of the server, is it "domain"?
  4. blinden

    blinden Member

    No, the hostname is it's a different domain altogether.
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Please do a manual ispconfig update:

    cd /tmp
    tar xvfz ISPConfig-3-stable.tar.gz
    cd ispconfig3_install/install
    php -q update.php
    and choose to reconfigure services during update so that the postfix configuration gets rewritten to ensure that it is correct.
  6. blinden

    blinden Member

    Completed that, no change.
  7. pebkac

    pebkac Member HowtoForge Supporter

    I have this problem also. I've used ISPConfig for sometime and never had this problem with forwards. I have a forward setup, it is just a forward. When I send a test email from my gmail account I get this:

    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]>: user unknown
    This forward is set like so: [email protected] forwards to [email protected]

    Here is some config properties:

    postconf -n
    [email protected]:/home/sysadmin# postconf -n
    alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    append_dot_mydomain = no
    biff = no
    body_checks = regexp:/etc/postfix/body_checks
    broken_sasl_auth_clients = yes
    config_directory = /etc/postfix
    dovecot_destination_recipient_limit = 1
    header_checks = regexp:/etc/postfix/header_checks
    html_directory = /usr/share/doc/postfix/html
    mailbox_size_limit = 0
    maildrop_destination_concurrency_limit = 1
    maildrop_destination_recipient_limit = 1
    message_size_limit = 0
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    mydestination =, localhost, localhost.localdomain
    myhostname =
    mynetworks = [::1]/128
    myorigin = /etc/mailname
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    owner_request_special = no
    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
    readme_directory = /usr/share/doc/postfix
    receive_override_options = no_address_mappings
    recipient_delimiter = +
    relay_domains = mysql:/etc/postfix/
    relay_recipient_maps = mysql:/etc/postfix/
    relayhost =
    smtp_sasl_auth_enable = no
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_security_options =
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    smtpd_client_message_rate_limit = 100
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/, reject_unauth_destination
    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/
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_tls_security_level = may
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtpd_use_tls = yes
    transport_maps = proxy:mysql:/etc/postfix/
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/, proxy:mysql:/etc/postfix/, hash:/var/lib/mailman/data/virtual-mailman
    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
    Postmap query:
    [email protected]:/home/sysadmin# postmap -q [email protected] proxy:mysql:/etc/postfix/
    [email protected]
    [email protected]:/home/sysadmin#
    I'm running the latest stable version of ISPConfig and using the latest Perfect Server 3
  8. pebkac

    pebkac Member HowtoForge Supporter

  9. pebkac

    pebkac Member HowtoForge Supporter

    I fixed my issue by commenting out this line in

    receive_override_options = no_address_mappings

  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Just a guess, did sou disable amavisd on your srver?
  11. pebkac

    pebkac Member HowtoForge Supporter

    I did the other day because I was working through a problem with another Spam service I am testing and my mail seemed to be looping and I thought it might be Amavisd. Is that how that receive override showed up in my
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Receive override is required for amavisd and has to be disablen in case that you remove amavisd manually, please see instruction in ispconfig faq. So your problem was caused by removing amavisd only partialy.
  13. pebkac

    pebkac Member HowtoForge Supporter

    I have since uncommented it, and was having the problem until I commented out the override...hope that is they it should be now. I also dont have any spam filtering enabled on this domain.
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats what i described above and what is described in the faq. You had the problem because you removed amavisd in the postfix settings Partially but forgot to remove the override line as well as described in the faq as amavis removal instructions.
  15. blinden

    blinden Member

    Getting back into this today, this made no change in my situation.

    We have another non-production install of ISPConfig that works ok, but this is the one that we want to push to production, can't do it without this working though.

    Also finally got time to check alias accounts, and, as expected, they do the same.

    edit: Should have reloaded! I see this does not pertain to my situation.

    Just appears that incoming attempts are only checking against and not or
    Last edited: Oct 25, 2012
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Please try what I suggested in #5 of this thread to ensure that the postfix configuration is correct. And you did not alter manually to disable amavisd, so its not the issue from pebkac?
  17. blinden

    blinden Member

    Yeah, I did try the reload, no change.

    No changes were made to at all.

    It's so strange, I feel like it's so close, just can't find where in the process this breaksdown.
  18. blinden

    blinden Member

    Here is my for reference:

    # Postfix master process configuration file.  For details on the format
    # of the file, see the master(5) manual page (command: "man 5 master").
    # Do not forget to execute "postfix reload" after editing this file.
    # ==========================================================================
    # service type  private unpriv  chroot  wakeup  maxproc command + args
    #               (yes)   (yes)   (yes)   (never) (100)
    # ==========================================================================
    smtp      inet  n       -       -       -       -       smtpd
    #smtp      inet  n       -       -       -       1       postscreen
    #smtpd     pass  -       -       -       -       -       smtpd
    #dnsblog   unix  -       -       -       -       0       dnsblog
    #tlsproxy  unix  -       -       -       -       0       tlsproxy
    #submission inet n       -       -       -       -       smtpd
    #  -o syslog_name=postfix/submission
    #  -o smtpd_tls_security_level=encrypt
    #  -o smtpd_sasl_auth_enable=yes
    #  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    #smtps     inet  n       -       -       -       -       smtpd
    #  -o syslog_name=postfix/smtps
    #  -o smtpd_tls_wrappermode=yes
    #  -o smtpd_sasl_auth_enable=yes
    #  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    #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       -       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
    proxywrite unix -       -       n       -       1       proxymap
    smtp      unix  -       -       -       -       -       smtp
    relay     unix  -       -       -       -       -       smtp
    #       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq     unix  n       -       -       -       -       showq
    error     unix  -       -       -       -       -       error
    retry     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
    # ====================================================================
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    # Many of the following services use the Postfix pipe(8) delivery
    # agent.  See the pipe(8) man page for information about ${recipient}
    # and other message envelope options.
    # ====================================================================
    # maildrop. See the Postfix MAILDROP_README file for details.
    # Also specify in maildrop_destination_recipient_limit=1
    maildrop  unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail argv=/usr/bin/maildrop -d vmail ${extension} ${recipient} ${user} ${nexthop} ${sender}
    # ====================================================================
    # Recent Cyrus versions can use the existing "lmtp" entry.
    # Specify in cyrus.conf:
    #   lmtp    cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
    # Specify in one or more of the following:
    #  mailbox_transport = lmtp:inet:localhost
    #  virtual_transport = lmtp:inet:localhost
    # ====================================================================
    # Cyrus 2.1.5 (Amos Gouaux)
    # Also specify in cyrus_destination_recipient_limit=1
    #cyrus     unix  -       n       n       -       -       pipe
    #  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
    # ====================================================================
    # Old example of delivery via Cyrus.
    #old-cyrus unix  -       n       n       -       -       pipe
    #  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
    # ====================================================================
    # 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/
      ${nexthop} ${user}
    dovecot   unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
    amavis unix - - - - 2 smtp
            -o smtp_data_done_timeout=1200
            -o smtp_send_xforward_command=yes inet n - - - - smtpd
            -o content_filter=
            -o local_recipient_maps=
            -o relay_recipient_maps=
            -o smtpd_restriction_classes=
            -o smtpd_client_restrictions=
            -o smtpd_helo_restrictions=
            -o smtpd_sender_restrictions=
            -o smtpd_recipient_restrictions=permit_mynetworks,reject
            -o mynetworks=
            -o strict_rfc821_envelopes=yes
            -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
    #        -o smtpd_bind_address=
  19. blinden

    blinden Member

    Any thoughts on turning on/up logging as to maybe get a better idea of where this is failing. In my train of thought, it's either failing at a postfix level where postfix is for some reason not understanding to look in the table properly (I've triple checked all the syntax there) or there is a failure in communication between postfix and mysql that is only taking place on forward/alias queries and not on regular virtual mailbox queries. That seems less likely, so I still feel that I have something setup incorrectly in postfix.


    I dont' think it can be a MYSQL communcation issue because a postalias -q command returns the proper forward address.


    after all of this, I think it's a problem with the outbound server.

    I tried sending from other external accounts (gmail, etc) but the email never showed up to the forward address, turns out it was hiding in spam, through my one server on thunderbird it failed, as well as through webmail on that same account. Unfortunately that was the main account I used for testing, have to work backwards now and find out what the problem is with that other server and why it's causing a problem with the lookup.
    Last edited: Oct 31, 2012

Share This Page