Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3743889
D2857.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D2857.diff
View Options
diff --git a/roles/paas-docker/containers/exim.sls b/roles/paas-docker/containers/exim.sls
--- a/roles/paas-docker/containers/exim.sls
+++ b/roles/paas-docker/containers/exim.sls
@@ -10,25 +10,29 @@
{% set containers = pillar['docker_containers'][grains['id']] %}
{% for instance, container in containers['exim'].items() %}
-{% set image = salt['paas_docker.get_image']("tianon/exim4", container) %}
# -------------------------------------------------------------
# Data directory
-#
-# Only required if you provide some hostname to the SMTP server
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-{% if 'mailname' in container %}
-
/srv/exim/{{ instance }}:
file.directory:
- user: 999
- group: 999
- makedirs: True
+{% for subdir in ['spool', 'log'] %}
+/srv/exim/{{ instance }}/{{ subdir }}:
+ file.directory:
+ - user: 999
+ - group: 999
+{% endfor %}
+
+{% if 'mailname' in container %}
/srv/exim/{{ instance }}/mailname:
file.managed:
- contents: {{ container['mailname'] }}
+{% endif %}
{% if has_selinux %}
@@ -43,8 +47,6 @@
{% endif %}
-{% endif %}
-
# -------------------------------------------------------------
# Container
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -53,13 +55,16 @@
docker_container.running:
- detach: True
- interactive: True
- - image: {{ image }}
-
+ - image: tianon/exim4
+ - binds:
+{% if 'mailname' in container %}
+ - /srv/exim/{{ instance }}/mailname:/etc/mailname:ro
+{% endif %}
+ - /srv/exim/{{ instance }}/spool:/var/spool/exim4
+ - /srv/exim/{{ instance }}/log:/var/log/exim4
{% if 'host' in container %}
- - binds: /srv/exim/{{ instance }}/mailname:/etc/mailname:ro
- hostname: {{ container['mailname'] }}
{% endif %}
-
{% if 'network' in container %}
- networks:
- {{ container['network'] }}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 16, 01:19 (21 h, 50 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2246951
Default Alt Text
D2857.diff (1 KB)
Attached To
Mode
D2857: Update Exim MTA container configuration
Attached
Detach File
Event Timeline
Log In to Comment