Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F27207323
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
3 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/roles/mailserver/dovecot/files/conf.d/10-metrics.conf b/roles/mailserver/dovecot/files/conf.d/10-metrics.conf
index d3ef261..31e25b2 100644
--- a/roles/mailserver/dovecot/files/conf.d/10-metrics.conf
+++ b/roles/mailserver/dovecot/files/conf.d/10-metrics.conf
@@ -1,51 +1,52 @@
# -------------------------------------------------------------
# Dovecot configuration
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# Source file: roles/mailserver/dovecot/files/conf.d/10-metrics.conf
# -------------------------------------------------------------
#
# <auto-generated>
# This file is managed by our rOPS SaltStack repository.
#
# Changes to this file may cause incorrect behavior
# and will be lost if the state is redeployed.
# </auto-generated>
# -------------------------------------------------------------
# Statistics and metrics
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
metric auth_success {
filter = event=auth_request_finished AND success=yes
}
metric auth_failures {
filter = event=auth_request_finished AND NOT success=yes
}
metric imap_command {
filter = event=imap_command_finished
group_by = cmd_name tagged_reply_state
}
metric smtp_command {
filter = event=smtp_server_command_finished
group_by = cmd_name status_code duration:exponential:1:5:10
}
metric mail_delivery {
filter = event=mail_delivery_finished
group_by = duration:exponential:1:5:10
}
# -------------------------------------------------------------
# Publish to HTTP using OpenMetrics format
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
service stats {
inet_listener http {
+ address = {{ ip_internal }}
port = 9900
}
}
diff --git a/roles/mailserver/dovecot/init.sls b/roles/mailserver/dovecot/init.sls
index 003e24f..5f9e7fa 100644
--- a/roles/mailserver/dovecot/init.sls
+++ b/roles/mailserver/dovecot/init.sls
@@ -1,52 +1,55 @@
# -------------------------------------------------------------
# Salt — Provision dovecot Config
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
{% from "map.jinja" import dirs with context %}
{% set db = pillar["dovecot_config"]["db"] %}
+{% set network = salt['node.resolve_network']() %}
+
dovecot:
pkg.installed
{{ dirs.etc }}/dovecot/conf.d:
file.directory:
- mode: 755
- user: root
- group: wheel
- makedirs: True
{{ dirs.etc }}/dovecot/dovecot.conf:
file.managed:
- source: salt://roles/mailserver/dovecot/files/dovecot.conf
- template: jinja
{{ dirs.etc }}/dovecot/dovecot-sql.conf.ext:
file.managed:
- source: salt://roles/mailserver/dovecot/files/dovecot-sql.conf.ext
- template: jinja
- mode: 400
- context:
db:
hostname: {{ pillar["nasqueron_services"][db["service"]] }}
name: {{ db["database"] }}
password: {{ salt["credentials.get_password"](db["credential"]) }}
user: {{ salt["credentials.get_username"](db["credential"]) }}
dovecot_file_config_conf_d:
file.recurse:
- source: salt://roles/mailserver/dovecot/files/conf.d
- name: {{ dirs.etc }}/dovecot/conf.d
- file_mode: 755
- dir_mode: 755
- template: jinja
- context:
+ ip_internal: {{ network["private_ipv4_address"] }}
mailbox:
dir: /var/mail/_virtual
dovecot_running:
service.running:
- name: dovecot
- enable: True
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, May 3, 05:38 (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3677682
Default Alt Text
(3 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment