Changeset - 111e954e826d
[Not reviewed]
0 4 0
Branko Majic (branko) - 7 years ago 2017-02-11 18:46:26
branko@majic.rs
MAR-89: Implemented mail_server role parameter for specifying maximum number of IMAP connections a single user can have from single IP address.
4 files changed with 17 insertions and 2 deletions:
0 comments (0 inline, 0 general)
docs/rolereference.rst
Show inline comments
 
@@ -972,6 +972,11 @@ Parameters
 
**mail_user_gid** (integer, optional, ``whatever OS picks``)
 
  GID of the user that owns all the mail files.
 

	
 
**imap_max_user_connections_per_ip** (integer, optional, ``10``)
 
  Maximum number of IMAP connections from a single IP for a single user. Default
 
  value can be considered rather low, since two devices (computer and phone)
 
  will easily reach it.
 

	
 
**imap_tls_certificate** (string, optional, ``{{ lookup('file', tls_certificate_dir + '/' ansible_fqdn + '_imap.pem') }}``)
 
  X.509 certificate used for TLS for IMAP service. The file will be stored in
 
  directory ``/etc/ssl/certs/`` under name ``{{ ansible_fqdn }}_imap.pem``.
 
@@ -1051,6 +1056,8 @@ Here is an example configuration for setting-up XMPP server using Prosody:
 
    - ldap.example.com
 
    - xmpp.example.com
 

	
 
  imap_max_user_connections_per_ip: 50
 

	
 

	
 
Mail Forwarder
 
--------------
roles/mail_server/defaults/main.yml
Show inline comments
 
@@ -11,4 +11,5 @@ imap_folder_separator: "/"
 
smtp_rbl: []
 
mail_postmaster: "postmaster@{{ ansible_domain }}"
 
smtp_allow_relay_from: []
 
local_mail_aliases: {}
 
\ No newline at end of file
 
local_mail_aliases: {}
 
imap_max_user_connections_per_ip: 10
 
\ No newline at end of file
roles/mail_server/templates/99-local.conf.j2
Show inline comments
 
@@ -40,3 +40,8 @@ protocol lda {
 
  mail_plugins = $mail_plugins sieve
 
  postmaster_address = {{ mail_postmaster }}
 
}
 

	
 
# IMAP configuration.
 
protocol imap {
 
  mail_max_userip_connections = {{ imap_max_user_connections_per_ip }}
 
}
testsite/group_vars/mail.yml
Show inline comments
 
@@ -27,4 +27,6 @@ mail_postmaster: postmaster@{{ testsite_domain }}
 
smtp_allow_relay_from:
 
  - ldap.{{ testsite_domain }}
 
  - xmpp.{{ testsite_domain }}
 
  - web.{{ testsite_domain }}
 
\ No newline at end of file
 
  - web.{{ testsite_domain }}
 

	
 
imap_max_user_connections_per_ip: 50
 
\ No newline at end of file
0 comments (0 inline, 0 general)