This repository has been archived by the owner on Nov 17, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathautoconfig.yml
71 lines (65 loc) · 2.5 KB
/
autoconfig.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
---
# This is for Thunderbrid autoconfiguration.
- hosts: webservers
tasks:
- name: Basic setup
include_role: name=common
- name: Nginx site for autoconfig
include_role: name=nginx
vars:
nginx_owner: www-data
nginx_domain: autoconfig.afpy.org
nginx_certificates: [autoconfig.afpy.org, autoconfig.pycon.fr]
nginx_path: /var/www/autoconfig.afpy.org
nginx_conf: |
server
{
listen [::]:80; listen 80;
server_name autoconfig.afpy.org autoconfig.pycon.fr;
access_log /var/log/nginx/autoconfig.afpy.org-access.log;
error_log /var/log/nginx/autoconfig.afpy.org-error.log;
return 301 https://$host$request_uri;
}
server
{
listen [::]:443 ssl; listen 443 ssl;
server_name autoconfig.afpy.org autoconfig.pycon.fr;
access_log /var/log/nginx/autoconfig.afpy.org-access.log;
error_log /var/log/nginx/autoconfig.afpy.org-error.log;
include snippets/letsencrypt-autoconfig.afpy.org.conf;
root /var/www/autoconfig.afpy.org;
autoindex on;
}
- name: Create directory hierarchy for autoconfig
file:
path: /var/www/autoconfig.afpy.org/mail/
state: directory
mode: 0755
- name: Create autoconfig file
copy:
dest: /var/www/autoconfig.afpy.org/mail/config-v1.1.xml
mode: 0644
content: |
<?xml version="1.0" encoding="UTF-8"?>
<clientConfig version="1.1">
<emailProvider id="afpy.org">
<domain>afpy.org</domain>
<domain>pycon.fr</domain>
<displayName>AFPY</displayName>
<displayShortName>AFPY</displayShortName>
<incomingServer type="imap">
<hostname>mail.gandi.net</hostname>
<port>993</port>
<socketType>SSL</socketType>
<authentication>password-cleartext</authentication>
<username>%EMAILADDRESS%</username>
</incomingServer>
<outgoingServer type="smtp">
<hostname>mail.gandi.net</hostname>
<port>587</port>
<socketType>STARTTLS</socketType>
<authentication>password-cleartext</authentication>
<username>%EMAILADDRESS%</username>
</outgoingServer>
</emailProvider>
</clientConfig>