Tab switch in System->Server configuration updates postfix main.cf file

Discussion in 'Installation/Configuration' started by IntrISP, Nov 10, 2022.

  1. IntrISP

    IntrISP New Member

    Hi
    I know, that switching tabs under System->Server configurations saves changes automatically. I tried to disable this by checking tick next by Discard changes on tab change but no luck. Every time I switch tabs ISPConfig saves config file in postfix (main.cf) with it's own configuration. I don't know history of server where ISPConfig is installed (I take over maintenance of this server). Can anyone tell me how ISPConfig is generating /etc/postfix/main.cf file? If I knew this I will update "base" main.cf file or some options in ISPConfig and then after autosave when switch the tab new main.cf file won't have changes. Example change that makes ISPConfig to main.cf file:
    Original:
    smtpd_sender_restrictions = check_sender_access proxy:mysql:/etc/postfix/mysql-virtual_sender.cf, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender
    After ISPConfig auto save:
    smtpd_sender_restrictions = permit_mynetworks, check_sender_access proxy:mysql:/etc/postfix/mysql-virtual_sender.cf, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unlisted_sender
    As You can see ISPConfig add permit_mynetworks option. That not only one change. There are others.
    Thank You.
    Best regards
    Jack
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    It does not add it, it exists in your config in the same line too, ISPConfig moves it before the virtual sender checks as hosts you define in mynetworks are trusted hosts, so that should come first. So you should consider that the new configuration is better than your old one, as ISPConfig also improves its config over time which means it has to update old configs.

    Make a backup of your main.cf file, let ISPConfig save the changes, and then check mail.log if you start seeing any errors. The configuration ISPConfig applies should work fine and changes over time happen when config gets improved. You can also diff the old and new config file to get a better overview of which way the config was changed.
     
  3. IntrISP

    IntrISP New Member

    Thanks for Your quick answer Till. Indeed I didn't catch that option is on the end. But there are other changes that ISPConfig is doing:
    Original:
    content_filter = amavis:[127.0.0.1]:10024
    ISPConfig:
    content_filter = lmtp:[127.0.0.1]:10024
    These rows are completely removed from my original main.cf file
    smtpd_milters = unix:milter/opendkim, unix:milter/opendmarc
    non_smtpd_milters = unix:milter/opendkim, unix:milter/opendmarc
    milter_default_action = accept
    milter_protocol = 6
    and ISPConfig adds some extra lines:
    address_verify_virtual_transport = smtp:[127.0.0.1]:10025
    address_verify_transport_maps = static:smtp:[127.0.0.1]:10025
    After these changes my mails can't go out.
    --
    Best regards
    Jack
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if he did not update ISPConfig for quite some time, amavis is now connected via lmtp, so that:s fine. But the system seems to be modified in several ways as e.g. DKIM signing in ISPConfig is always done by amavis or Rspamd, opendkim is not used while your system uses opendkim, so this collides with ISPConfig.
     

Share This Page