diff options
Diffstat (limited to 'roles/postfix/templates/main.cf')
-rw-r--r-- | roles/postfix/templates/main.cf | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/roles/postfix/templates/main.cf b/roles/postfix/templates/main.cf new file mode 100644 index 0000000..22546d1 --- /dev/null +++ b/roles/postfix/templates/main.cf @@ -0,0 +1,76 @@ +queue_directory = /var/spool/postfix +command_directory = /usr/sbin +daemon_directory = /usr/libexec/postfix +data_directory = /var/lib/postfix +mail_owner = postfix + +inet_interfaces = all +inet_protocols = all + + +mydestination = $myhostname, + localhost.$mydomain, + localhost, + {{ ansible_domain }}, + {{ mailman_prefix | default('') }} + +unknown_local_recipient_reject_code = 550 + +# ALIAS DATABASE +# +# The alias_maps parameter specifies the list of alias databases used +# by the local delivery agent. The default list is system dependent. +# +# On systems with NIS, the default is to search the local alias +# database, then the NIS alias database. See aliases(5) for syntax +# details. +# +# If you change the alias database, run "postalias /etc/aliases" (or +# wherever your system stores the mail alias file), or simply run +# "newaliases" to build the necessary DBM or DB file. +# +# It will take a minute or so before changes become visible. Use +# "postfix reload" to eliminate the delay. +# +#alias_maps = dbm:/etc/aliases +alias_maps = hash:/etc/aliases, +{% if use_local == True %} + hash:/etc/postfix/aliases.local, +{% endif %} + hash:/etc/postfix/aliases.mailman_default, + hash:/etc/postfix/aliases.mailman, + hash:/etc/postfix/aliases.users + + +{% if use_local == True %} +local_recipient_maps = hash:/etc/postfix/local_recipient, $alias_maps +{% endif %} + +recipient_delimiter = + + + +debug_peer_level = 2 +debugger_command = + PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin + ddd $daemon_directory/$process_name $process_id & sleep 5 + +{% if use_tls == True %} +smtpd_tls_cert_file={{ postfix_cert }} +smtpd_tls_key_file={{ postfix_key }} +smtpd_use_tls=yes +{% endif %} + +{% if use_sasl == True %} +smtpd_tls_auth_only = yes +smtpd_sasl_auth_enable = yes +smtpd_sasl_application_name = smtpd +smtpd_sasl_local_domain = {{ ansible_domain }} +{% endif %} + +smtp_use_tls = yes + +sendmail_path = /usr/sbin/sendmail.postfix +newaliases_path = /usr/bin/newaliases.postfix +mailq_path = /usr/bin/mailq.postfix +setgid_group = postdrop + |