mirror of https://github.com/lucascbeyeler/zimbra
				
				
				
			
		
			
				
	
	
		
			94 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			YAML
		
	
	
	
			
		
		
	
	
			94 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			YAML
		
	
	
	
| ---
 | |
| #
 | |
| # Configuring SpamAssassin
 | |
| ################################################################################
 | |
| - name: Downloading and Installing Kevin McGrail's Custom Rules
 | |
|   get_url:
 | |
|     url: https://www.pccc.com/downloads/SpamAssassin/contrib/KAM.cf
 | |
|     dest: /opt/zimbra/data/spamassassin/localrules/sakam.cf
 | |
|     mode: 0440
 | |
|     owner: zimbra
 | |
|     group: zimbra
 | |
| 
 | |
| - name: Configuring sauser.cf With new Scores
 | |
|   copy:
 | |
|     src: sauser.cf
 | |
|     dest: /opt/zimbra/data/spamassassin/localrules/sauser.cf
 | |
|     owner: root
 | |
|     group: root
 | |
|     mode: 0440
 | |
|     
 | |
| - name: Enabling SpamAssassin Auto Update
 | |
|   command: ./zmlocalconfig -e antispam_enable_rule_updates=true
 | |
|   args:
 | |
|     chdir: /opt/zimbra/bin/
 | |
|   become: true
 | |
|   become_user: zimbra
 | |
|     
 | |
| - name: Enabling Amavis to restart when the rules are update
 | |
|   command: ./zmlocalconfig -e antispam_enable_restarts=true
 | |
|   args:
 | |
|     chdir: /opt/zimbra/bin/
 | |
|   become: true
 | |
|   become_user: zimbra
 | |
| 
 | |
| - name: Enabling SpamAssassin rule compilation
 | |
|   command: ./zmlocalconfig -e antispam_enable_rule_compilation=true
 | |
|   args:
 | |
|     chdir: /opt/zimbra/bin/
 | |
|   become: true
 | |
|   become_user: zimbra
 | |
| 
 | |
| #
 | |
| # Configuring Pyzor
 | |
| ################################################################################
 | |
| - name: Downloading and Configuring Pyzor's Anti-spam Base
 | |
|   command: pyzor --homedir /opt/zimbra/data/amavisd/.pyzor discover
 | |
|   become: true
 | |
|   become_user: zimbra
 | |
| 
 | |
| #
 | |
| # Configuring Razor
 | |
| ################################################################################
 | |
| - name: Creating Razor's Anti-spam Base
 | |
|   command: razor-admin -home=/opt/zimbra/data/amavisd/.razor -create
 | |
|   become: true
 | |
|   become_user: zimbra
 | |
| 
 | |
| - name: Downloading Razor's Anti-spam Base
 | |
|   command: razor-admin -home=/opt/zimbra/data/amavisd/.razor -discover
 | |
|   become: true
 | |
|   become_user: zimbra
 | |
| 
 | |
| - name: Registering your Razor installation
 | |
|   command: 'razor-admin -home=/opt/zimbra/data/amavisd/.razor -register'
 | |
|   become: true
 | |
|   become_user: zimbra
 | |
| 
 | |
| #
 | |
| # Configuring PolicyD
 | |
| ################################################################################
 | |
| - name: Configuring PolicyD Database
 | |
|   copy:
 | |
|     src: 'config.php'
 | |
|     dest: /opt/zimbra/common/share/webui/includes/config.php
 | |
|     owner: root
 | |
|     group: root
 | |
|     mode: 0644
 | |
|   when: zimbra_policyd == 'y'
 | |
| 
 | |
| - name: Configuring PolicyD Web Interface
 | |
|   file:
 | |
|     src: /opt/zimbra/common/share/webui
 | |
|     dest: /opt/zimbra/data/httpd/htdocs/webui
 | |
|     state: link
 | |
|   when: zimbra_policyd == 'y'
 | |
| 
 | |
| - name: Enable PolicyD Web Interface
 | |
|   lineinfile:
 | |
|     dest: /opt/zimbra/conf/httpd.conf
 | |
|     regexp: "^    DirectoryIndex index.html index.html.var"
 | |
|     line: "    DirectoryIndex index.html index.html.var index.php"
 | |
|     state: present
 | |
|   when: zimbra_policyd == 'y'
 |