Oefenweb / ansible-postfix

Ansible role to set up postfix in Debian-like systems
MIT License
174 stars 82 forks source link

Possibility of header checks #52

Closed toebivankenoebi closed 5 years ago

toebivankenoebi commented 6 years ago

Changes allow the configuration of header checks.

Needs at least two options: pattern, action Optionally can handle a third option: text

Added task, handler, lines in main.cfg and a header_checks.j2 template  It can be configured like the following:

postfix_header_checks:
   - pattern: '<some pattern>' 
     action: "<action>" , action like "REPLACE"
     text: "<some optional text if needed>"
   - pattern ....

Additional option: postfix_header_check_format default: regexp

Configures /etc/postfix/main.cfg: smtp_header_checks = {{ postfix_header_check_format }}:/etc/postfix/header_checks

Configures /etc/postfix/header_checks: {{ pattern }} {{ action }} {{ text }}

tersmitten commented 6 years ago

Thanks for your contribution. I'll try to test and merge this soon.

toebivankenoebi commented 5 years ago

I'll just make a new pull request including all previous changes. If you agree with the features, i'll really appreciate if you could accept and merge it.

tersmitten commented 5 years ago

Yes, I would love to merge it. However I remember that there was one open question. Something with the postmap command. Can you have a look at it?

Thanks in advance

toebivankenoebi commented 5 years ago

Hi Micha

Yes, i replied to it before closing the old pull request. However that was kind of wrong on my part due to suoptimal branching. It was regarding the postmap command that was missing the new variable. This should be fixed in the new pull request.

Cheers Tobias

⁣Sent from BlueMail ​

On Nov 26, 2018, 17:33, at 17:33, Mischa ter Smitten notifications@github.com wrote:

Yes, I would love to merge it. However I remember that there was one open question. Something with the postmap command. Can you have a look at it?

Thanks in advance

-- You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub: https://github.com/Oefenweb/ansible-postfix/pull/52#issuecomment-441705477

tersmitten commented 5 years ago

Ok, I'll have a look