postfix checks email addresses of subdomains the server is not responsible

Discussion in 'ISPConfig 3 Priority Support' started by cmks, Aug 28, 2023.

Tags:
  1. cmks

    cmks Member HowtoForge Supporter

    Hi team,
    we have a setup, one of our email server is responsible for domain.com but not for sub.domain.com. If someone tries to send an email from [email protected] to [email protected] tihs email is transfered to our email server. But our email server rejects the email

    NOQUEUE: reject: RCPT from mx.host.com[1.2.3.4]: 550 5.1.0 <[email protected]>: Sender address rejected: User unknown in relay recipient table; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<mx.host.com>

    Again: sub.domain.com is not configured in our ISPconfig system.
    domain.com is created as relay-domain - the email server is only a backup MTA for that domain.

    Sending an email from <[email protected]> to <[email protected]> passes our email server w/o any problem. Any other email traffic is handled as expected from the server (filtering, anti spam, etc).

    Any idea is welcome ;-)

    Regards,
    CMKS
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    So, the mail system works correctly as it must reject unknown domains and an unknown subdomain is the same as an unknown domain. As far as I can see, your problem is not the mail system. Your problem is likely the DNS setup of this domain because there must be a reason why someone is sending emails to a server that is not responsible for these emails, and that's likely a wrong DNS setup, which indicates to the sender that this mail system is the correct mail server for that subdomain.
     
  3. cmks

    cmks Member HowtoForge Supporter

    Hey Till,
    it rejects the email because of the sending email address - not the receipient. But the server only should check sending email addresses of domain it is responsible for. it is not responsilbe for that subdomain.

    Have another look:
    domain.com MX srv1.domain.com
    sub.domain.com MX srv2.sub.domain.com

    Send an email fom <[email protected]> to <[email protected]>

    Erroneously srv1.domain.com rejects the email because it does not know the sender address <[email protected]>
    But srv1 is not responsible for sub.domain.com in any way. So it can not know anything about sub.domain.com.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

  5. cmks

    cmks Member HowtoForge Supporter

    Great hint, that's the key:
    Code:
    # postconf -d | grep parent_domain_matches_subdomains
    parent_domain_matches_subdomains = debug_peer_list,fast_flush_domains,mynetworks,permit_mx_backup_networks,qmqpd_authorized_clients,relay_domains,smtpd_access_maps
    
    How can I update the postfix main.cf in a ISPconfig compatible manner? It should be peristent even when we install a new version of ISPConfig?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig does not overwrites main.cf, it alters only the settings in that file managed by ISPConfig. If you like to alter a setting that ISPConfig does not manage, you can set it without having to worry that it gets overwritten during an update.
     

Share This Page