Disable mail delivery for local domain

Discussion in 'Installation/Configuration' started by David "Fires" Stein, Apr 27, 2023.

  1. David "Fires" Stein

    David "Fires" Stein New Member

    Hello, I got the website let's say (mydomain.com) on ISPConfig 3. We got the app that needs to use the ISPConfig server as an "SMTP relay". So I need to force ISPConfig to always send emails for this domain to MX SMTP and not try to deliver it locally. It is possible? I try almost every possible combination on the internet, also in the manual.

    What I did:
    1) Email -> Domain -> add new domain (mydomain.com)
    2) Email -> Email mailbox -> add new mailbox ( [email protected])

    The SMTP works ok on all other domains but if I try to deliver an email to [email protected] the postfix error on :
    Recipient address rejected: User unknown in virtual mailbox table;

    I try also check the "Disable (local) delivering" at the mailbox setting but still had no success. How is possible to force the ISP to always relay messages to mx SMTP server? Thanks a lot
     
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Why do you create e-mail domain on your server when e-mails to that domain should be delivered somewhere else? If you remove the mydomain.com from your server, then e-mails to @mydomain.com are sent to the e-mail server MX record shows, which seems to be what you want.
    If you really have a business case to have e-mail domain mydomain.com on that server, I think Email Routing can be used to accomplish that delivery to somewhere else thing. It is explained in ISPConfig manual chapter "4.7.1.7. Email Routing".
     
  3. David "Fires" Stein

    David "Fires" Stein New Member

    I was thinking I need to set up the mail account to use it in SMTP config for the application, or the ISP Config could just receive mail without an autentification? The application can't use the main SMTP server from MX by direct connection(some security thinks that I'm not able to change), which is the reason why I need to use the ISP Config like a relay.
     
  4. David "Fires" Stein

    David "Fires" Stein New Member

    @Taleman could you please help with specific settings of mail routing? I try everything from the manual but the postfix always tries to local delivery or the authorization error if the domain does not exist on the server.
    Thanks
     
  5. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    So you are convinced you must create the e-mail domain on your ISPConfig server?
    I only know about Email Routing what the manual says, so if that does not work I can not help.
    ISPConfig Business support could set this up for you. https://www.ispconfig.org/support/
     
  6. pyte

    pyte Well-Known Member HowtoForge Supporter

    So every mail that gets send to "mydomain.com" should be redirected to another mailserver then? Thats what transport rules are for.
     

Share This Page