Skip to content

master.cf does not support custom arguments with custom services #87

@leonhedding

Description

@leonhedding

I made a change to postfix/files/master.cf. I don't know how to make a pull request here.

I replaced lines 139 - 149 of the current version with the below. It allows me to setup amivisd on port 10025 with all the arguments that I need.

{%-   if wrap %}
{{      parameter_str | wordwrap(width=wrap, break_long_words=False, wrapstring='\n%s  ' | format(comment)) }}
{%-   else %}
{{      parameter_str }}
{%-   endif -%}
{%-   elif 'user' in service or 'argv' in postfix_master_services.defaults[service_name] -%}
{%-      set parameter_str = "%s  user=%s argv=%s %s" | format(comment,
                                            service_param(service, service_name, 'user'),
                                            service_param(service, service_name, 'argv'),
                                            service_param(service, service_name, 'extras', '')) -%}
{%-   if wrap %}
{{      parameter_str | wordwrap(width=wrap, break_long_words=False, wrapstring='\n%s  ' | format(comment)) }}
{%-   else %}
{{      parameter_str }}
{%-   endif -%}
{%-   endif -%}
{%-   if service.args is not none -%}
{%-     for option in service.get('args', postfix_master_services.defaults[
                                            service_name].get('args', [])) -%}
{%-       if option.startswith('#') %}
{{ option }}
{%-       else %}
{{ comment }}  {{ option }}
{%-       endif %}
{%-     endfor %}
{%-   endif %}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions