Unknown Virtual Host: domain.tld

Discussion in 'Installation/Configuration' started by Sharone, Jul 31, 2019.

  1. Sharone

    Sharone New Member

    Good day people,
    I apologize in advance for duplicate posting if this has been discussed before. The other suggestions failed to get me a remedy. I'm having trouble integrating postfix with mailman once again. 2 issues:
    1. When I try to create a new mailing list via web I get the error - unknown virtual host: domain.tld
    2. Creating a mailing list via cli (/var/lib/mailman/bin/newlist) works but I cannot send mail to that mailing list. I get loops in the logs before it eventually gets rejected and bounces back with:
    Code:
    This is the Email Security Gateway at host hostname.tld
    I'm sorry to inform you that message below could not be delivered.
    When delivery was attempted, the following error was returned.
    
    <[email protected]>: host x.x.x.x[x.x.x.x] said 550: 5.1.1 <[email protected]>: Recipient address rejected: User unknown in virtual mailbox table (in reply to RCPT TO command)
    (sample log);
    Code:
    Jul 31 13:24:59 hostname postfix/smtp[31540]: B8738D800BD: to=<[email protected]>, orig_to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.17, delays=0.01/0.01/0.05/0.11, dsn=2.0.0, status=sent (250 Ok: queued as 9F5C813C006F)
    Jul 31 13:25:00 hostname postfix/smtp[31369]: 1FD1BD800C5: to=<[email protected]>>, relay=x.x.x.x[x.x.x.x]:25, delay=0.17, delays=0.01/0/0.05/0.11, dsn=2.0.0, status=sent (250 Ok: queued as 06FE813C006F)
    Jul 31 13:25:04 hostname postfix/smtp[31610]: B1B8DD80090: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.27, delays=0.01/0.01/0.06/0.19, dsn=2.0.0, status=sent (250 Ok: queued as 9D14E13C0052)
    Here's postconf -n just in case
    Code:
    mail:~$ postconf -n
    alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases, hash:/etc/postfix/aliases
    append_dot_mydomain = no
    biff = no
    body_checks = regexp:/etc/postfix/body_checks
    broken_sasl_auth_clients = yes
    config_directory = /etc/postfix
    content_filter =
    dovecot_destination_recipient_limit = 1
    header_checks = regexp:/etc/postfix/header_checks
    html_directory = /usr/share/doc/postfix/html
    inet_interfaces = all
    inet_protocols = all
    mailbox_size_limit = 0
    maildrop_destination_concurrency_limit = 1
    maildrop_destination_recipient_limit = 1
    mailman_destination_recipient_limit = 1
    message_size_limit = 0
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    mydestination = localhost, localhost.localdomain
    myhostname = hostname.tld
    mynetworks = 127.0.0.0/8 x.x.x.x/32 x.x.x.x/32 x.x.x.x/32 [::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_maps
    readme_directory = /usr/share/doc/postfix
    recipient_delimiter = +
    relay_domains = lists.domain.tld
    relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    relayhost = x.x.x.x
    smtp_sasl_auth_enable = no
    smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
    smtp_sasl_security_options =
    smtp_tls_protocols = !SSLv2,!SSLv3
    smtp_tls_security_level = may
    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, reject_unauth_destination, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf
    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_mandatory_protocols = !SSLv2, !SSLv3
    smtpd_tls_protocols = !SSLv2,!SSLv3
    smtpd_tls_security_level = may
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    smtpd_use_tls = yes
    transport_maps = hash:/etc/postfix/transport, hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    virtual_alias_domains =
    virtual_alias_maps = hash:/var/lib/mailman/data/virtual-mailman, proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf
    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
    


    I am using ISPConfig 3.0.5.4p9 on Ubuntu 14.04 Mailman 2.1.16 multiserver set up. I would really appreciate your help.
     
    Last edited: Jul 31, 2019
  2. Sharone

    Sharone New Member

    I'm still stuck, someone kind enough to point me in the right direction.
     
  3. till

    till Super Moderator Staff Member ISPConfig Developer

    The hostname of a server must be a subdomain like server1.example.com or mail.example.com, it may not be example.com without subdomain part, see ISPConfig installation instructions. The same applies for the myhostname setting in postfix main.cf. If you would use example.com there, then you can not receive emails for this domain anymore. Fix the hostname and main.cf and restart the server.
     
  4. Sharone

    Sharone New Member

    Thank you, Till. I made a mistake with my code when i submitted. My hostname is actually server1.example.com and so is the entry in postfix for myhostname.
    I entered cleartext password in my /etc/postfix/mysql-virtual_transports.cf file so mail is no longer looping. I'm not sure that was the right move. My current error in the logs is as below;

    Code:
    Aug  5 09:27:15 mail-20 postfix/trivial-rewrite[14195]: warning: proxy:mysql:/etc/postfix/mysql-virtual_transports.cf lookup error for "[email protected]"
    Aug  5 09:27:15 mail-20 postfix/smtpd[14181]: NOQUEUE: reject: RCPT from mailscan.example.com [x.x.x.x]: 451 4.3.0 <[email protected]>: Temporary lookup failure; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<server1>
    Aug  5 09:27:15 mail-20 postfix/smtpd[14181]: NOQUEUE: reject: RCPT from mailscan-example.com[x.x.x.x]: 451 4.3.0 <[email protected]>: Temporary lookup failure; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mailscan-example.com>
    Aug  5 09:27:15 mail-20 postfix/trivial-rewrite[14195]: warning: proxy:mysql:/etc/postfix/mysql-virtual_transports.cf lookup error for "[email protected]"
    Aug  5 09:27:15 mail-20 postfix/smtpd[14198]: NOQUEUE: reject: RCPT from mailscan-example.com[x.x.x.x]: 451 4.3.0 <[email protected]>: Temporary lookup failure; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mailscan-example.com>
    
    
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    The password is always cleartext in that file, its a long string consisting of chars and numbers, so it might look like being encrypted. If that password was wrong, then you must have altered the password of the user ispconfig manually in mysql before as the sane password is set during installation of ispconfig by the ispconfig installer in many config files.
     
  6. Sharone

    Sharone New Member

    Okay because I found this 04accfbb35597fa681f417f99c6c95bc under password so i replaced it with the password for that database. I apologise as I am troubleshooting what someone else set up without having to rebuild the entire multiserver setup as this would disrupt services. How can I go about resolving this lookup error?

    Code:
    Aug  5 09:27:15 mail-20 postfix/trivial-rewrite[14195]: warning: proxy:mysql:/etc/postfix/mysql-virtual_transports.cf lookup error for "[email protected]"
    Aug  5 09:27:15 mail-20 postfix/smtpd[14181]: NOQUEUE: reject: RCPT from mailscan.example.com [x.x.x.x]: 451 4.3.0 <[email protected]>: Temporary lookup failure; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<server1>
    Aug  5 09:27:15 mail-20 postfix/smtpd[14181]: NOQUEUE: reject: RCPT from mailscan-example.com[x.x.x.x]: 451 4.3.0 <[email protected]>: Temporary lookup failure; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mailscan-example.com>
    Aug  5 09:27:15 mail-20 postfix/trivial-rewrite[14195]: warning: proxy:mysql:/etc/postfix/mysql-virtual_transports.cf lookup error for "[email protected]"
    Aug  5 09:27:15 mail-20 postfix/smtpd[14198]: NOQUEUE: reject: RCPT from mailscan-example.com[x.x.x.x]: 451 4.3.0 <[email protected]>: Temporary lookup failure; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mailscan-example.com>
    
    
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    This is the cleartext password of the ispconfig mysql user which grants access to the dbispconfig database. As mentioned above, if you manually changed the password if the ispconfig user in mysql, then you have broken all connected services like the mail system, pure-ftpd and others. To fix it change the password of the ispconfig user back to its original value or search all files in /etc/ and /usr/local/ispconfig for occurrences of the old ├╝password and replace it with the new one. It is used in quite a few places.
     
  8. Sharone

    Sharone New Member

    Reverted to previous setting. We're back to the hops/loops now before the email gets rejected.
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    I did not say that you should revert this file to its previous setting. I explained that you have to change many files when you have altered the password of the ispconfig mysql user, which you apparently did as the original password is not the right one anymore.
     
  10. Sharone

    Sharone New Member

    Understood although I do not believe I was supposed to edit that bit of the file to begin with as i was gambling with fixing the error in the logs. I did edit all the .cf files and commented out the original password so all I had to do was delete my entry and uncomment the password I found.

    Code:
    Aug  5 10:53:24 server1 postfix/smtp[25712]: 93643D8008C: to=<[email protected]>, orig_to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.13, delays=0.02/0.01/0.02/0.08, dsn=2.0.0, status=sent (250 Ok: queued as 5680413C0071)
    Aug  5 10:53:25 server1 postfix/smtp[25712]: ED970D8008C: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.21, delays=0.01/0/0.05/0.14, dsn=2.0.0, status=sent (250 Ok: queued as B558913C0071)
    Aug  5 10:53:25 server1 postfix/smtp[25712]: 6BD7CD8008C: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.16, delays=0.01/0/0.05/0.09, dsn=2.0.0, status=sent (250 Ok: queued as 343BC13C0071)
    Aug  5 10:53:25 server1 postfix/smtp[25712]: CD456D8008C: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.15, delays=0.01/0/0.05/0.09, dsn=2.0.0, status=sent (250 Ok: queued as 9464213C0071)
    Aug  5 10:53:26 server1 postfix/smtp[25712]: 37BC0D8008C: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.16, delays=0.01/0/0.05/0.09, dsn=2.0.0, status=sent (250 Ok: queued as F325613C0071)
    Aug  5 10:53:26 server1 postfix/smtp[25712]: 9987AD8008C: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.23, delays=0.05/0/0.06/0.12, dsn=2.0.0, status=sent (250 Ok: queued as 6B6AD13C0074)
    Aug  5 10:53:27 server1 postfix/smtp[25712]: 1E755D8008F: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.19, delays=0.05/0/0.05/0.08, dsn=2.0.0, status=sent (250 Ok: queued as E498713C0071)
    Aug  5 10:53:27 server1 postfix/smtp[25712]: 86ED6D8008C: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.16, delays=0.01/0/0.05/0.09, dsn=2.0.0, status=sent (250 Ok: queued as 4EDA713C0071)
    Aug  5 10:53:28 server1 postfix/smtp[25712]: E69DDD8008C: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.15, delays=0.01/0/0.05/0.09, dsn=2.0.0, status=sent (250 Ok: queued as AE13B13C0071)
    Aug  5 10:53:28 server1 postfix/smtp[25712]: 5251AD8008C: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.16, delays=0.01/0/0.05/0.1, dsn=2.0.0, status=sent (250 Ok: queued as 1A59C13C0071)
    Aug  5 10:53:28 server1 postfix/smtp[25712]: B2F9ED8008C: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.16, delays=0.01/0/0.05/0.1, dsn=2.0.0, status=sent (250 Ok: queued as 7A70C13C0071)
    Aug  5 10:53:29 server1 postfix/smtp[25712]: 2451AD8008C: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.16, delays=0.01/0/0.05/0.09, dsn=2.0.0, status=sent (250 Ok: queued as E164013C0071)
    Aug  5 10:53:29 server1 postfix/smtp[25712]: 95063D8008C: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.16, delays=0.01/0/0.05/0.09, dsn=2.0.0, status=sent (250 Ok: queued as 5D56813C0071)
    Aug  5 10:53:30 server1 postfix/smtp[25712]: 0602DD8008C: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.21, delays=0.01/0/0.05/0.15, dsn=2.0.0, status=sent (250 Ok: queued as C29EA13C0071)
    Aug  5 10:53:30 server1 postfix/smtp[25712]: 7C5A0D8008C: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.2, delays=0.01/0/0.05/0.13, dsn=2.0.0, status=sent (250 Ok: queued as 4790F13C0071)
    Aug  5 10:53:31 server1 postfix/smtp[25712]: E8B9BD8008C: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.15, delays=0.01/0/0.05/0.09, dsn=2.0.0, status=sent (250 Ok: queued as B192F13C0071)
    Aug  5 10:53:31 server1 postfix/smtp[25712]: 5A277D8008C: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.17, delays=0.01/0/0.05/0.11, dsn=2.0.0, status=sent (250 Ok: queued as 23A7813C0071)
    Aug  5 10:53:31 server1 postfix/smtp[25712]: C3BB8D8008F: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.17, delays=0.01/0/0.05/0.09, dsn=2.0.0, status=sent (250 Ok: queued as 8D49513C0071)
    Aug  5 10:53:32 server1 postfix/smtp[25712]: 35002D8008F: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.16, delays=0.01/0/0.05/0.09, dsn=2.0.0, status=sent (250 Ok: queued as F2D0C13C0071)
    Aug  5 10:53:32 server1 postfix/smtp[25712]: 9873CD8008F: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.16, delays=0.01/0/0.05/0.09, dsn=2.0.0, status=sent (250 Ok: queued as 6148713C0071)
    Aug  5 10:53:33 server1 postfix/smtp[25712]: 09237D8008F: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.25, delays=0.01/0/0.05/0.18, dsn=2.0.0, status=sent (250 Ok: queued as C832313C0071)
    Aug  5 10:53:33 server1 postfix/smtp[25712]: 8513ED8008F: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.16, delays=0.01/0/0.05/0.1, dsn=2.0.0, status=sent (250 Ok: queued as 4F29413C0071)
    Aug  5 10:53:34 server1 postfix/smtp[25712]: EC953D8008F: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.18, delays=0.01/0/0.05/0.11, dsn=2.0.0, status=sent (250 Ok: queued as B6C3113C0071)
    Aug  5 10:53:34 server1 postfix/smtp[25712]: 63FE5D8008F: to=<[email protected]>, relay=x.x.x.x[x.x.x.x]:25, delay=0.18, delays=0.01/0/0.05/0.11, dsn=2.0.0, status=sent (250 Ok: queued as 2F72213C0074)
    
     

Share This Page