New Mail Server - Route only OUTBOUND emails to smtp.domain.tld

Discussion in 'Installation/Configuration' started by HappierTimesAhead, Feb 25, 2022.

  1. Hi,

    I have setup a new outgoing email server (smtp.DOMAIN.COM) as per the ISPConfig 3.1 Manual; Installing A Multiserver Setup With Dedicated Web, Email, DNS And MySQL
    Database Servers On Debian 8 With ISPConfig 3.1. I am actually on Debian 9 and ISPConfig 3.2.7p1 This server is showing up all OK in Monitor and System.

    I deleted then re-added one of my email domains to use the smtp.DOMAIN.COM server and I can send email with no apparent problem (although I cannot receive email via smtp.DOMAIN.COM).

    What I would like to do is somehow route only outbound emails to smtp.DOMAIN.COM from one domain but still receive email on main.DOMAIN.COM.

    Is there a simple way to achieve this please?

    As always, many thanks in advance for your kind help

    Kind regards to all

    HTA
     
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    I'm not clear on your install, but mixing ISPConfig versions across different servers in a single multi-server install will cause problems, so ensure you're not doing that.
     
    HappierTimesAhead likes this.
  3. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Yes, enable System > Main Config > Mail > Show per domain relay options then set that domain to relay via the smtp server. Note that option is not available in old 3.1 systems, you should definitely upgrade those (major security issues have been fixed).
     
    HappierTimesAhead likes this.
  4. Hi Jesse, thanks for the reply.

    What I said was that I set up the new smtp server as per the Manual. The manual I own is titled "Installing A Multiserver Setup With Dedicated Web, Email, DNS And MySQL Database Servers On Debian 8 With ISPConfig 3.1." I followed all steps to create the new SMTP server which is part of a multi server environment.

    I have three servers (all setup in Multi Server Config on Debian 9) which are as follows: -

    main.DOMAIN.COM (ISPConfig 3.2.7p1 - ISPConfig Admin Panel, Web, Email, DNS primary, MySQL)
    slave.DOMAIN.COM (ISPConfig 3.2.7p1 - DNS slave)
    smtp.DOMAIN.COM (ISPConfig 3.2.7p1 - Email)
     
  5. Thank you for pointing me in the right direction here. I had not spotted the "Show per domain relay options" option! Now in Email Domain config I can see the Relayhost options - Brilliant!

    I hope I am not being stupid here but, who is the Relayhost User and Relayhost Password? Is it the system admin login or any user from the domain to be relayed?

    Once again Jesse many thanks for your very helpful information.

    Hope you have a great weekend

    Kind regards

    HTA
     
  6. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    The user/password would be used to authenticate your server to the relay host when relaying mail for the domain; you may not need to use those settings (if the relay host allows your server to send without a username and password).
     
    HappierTimesAhead likes this.
  7. Hi Jesse,

    Many thanks for your time.

    Still no further on! Looking at the mail log on main.domain.com I see this failure: -
    Code:
    Feb 26 17:15:18 main postfix/error[32483]: 0F65026C71D4: to=<[email protected]>, relay=none, delay=0.05, delays=0.02/0.02/0/0.01, dsn=4.7.0, status=deferred (delivery temporarily suspended: SASL authentication failed; cannot authenticate to server smtp.DOMAIN.com[xxx.xxx.xxx.xxx]: generic failure)

    smtp.DOMAIN.com IP Address is correct!

    I even re-installed smtp.DOMAIN.COM this afternoon using the "autoinstaller": -
    https://www.howtoforge.com/tutorial/ispconfig-multiserver-setup-debian-ubuntu/3/

    Totally confused

    Kind regards

    HTA
     
  8. The thing that is confusing me is that smtp.DOMAIN.com is part of ISPConfig multi-server environment.

    So I am very confused as to how to authenticate with smtp.DOMAIN.com from main.DOMAIN.COM?

    Should I have to, somehow created a user in smtp.DOMAIN.com so that I can enter this user on the Relay User and Relay Password fields?

    I can see that smtp.DOMAIN.com is online in Control Panel

    Totally confused and frustrated to be honest!

    Kind regards

    HTA
     
  9. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    It seems that is what @Jesse Norell wrote in #6.
     
  10. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    You can configure the relay to not require login from your other server, though that also allows websites there to relay without authentication, which is a potential source of spam. To do so, add the server's IP address to mynetworks, or you could try creating a postfix whitelist entry for the client IP, ie. the address of your first server.
     
    HappierTimesAhead likes this.

Share This Page