Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F7335719
D3630.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D3630.diff
View Options
diff --git a/roles/mailserver/postfix/init.sls b/roles/mailserver/postfix/config.sls
copy from roles/mailserver/postfix/init.sls
copy to roles/mailserver/postfix/config.sls
--- a/roles/mailserver/postfix/init.sls
+++ b/roles/mailserver/postfix/config.sls
@@ -3,25 +3,12 @@
# -------------------------------------------------------------
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
-# Source file: roles/mailserver/postfix.sls
# -------------------------------------------------------------
{% from "map.jinja" import dirs with context %}
{% from "roles/mailserver/map.jinja" import postfix_dirs with context %}
{% set db = pillar["postfix_config"]["db"] %}
-# -------------------------------------------------------------
-# Software
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-postfix_install:
- pkg.installed:
- - pkgs:
- - maildrop
- - mailman
- - postfix-pgsql
- - postfix-policyd-spf-perl
-
# -------------------------------------------------------------
# Configuration
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -83,7 +70,3 @@
- context:
dirs: {{ dirs }}
-postfix_running:
- service.running:
- - name: postfix
- - enable: True
diff --git a/roles/mailserver/postfix/init.sls b/roles/mailserver/postfix/init.sls
--- a/roles/mailserver/postfix/init.sls
+++ b/roles/mailserver/postfix/init.sls
@@ -3,87 +3,9 @@
# -------------------------------------------------------------
# Project: Nasqueron
# License: Trivial work, not eligible to copyright
-# Source file: roles/mailserver/postfix.sls
# -------------------------------------------------------------
-{% from "map.jinja" import dirs with context %}
-{% from "roles/mailserver/map.jinja" import postfix_dirs with context %}
-{% set db = pillar["postfix_config"]["db"] %}
-
-# -------------------------------------------------------------
-# Software
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-postfix_install:
- pkg.installed:
- - pkgs:
- - maildrop
- - mailman
- - postfix-pgsql
- - postfix-policyd-spf-perl
-
-# -------------------------------------------------------------
-# Configuration
-# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-
-{{ dirs.etc }}/postfix/main.cf:
- file.managed:
- - source: salt://roles/mailserver/postfix/files/main.cf
- - template: jinja
- - context:
- dirs: {{ dirs }}
- postfix_dirs: {{ postfix_dirs }}
-
-{{ dirs.etc }}/postfix/postfix-to-mailman.py:
- file.managed:
- - source: salt://roles/mailserver/postfix/files/postfix-to-mailman.py
- - template: jinja
- - context:
- dirs: {{ dirs }}
- mailmanAbuse: postmaster@nasqueron.org
-
-/usr/local/etc/postfix/postfix-files:
- file.symlink:
- - target: /usr/local/libexec/postfix/postfix-files
-
-{{ dirs.etc }}/postfix/pgsql-virtual-mailbox-domains.cf:
- file.managed:
- - source: salt://roles/mailserver/postfix/files/pgsql-virtual-mailbox-domains.cf
- - template: jinja
- - context:
- db: &dbcontext
- database: {{ db["database"] }}
- username: {{ salt["credentials.get_username"](db["credential"]) }}
- password: {{ salt["credentials.get_password"](db["credential"]) }}
- host: {{ pillar["nasqueron_services"][db["service"]] }}
-
-{{ dirs.etc }}/postfix/pgsql-virtual-mailbox-maps.cf:
- file.managed:
- - source: salt://roles/mailserver/postfix/files/pgsql-virtual-mailbox-maps.cf
- - template: jinja
- - context:
- db: *dbcontext
-
-{{ dirs.etc }}/postfix/pgsql-virtual-alias-maps.cf:
- file.managed:
- - source: salt://roles/mailserver/postfix/files/pgsql-virtual-alias-maps.cf
- - template: jinja
- - context:
- db: *dbcontext
-
-{{ dirs.etc }}/postfix/master.cf:
- file.managed:
- - source: salt://roles/mailserver/postfix/files/master.cf
- - template: jinja
-
-{{ dirs.etc }}/postfix/dynamicmaps.cf:
- file.managed:
- - source: salt://roles/mailserver/postfix/files/dynamicmaps.cf
- - template: jinja
- - context:
- dirs: {{ dirs }}
-
-postfix_running:
- service.running:
- - name: postfix
- - enable: True
+include:
+ - .software
+ - .config
+ - .service
diff --git a/roles/mailserver/postfix/service.sls b/roles/mailserver/postfix/service.sls
new file mode 100644
--- /dev/null
+++ b/roles/mailserver/postfix/service.sls
@@ -0,0 +1,11 @@
+# -------------------------------------------------------------
+# Mail - Postfix
+# -------------------------------------------------------------
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+postfix_running:
+ service.running:
+ - name: postfix
+ - enable: True
diff --git a/roles/mailserver/postfix/software.sls b/roles/mailserver/postfix/software.sls
new file mode 100644
--- /dev/null
+++ b/roles/mailserver/postfix/software.sls
@@ -0,0 +1,15 @@
+# -------------------------------------------------------------
+# Mail - Postfix
+# -------------------------------------------------------------
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+postfix_install:
+ pkg.installed:
+ - pkgs:
+ - maildrop
+ - mailman
+ - postfix-pgsql
+ - postfix-policyd-spf-perl
+
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 25, 21:48 (14 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2601723
Default Alt Text
D3630.diff (5 KB)
Attached To
Mode
D3630: Split Postfix configuration
Attached
Detach File
Event Timeline
Log In to Comment