Email Routing Problem with ISPConfig 3

Discussion in 'Installation/Configuration' started by Aleksejs, Jun 21, 2022.

  1. Aleksejs

    Aleksejs New Member

    Hello,
    I have a problem routing mails trough our ISPConfig mail relay. I have following situation here:
    Domain testdom.de and sub1.testdom.de are configured as relay domains and are transfered to external servers, MX records of this domains point to our mail relay, so far so good. Then we have another subdomain of testdom.de lets call it sub2.testdom.de and MX records of this domain point to another mail relay that is not under our control. As soon as some user from sub1.testdom.de or testdom.de tries to send mail to sub2.testdom.de the mail gets rejected by our mail relay stating: Recipient address rejected: User unknown in relay recipient table
    I did not use any wildcards in relay configuration of testdom.de and sub1.testdom.de, so for ISPConfig sub2.testdom.de should be like external domain, where it resolves the MX records and sends the mail accordingly, but for some reason it is not.
    At the moment I added sub2.testdom.de in ISPConfig relay domains and pointed it to the server from MX record of that domain, but somehow it does not feel right. I dont have an account on sub2.testdom.de so I cant test incoming mails to our mail relay but at least I can now send mails to this domain using our mail relay.
    As I implemented anti spoofing like is shown in Shaal-IT Blog (modified the guide so it also works with relay domains, sorry cant post links), I assume that as soon as mail server that is responsible for sub2.testdom.de triest to deliver mail to testdom.de, it will fail because now I have this domain sub2.testdom.de in my recipient table, which will cause a reject as ISPConfig treats it as local relay domain and the mail server responsible for sub2.testdom.de will not authenticate against our mail relay prior to delivering the mail.
    Can someone clarify this ?
    ISPConfig Version: 3.2.8p1
    Best Regards,
    Aleksejs
     
  2. Jesse Norell

    Jesse Norell Well-Known Member Staff Member Howtoforge Staff

    The default parent_domain_matches_subdomains includes 'relay_domains':
    Code:
    $ postconf -d 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
    
    Take 'relay_domains' out.
     
    ahrasis likes this.
  3. Aleksejs

    Aleksejs New Member

    Thank you! Solved my problem!
     

Share This Page