diff --git a/tasks/configure/mailbox.yml b/tasks/configure/mailbox.yml index de3f77a..078d230 100644 --- a/tasks/configure/mailbox.yml +++ b/tasks/configure/mailbox.yml @@ -2,15 +2,8 @@ # # Configuring Zimbra OSE ################################################################################ -- name: Enabling Zimbra's admin through Proxy Server - command: ./zmproxyconfig -e -w -C -H {{ hostname }}.{{ domain }} - args: - chdir: /opt/zimbra/libexec/ - become: yes - become_user: zimbra - - name: Enabling HTTP to HTTPS redirect - command: ./zmprov ms {{ hostname }}.{{ domain }} zimbraReverseProxyMailMode redirect + command: ./zmprov ms "{{ hostname }}"."{{ domain }}" zimbraReverseProxyMailMode redirect args: chdir: /opt/zimbra/bin/ @@ -23,35 +16,35 @@ # Configuring RBLs ################################################################################ - name: Importing zen.spamhaus.org RBL - shell: ./zmprov ms {{hostname}}.{{domain}} +zimbraMtaRestriction 'reject_rbl_client zen.spamhaus.org' + command: ./zmprov ms "{{hostname}}"."{{domain}}" +zimbraMtaRestriction 'reject_rbl_client zen.spamhaus.org' args: chdir: /opt/zimbra/bin/ become: true become_user: zimbra - name: Importing sbl.spamhaus.org RBL - shell: ./zmprov ms {{hostname}}.{{domain}} +zimbraMtaRestriction 'reject_rbl_client sbl.spamhaus.org' + command: ./zmprov ms "{{hostname}}"."{{domain}}" +zimbraMtaRestriction 'reject_rbl_client sbl.spamhaus.org' args: chdir: /opt/zimbra/bin/ become: true become_user: zimbra - name: Importing dsn.rfc-ignorant.org RBL - shell: ./zmprov ms {{hostname}}.{{domain}} +zimbraMtaRestriction 'reject_rbl_client dsn.rfc-ignorant.org' + command: ./zmprov ms "{{hostname}}"."{{domain}}" +zimbraMtaRestriction 'reject_rbl_client dsn.rfc-ignorant.org' args: chdir: /opt/zimbra/bin/ become: true become_user: zimbra - name: Importing bl.spamcop.net RBL - shell: ./zmprov ms {{hostname}}.{{domain}} +zimbraMtaRestriction 'reject_rbl_client bl.spamcop.net' + command: ./zmprov ms "{{hostname}}"."{{domain}}" +zimbraMtaRestriction 'reject_rbl_client bl.spamcop.net' args: chdir: /opt/zimbra/bin/ become: true become_user: zimbra - name: Importing dnsbl.sorbs.net RBL - shell: ./zmprov ms {{hostname}}.{{domain}} +zimbraMtaRestriction 'reject_rbl_client dnsbl.sorbs.net' + command: ./zmprov ms "{{hostname}}"."{{domain}}" +zimbraMtaRestriction 'reject_rbl_client dnsbl.sorbs.net' args: chdir: /opt/zimbra/bin/ become: true diff --git a/tasks/configure/mta.yml b/tasks/configure/mta.yml index bd89daa..3800005 100644 --- a/tasks/configure/mta.yml +++ b/tasks/configure/mta.yml @@ -22,7 +22,7 @@ # Configuring Pyzor ################################################################################ - name: Downloading and Configuring Pyzor's Anti-spam Base - shell: pyzor --homedir /opt/zimbra/data/amavisd/.pyzor discover + command: pyzor --homedir /opt/zimbra/data/amavisd/.pyzor discover become: true become_user: zimbra @@ -30,17 +30,17 @@ # Configuring Razor ################################################################################ - name: Creating Razor's Anti-spam Base - shell: razor-admin -home=/opt/zimbra/data/amavisd/.razor -create + command: razor-admin -home=/opt/zimbra/data/amavisd/.razor -create become: true become_user: zimbra - name: Downloading Razor's Anti-spam Base - shell: razor-admin -home=/opt/zimbra/data/amavisd/.razor -discover + command: razor-admin -home=/opt/zimbra/data/amavisd/.razor -discover become: true become_user: zimbra - name: Registering your Razor installation - shell: 'razor-admin -home=/opt/zimbra/data/amavisd/.razor -register' + command: 'razor-admin -home=/opt/zimbra/data/amavisd/.razor -register' become: true become_user: zimbra diff --git a/tasks/configure/proxy.yml b/tasks/configure/proxy.yml index e69de29..b61ad54 100644 --- a/tasks/configure/proxy.yml +++ b/tasks/configure/proxy.yml @@ -0,0 +1,9 @@ +# +# Configuring Zimbra OSE +################################################################################ +- name: Enabling Zimbra's admin through Proxy Server + command: ./zmproxyconfig -e -w -C -H "{{ hostname }}"."{{ domain }}" + args: + chdir: /opt/zimbra/libexec/ + become: yes + become_user: zimbra diff --git a/tasks/extras/modify-logo.yml b/tasks/extras/modify-logo.yml index 0b40612..8be0a1e 100644 --- a/tasks/extras/modify-logo.yml +++ b/tasks/extras/modify-logo.yml @@ -21,21 +21,21 @@ mode: 0644 - name: Configure the Zimbra Server to find the new logos - shell: './zmprov md {{ domain }} zimbraSkinLogoURL https://{{ hostname }}.{{ domain }}' + command: './zmprov md {{ domain }} zimbraSkinLogoURL https://{{ hostname }}.{{ domain }}' args: chdir: /opt/zimbra/bin become: true become_user: zimbra - name: Configure the path for the login logo file - shell: './zmprov md {{ domain }} zimbraSkinLogoLoginBanner /img/logoLoginBanner.png' + command: './zmprov md {{ domain }} zimbraSkinLogoLoginBanner /img/logoLoginBanner.png' args: chdir: /opt/zimbra/bin become: true become_user: zimbra - name: Configure the path for the webmail logo file - shell: './zmprov md {{ domain }} zimbraSkinLogoAppBanner /img/logoAppBanner.png' + command: './zmprov md {{ domain }} zimbraSkinLogoAppBanner /img/logoAppBanner.png' args: chdir: /opt/zimbra/bin become: true diff --git a/tasks/install/dependencies.yml b/tasks/install/dependencies.yml index c00002a..b50151d 100644 --- a/tasks/install/dependencies.yml +++ b/tasks/install/dependencies.yml @@ -4,15 +4,15 @@ ################################################################################ - name: Ensure Sendmail and Postfix is not installed package: - name: {{ absent }} + name: "{{ absent }}" state: absent - name: Ensure Pyzor and Razor is installed (CentOS/RedHat) yum: - name: {{ centos }} + name: "{{ centos }}" state: present - name: Ensure Pyzor and Razor is installed (Ubuntu) apt: - name: {{ ubuntu }} + name: "{{ ubuntu }}" state: present diff --git a/tasks/install/policyd.yml b/tasks/install/policyd.yml index 0de43ba..3772267 100644 --- a/tasks/install/policyd.yml +++ b/tasks/install/policyd.yml @@ -3,6 +3,6 @@ # Install PolicyD ################################################################################ - name: Installing PolicyD Service - shell: ./zmprov ms {{ hostname }}.{{ domain }} +zimbraServiceInstalled cbpolicyd +zimbraServiceEnabled cbpolicyd + command: ./zmprov ms "{{ hostname }}"."{{ domain }}" +zimbraServiceInstalled cbpolicyd +zimbraServiceEnabled cbpolicyd args: chdir: /opt/zimbra/bin/