diff options
Diffstat (limited to 'ansible/roles')
| -rw-r--r-- | ansible/roles/postfix/tasks/main.yml | 15 | 
1 files changed, 15 insertions, 0 deletions
| diff --git a/ansible/roles/postfix/tasks/main.yml b/ansible/roles/postfix/tasks/main.yml index 9723276..f647c24 100644 --- a/ansible/roles/postfix/tasks/main.yml +++ b/ansible/roles/postfix/tasks/main.yml @@ -134,6 +134,16 @@    tags:      - role::postfix +- name: Pass inbound mail through spamassassin content filter +  lineinfile: +    path: /etc/postfix/master.cf +    insertafter: "smtp      inet  n       -       y       -       -       smtpd" +    line: " -o content_filter=spamassassin" +  tags: +    - role::postfix +  notify: +    - Restart postfix +  - name: Add custom services to master.cf    blockinfile:      path: /etc/postfix/master.cf @@ -164,6 +174,11 @@          -o smtpd_sasl_path=private/auth          -o cleanup_service_name=authcleanup +      # spamassassin filtering +      spamassassin unix -     n       n       -       -       pipe +        user=spamd argv=/usr/bin/spamc -f -e +        /usr/sbin/sendmail -oi -f ${sender} ${recipient} +        # authenticated submission cleanup        authcleanup unix  n       -       y       -       0       cleanup          -o header_checks=pcre:/etc/postfix/header-checks-submission | 
