Open leonhedding opened 5 years ago
Creating a PR is super easy.
I take it you want to add the if service.args ...
block to the extra_service macro?
Yes, that would be about correct.
@leonhedding I'd like a bit of clarification of your initial problem. I believe I have a fix for your problem, but wanna make sure I understand your underlying issue.
You would like to add a custom service to the master.cf config. You are trying to do that via the postfix:master_config:services pillar. Your service should be something like one of the existing postfix services, such as smtpd, smtp etc.? But instead you end up with a dovecot-deliver or mailman styled service at the bottom of the file where argv and user is defined but empty? And you actually do not want that, right?
It has been a while since I reviewed this, but I am pretty certain that is the issue I was having is what you describe. It was putting in text that I can't have for the amavisd setup. It should be setup like smtpd, but have a different name and port.
I've had the same problem - as workaround i used the extras variable:
mymailfilter:
enable: true
extras: |
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o myhostname=localhost
-o smtpd_helo_restrictions=
-o smtpd_client_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
no_args: true
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.