Recipient address rejected: User unknown in virtual mailbox table)

Discussion in 'Installation/Configuration' started by Pitmaster, Nov 4, 2012.

  1. Pitmaster

    Pitmaster New Member

    Dear people,
    This is the first time I use ISPconfig instead of Webmin. After a fire in the server I had to redo my configuration.
    Now I did it this time using a great looking howto on this site. However I get a massage back when I send a email to an address on my server:
    Recipient address rejected: User unknown in virtual mailbox table)

    I did make the user, in the mail_user it is there, in the mail_access table there is nothing.

    Wich information do we need here to judge this quest? postconf -n is given, replaced real names and domain names.

    Thanks in advance, Nico

    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
    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 = mydomain.nl, localhost, localhost.localdomain
    myhostname = mydomain.nl
    mynetworks = 127.0.0.0/8 [::1]/128 10.0.0.0/24
    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 = no
    recipient_delimiter = +
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    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/mysql-virtual_client.cf
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, 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/mysql-virtual_sender.cf
    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/mysql-virtual_transports.cf
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf, hash:/var/lib/mailman/data/virtual-mailman
    virtual_gid_maps = static:5000
    virtual_mailbox_base = /var/vmail
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_transport = dovecot
    virtual_uid_maps = static:5000
     
  2. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Thats ok. Mail access is used for email transports only e.g. wehn you use ispconfg on front of a exchange mailserver.

    Which exact tutorial did you use and which error messages do you get in the mail log file.

    In a postfix virtulal mailserver setup, you may not list a domain that shall be used for mailboxes as mydomain or myhostname, thats why the installation guide instructs you to use server1.example.com and not example.com as hostname. So if the domain you have problems with is mydomain.nl, then replace mydomain.nl with server1.mydomain.nl or a similar subdomain in postfix my.cnf, /etc/hostname and /etc/hosts and restart the server.
     
    Last edited: Nov 5, 2012
  3. Pitmaster

    Pitmaster New Member

    http://www.howtoforge.com/perfect-server-ubuntu-12.04-lts-apache2-bind-dovecot-ispconfig-3-p4


    And mail.err gif this:
    Nov 5 15:25:02 server1 postfix/smtpd[5543]: error: unsupported dictionary type: mysql
    Nov 5 15:26:07 postfix/smtpd[5543]: last message repeated 4 times

    And mail.log gif this:
    Nov 5 15:31:46 server1 postfix/pickup[5330]: 96EF582D65: uid=33 from=<www-data>
    Nov 5 15:31:46 server1 postfix/proxymap[5333]: warning: mysql:/etc/postfix/mysql-virtual_forwardings.cf is unavailable. unsupported dictionary type: mysql
    Nov 5 15:31:46 server1 postfix/cleanup[5585]: warning: proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf lookup error for "root@server1"
    Nov 5 15:31:46 server1 postfix/cleanup[5585]: warning: 96EF582D65: virtual_alias_maps map lookup problem for root@server1 -- deferring delivery

    Nico
     
  4. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    The postfix mysql package is not install.Please rerun this command from the tutorial:

    Code:
    apt-get install postfix postfix-mysql postfix-doc mysql-client mysql-server openssl getmail4 rkhunter binutils dovecot-imapd dovecot-pop3d dovecot-mysql dovecot-sieve sudo
     
  5. Pitmaster

    Pitmaster New Member

    My mysql-virtual_forwardings.cf =

    user = ispconfig
    password = hereisacryptedpasswordbyispconfig
    dbname = dbispconfig
    table = mail_forwarding
    select_field = destination
    where_field = source
    additional_conditions = and active = 'y' and server_id = 1

    The database exist.
    The table exist.
    The field exist but is empty.

    Nico
     
  6. Pitmaster

    Pitmaster New Member

    I did what you suggested to me but it didn't had any effect, still getting the mail back.
    Somethings change:
    mail.log now has:

    Nov 5 15:45:06 server1 postfix/smtp[21874]: 7B58F82CD7: to=<veronica@mydomain.nl>, relay=mx1.nedlinux.com[194.109.193.80]:25, delay=166025, delays=166010/0.02/0.2/15, dsn=5.5.2, status=bounced (host mx1.nedlinux.com[194.109.193.80] said: 504 5.5.2 <root@server1>: Sender address rejected: need fully-qualified address (in reply to RCPT TO command))
    Nov 5 15:45:11 server1 postfix/smtp[21867]: 5BB3582CCD: to=<nico@mydomain.nl>, relay=mx1.nedlinux.com[194.109.193.80]:25, delay=311709, delays=311694/0.02/0.1/15, dsn=5.5.2, status=bounced (host mx1.nedlinux.com[194.109.193.80] said: 504 5.5.2 <root@server1>: Sender address rejected: need fully-qualified address (in reply to RCPT TO command))
    Nov 5 15:45:21 server1 postfix/cleanup[21878]: C9ACA82C5A: message-id=<20121105144521.C9ACA82C5A@mydomain.nl>
    Nov 5 15:45:21 server1 postfix/qmgr[21856]: C9ACA82C5A: from=<>, size=2646, nrcpt=1 (queue active)
    Nov 5 15:45:21 server1 postfix/bounce[21876]: 7B58F82CD7: sender non-delivery notification: C9ACA82C5A
    Nov 5 15:45:21 server1 postfix/qmgr[21856]: 7B58F82CD7: removed

    Nico
     
  7. Pitmaster

    Pitmaster New Member

    mail.err doesn't gif messages at all any more. So that's good news.
    I think it had to do with mysql not configured. Thank's for that.

    Nico
     
  8. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    It worked fine and solved the first issue as you get a completely different message now. your messages get denied now because wou set a wrong hostname, you have to use a fully qulified hostname as described in the tutorial. A fully qulaified hostname is e.g. "server1.yourdomain.com" but your server uses currently just "server1" which is not a valid hostname for a server that delivers email over the internet.
     
  9. Pitmaster

    Pitmaster New Member

    So Till,
    if my 'machinename' is server1 and I have bought a domainname like mydomain.com what do I have to do then to get a FQDN for postfix?

    If I look into /etc/mailname it say correctly 'server1' (without quotes)
    If I look into /etc/hosts it say correctly '127.0.0.1 server1'
    if I look into /etc/hostname it say correctly 'server1'
    main.cf now looks:
    # See /usr/share/postfix/main.cf.dist for a commented, more complete version


    # Debian specific: Specifying a file name will cause the first
    # line of that file to be used as the name. The Debian default
    # is /etc/mailname.
    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

    readme_directory = /usr/share/doc/postfix

    # TLS parameters
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_use_tls = yes
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtp_tls_session_cache_database = btree:${data_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 = server1.mydomain.com
    alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    myorigin = /etc/mailname
    mydestination = server1, localhost, localhost.localdomain
    mynetworks = 127.0.0.0/8 [::1]/128 10.0.0.0/24
    mailbox_size_limit = 0
    recipient_delimiter = +
    virtual_alias_domains =
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf, hash:/var/lib/mailman/data/virtual-mailman
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    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/mysql-virtual_recipient.cf, reject_unauth_destination
    smtpd_tls_security_level = may
    transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    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/mysql-virtual_sender.cf
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
    smtpd_client_message_rate_limit = 100
    maildrop_destination_concurrency_limit = 1
    maildrop_destination_recipient_limit = 1
    virtual_transport = dovecot
    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
    owner_request_special = no
    dovecot_destination_recipient_limit = 1
    smtpd_sasl_type = dovecot
    smtpd_sasl_path = private/auth
    message_size_limit = 0
    html_directory = /usr/share/doc/postfix/html
    content_filter = amavis:[127.0.0.1]:10024
    receive_override_options = no_address_mappings

    Nico
     
  10. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Thats wrong, as server1 is not a fqdn. Edit the file and change it to server1.mydomain.com

    Thats wrong as well, change it to server1.mydomain.com

    And thats wrong too, change it to server1.mydomain.com

    then run:

    /etc/init.d/hostname restart

    toapply the changed hostname.

    You are running a internet server here, not a local office server. Internet server communicate with each other trough their fqdn. If you use server1 as hostname, no other server in the internet will be able to find your system and will reject your mails for that reason.

    Btw, if you would have set the hostname correctly as described in chapter 7 of the installation guide http://www.howtoforge.com/perfect-server-ubuntu-12.04-lts-apache2-bind-dovecot-ispconfig-3-p3, then your mail setup would have worked out of the box.
     
  11. Pitmaster

    Pitmaster New Member

    hostname say 'server1.mydomain.com'
    hostname -f say 'server1.mydomain.com'
    So that's ok now. It wasn't I did as you told and now it is ok.

    I still get my mail back, still the same reason.

    Nico
     
  12. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Either it is returned for a different reason now or you did not change all the settings Ilisted in my other post. Write and send a new mail and then post the errors that you get now in the mail.log
     
  13. Pitmaster

    Pitmaster New Member

    Yes, found something.
    It is a new domain freshly started. The company that is serving me this service is also an ISP and give people who buy a domain automaticly a mailbox.......
    So, my mail was going to them and not my own server.
    Now I have fit in (can do that myself) mx1 record into my dns records (I didn't wanted to use my own dns server).
    So now I have to wait until the dns records are being updated.

    In the meantime my mailqueue is flotting. I don't get it empty.
    Still the same error? Peace of mail.log.

    Nov 5 21:46:12 server1 postfix/smtp[4512]: 42A6A82CE5: to=<root@server1.mydomain.com>, orig_to=<root>, relay=none, delay=8770, delays=8770/0.19/0.01/0, dsn=4.4.1, status=deferred (connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)
    Nov 5 21:46:12 server1 postfix/error[4518]: 9AEC082CEC: to=<root@server1.mydomain.com>, orig_to=<root>, relay=none, delay=4570, delays=4569/0.32/0/0.05, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to 127.0.0.1[127.0.0.1]:10024: Connection refused)

    Nico
     
  14. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    amavisd isn't running. Please restart it.
     
  15. Pitmaster

    Pitmaster New Member

    It is now and it is emptying my queue.

    Thx. Nico
    ps. the dns still isn't sending the mail to my server. I write them a mail again.
     
  16. Pitmaster

    Pitmaster New Member

    Yes. It work, I receive email.
    I finished the configuration of Roundcube but there the next problem. Login just fine but no emails. And I know for sure there is one.
    Are you willing to stick around a bit Till and Falko?

    Thk, Nico
     
  17. Pitmaster

    Pitmaster New Member

    There is no log in errors. Just no mail. that's it.
    I didn't use ispconfig to configure Roundcube, is there a howto about inserting Roundcub into an existing ISPconfig installation?

    Nico
     
    Last edited: Nov 6, 2012
  18. Pitmaster

    Pitmaster New Member

  19. Pitmaster

    Pitmaster New Member

    It looks like my server stores the mail in var/mail and not in /var/vmail. Roundcube can send mail, the tests I did ended up in the .sent box in /var/vmail.

    Hmmmm.

    Nico
     
  20. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Are there any errors in your mail log? What are the outputs of
    Code:
    df -h
    and
    Code:
    repquota -avug
    ? What's in/etc/postfix/main.cf?
     

Share This Page