Skip to content
Snippets Groups Projects
Commit ac949cdf authored by Hinrikus Wolf's avatar Hinrikus Wolf
Browse files

add role for dovecot

parent ebfca66d
No related branches found
No related tags found
No related merge requests found
...@@ -28,3 +28,12 @@ ...@@ -28,3 +28,12 @@
- mail - mail
- name: ensure dsync config is present
template: src=templates/conf.d/99-dsync.conf.j2 dest=/etc/dovecot/conf.d/99-dsync.conf
when: dsync == True
notify:
- restart dovecot
tags:
- dovecot
- mail
...@@ -212,6 +212,11 @@ namespace inbox { ...@@ -212,6 +212,11 @@ namespace inbox {
# Space separated list of plugins to load for all services. Plugins specific to # Space separated list of plugins to load for all services. Plugins specific to
# IMAP, LDA, etc. are added to this list in their own .conf files. # IMAP, LDA, etc. are added to this list in their own .conf files.
{%- if dsync is defined -%}
mail_plugins = $mail_plugins notify replication
{%- else -%}
mail_plugins = $mail_plugins notify
{%- endif -%}
#mail_plugins = #mail_plugins =
## ##
......
...@@ -35,16 +35,6 @@ service imap-login { ...@@ -35,16 +35,6 @@ service imap-login {
#vsz_limit = $default_vsz_limit #vsz_limit = $default_vsz_limit
} }
service pop3-login {
inet_listener pop3 {
#port = 110
}
inet_listener pop3s {
#port = 995
#ssl = yes
}
}
service lmtp { service lmtp {
unix_listener /var/spool/postfix/private/dovecot-lmtp { unix_listener /var/spool/postfix/private/dovecot-lmtp {
group = postfix group = postfix
...@@ -69,11 +59,6 @@ service imap { ...@@ -69,11 +59,6 @@ service imap {
#process_limit = 1024 #process_limit = 1024
} }
service pop3 {
# Max. number of POP3 processes (connections)
#process_limit = 1024
}
service auth { service auth {
# auth_socket_path points to this userdb socket by default. It's typically # auth_socket_path points to this userdb socket by default. It's typically
# used by dovecot-lda, doveadm, possibly imap process, etc. Users that have # used by dovecot-lda, doveadm, possibly imap process, etc. Users that have
...@@ -101,8 +86,8 @@ service auth { ...@@ -101,8 +86,8 @@ service auth {
# Auth process is run as this user. # Auth process is run as this user.
# user = $default_internal_user # user = $default_internal_user
user = postfix user = dovecot
group = postfix group = dovecot
} }
service auth-worker { service auth-worker {
......
service replicator {
process_min_avail = 1
unix_listener replicator-doveadm {
mode = 0666
user = dovecot
}
group = vmail
}
replication_max_conns = 10
# there was a problem with the oom-killer
#plugin {
# # When saving a new mail via IMAP or delivering a mail via LDA/LMTP,
# # wait for the mail to be synced to the remote site. If it doesn't finish
# # in 2 seconds, return success anyway.
# replication_sync_timeout = 2
#}
service doveadm {
inet_listener {
port = 37962
}
group = vmail
}
service aggregator {
fifo_listener replication-notify-fifo {
mode = 0666
user = dovecot
}
unix_listener replication-notify {
mode = 0666
user = dovecot
}
}
doveadm_port = 37962
doveadm_password = {{ lookup('passwordstore', 'wolfscloud/dsync_secret create=true length=20') }}
plugin {
{%- for partner in groups['mail'] -%}
{%- if partner != ansible_hostname -%}
mail_replica = tcp:{{hostvars[partner]["tinc_vpnip"]}}:37962
{%- endif -%}
{%- endfor -%}
}
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
passdb { passdb {
driver = passwd-file driver = passwd-file
args = scheme=SHA512-CRYPT username_format=%u /var/vmail/auth.d/%d/passwd args = scheme=SHA512-CRYPT username_format=%u /var/vmail/auth.d/passwd
} }
userdb { userdb {
driver = passwd-file driver = passwd-file
args = username_format=%u /var/vmail/auth.d/%d/passwd args = username_format=%u /var/vmail/auth.d/passwd
# Default fields that can be overridden by passwd-file # Default fields that can be overridden by passwd-file
#default_fields = quota_rule=*:storage=1G #default_fields = quota_rule=*:storage=1G
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment