How to use the certbot-postfix.certbot_postfix.postconf.ConfigMain function in certbot-postfix

To help you get started, we’ve selected a few certbot-postfix examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github certbot / certbot / certbot-postfix / certbot_postfix / postconf.py View on Github external
def __init__(self, executable, ignore_master_overrides=False, config_dir=None):
        super(ConfigMain, self).__init__(executable, config_dir)
        # Whether to ignore overrides from master.
        self._ignore_master_overrides = ignore_master_overrides
        # List of all current Postfix parameters, from `postconf` command.
        self._db = {} # type: Dict[str, str]
        # List of current master.cf overrides from Postfix config. Dictionary
        # of parameter name => list of tuples (service name, paramter value)
        # Note: We should never modify master without explicit permission.
        self._master_db = {} # type: Dict[str, List[Tuple[str, str]]]
        # List of all changes requested to the Postfix parameters as they are now
        # in _db. These changes are flushed to `postconf` on `flush`.
        self._updated = {} # type: Dict[str, str]
        self._read_from_conf()
github EFForg / starttls-everywhere / certbot-postfix / certbot_postfix / postconf.py View on Github external
postconf before any values in extra_args.

        :param list extra_args: additional arguments for the command

        :returns: data written to stdout and stderr
        :rtype: `tuple` of `str`

        :raises subprocess.CalledProcessError: if the command fails

        """
        all_extra_args = []
        for args_list in (self._modifiers, extra_args,):
            if args_list is not None:
                all_extra_args.extend(args_list)

        return super(ConfigMain, self)._call(all_extra_args)