How to configure user triggered external mail from webmail to use third party SMTP server

Discussion in 'Installation/Configuration' started by Jacob Lee, Aug 1, 2025.

  1. Jacob Lee

    Jacob Lee New Member

    With reference to the title, I have the below goal.
    i. All mails (system and user triggered) will be using an external smtp server.

    I know I need to modify main.cfg in postfix. However, I am thinking if there's a way it can be configured from the UI ?
    Just checking if anyone have attempted to override the auto generated main.cfg with your own predefined value?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The relay server is configured under System > Server Config > Email, you do not modify main.cf for that.
     
  3. Jacob Lee

    Jacob Lee New Member

    Damm, thanks for pointing it out. However, I get it working by modifying main.cf.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Bad idea. Better undo the manual changes and do it properly in ISPConfig. Otherwise, your server will stop working eventually when your manual config gets overwritten on system changes or updates.
     
  5. Jacob Lee

    Jacob Lee New Member

    Oops, is there a way I able to restore the original copy of it (in an automatic manner), so that I can configure it in ISPConfig?
     
  6. remkoh

    remkoh Well-Known Member HowtoForge Supporter

    You don't need to recover anything and nothing will stop working in the future.

    I asume you manually added or changed "relayhost=" in /etc/postfix/main.cf?
    And maybe "relayhost_user=" and "relayhost_password="?
    Those settings have been overwritten in main.cf by ISPC when you changed the relay setting under System > Server Config > Email
     
    pyte likes this.

Share This Page