Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
communication
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
infra
ansible-shared
communication
Commits
594e66d0
Commit
594e66d0
authored
4 years ago
by
Lars Beckers
Browse files
Options
Downloads
Patches
Plain Diff
postfix: allow to selectively enable user facing daemons
parent
d7036efd
Branches
Branches containing commit
No related tags found
1 merge request
!13
Additional Services and Configurablity for Postfix
Pipeline
#2710
passed
4 years ago
Stage: test
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
postfix/defaults/main.yml
+4
-0
4 additions, 0 deletions
postfix/defaults/main.yml
postfix/templates/main.cf.j2
+6
-4
6 additions, 4 deletions
postfix/templates/main.cf.j2
postfix/templates/master.cf.j2
+13
-12
13 additions, 12 deletions
postfix/templates/master.cf.j2
with
23 additions
and
16 deletions
postfix/defaults/main.yml
+
4
−
0
View file @
594e66d0
...
...
@@ -12,10 +12,14 @@ postfix_tls_key: /etc/ssl/private/privkey.pem
postfix_tls_configuration
:
'
previous'
postfix_prefer_lmtp
:
false
postfix_enable_dovecot
:
true
postfix_enable_submission
:
true
postfix_enable_smtps
:
false
postfix_enable_postscreen
:
true
postfix_enable_memcached
:
false
postfix_login_suffix
:
'
'
postfix_luser_relay
:
'
'
postfix_dnsbl_sites
:
-
name
:
zen.spamhaus.org
-
name
:
bl.spamcop.net
...
...
This diff is collapsed.
Click to expand it.
postfix/templates/main.cf.j2
+
6
−
4
View file @
594e66d0
...
...
@@ -10,9 +10,12 @@ relayhost = {{ postfix_relay_host }}
{% if postfix_transport_maps|count > 0 %}
transport_maps = cdb:/etc/postfix/transport
{% endif %}
{% if postfix_luser_relay != "" %}
luser_relay = {{ postfix_luser_relay }}
local_recipient_maps =
{% endif %}
{% if not postfix_satellite_only %}
{% if not postfix_satellite_only and postfix_enable_dovecot %}
{% if postfix_domains|count > 0 %}
{% if postfix_prefer_lmtp %}
mailbox_transport = lmtp:unix:private/dovecot-lmtp
...
...
@@ -25,7 +28,6 @@ smtpd_sender_login_maps = proxy:pcre:/etc/postfix/login_maps.pcre
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
{% endif %}
append_dot_mydomain = no
...
...
@@ -98,7 +100,7 @@ alias_maps = cdb:/etc/aliases
alias_database = cdb:/etc/aliases
virtual_alias_maps = cdb:/etc/postfix/virtual
{% if postfix_virtual_domains|count > 0 %}
{% if postfix_virtual_domains|count > 0
and postfix_enable_dovecot
%}
virtual_mailbox_domains = {{ postfix_virtual_domains | join(", ") }}
virtual_mailbox_base = /var/vmail/
virtual_mailbox_limit = 512000000
...
...
This diff is collapsed.
Click to expand it.
postfix/templates/master.cf.j2
+
13
−
12
View file @
594e66d0
...
...
@@ -21,6 +21,7 @@ smtpd pass - - y - - smtpd
{% endif %}
dnsblog unix - - y - 0 dnsblog
tlsproxy unix - - y - 0 tlsproxy
{% if postfix_enable_submission %}
submission inet n - y - - smtpd
-o smtpd_sasl_security_options=noanonymous
-o smtpd_sasl_local_domain=$myhostname
...
...
@@ -40,17 +41,17 @@ submission inet n - y - - smtpd
# -o smtpd_recipient_restrictions=
# -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
#smtps inet n - y - - smtpd
# -o syslog_name=postfix/
smtps
# -o smtpd_tls_wrappermode=yes
#
-o s
mtpd_sasl_auth_enable=ye
s
#
-o smtpd_
reject_unlisted_recipient=no
#
-o smtpd_
client_restrictions=$mua_client_restriction
s
#
-o smtpd_
helo_restrictions=$mua_helo_restrictions
#
-o smtpd_
sender_restrictions=$mua_sender
_restrictions
#
-o smtpd_re
cipient
_restrictions=
#
-o
smtpd_relay_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
{% endif %}
{% if postfix_enable_
smtps
%}
smtps inet n - y - - smtpd
-o s
yslog_name=postfix/smtp
s
-o smtpd_
tls_wrappermode=yes
-o smtpd_
sasl_auth_enable=ye
s
-o smtpd_
reject_unlisted_recipient=no
-o smtpd_
recipient
_restrictions
=
-o smtpd_re
lay
_restrictions=
permit_mynetworks,permit_sasl_authenticated,reject
-o
milter_macro_daemon_name=ORIGINATING
{% endif %}
#628 inet n - y - - qmqpd
{% endif %}
pickup unix n - y 60 1 pickup
...
...
@@ -99,7 +100,7 @@ policy-spf unix - n n - 0 spawn
user=nobody argv=/usr/bin/policyd-spf
{% endif %}
{% if not postfix_satellite_only %}
{% if not postfix_satellite_only
and postfix_enable_dovecot
%}
dovecot unix - n n - - pipe
flags=DRhu user=5001:5000 argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -a ${original_recipient} -d ${user}@${nexthop}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment