2014-08-20 02:32:47 +02:00
|
|
|
include:
|
|
|
|
- postfix
|
|
|
|
|
|
|
|
/etc/postfix:
|
|
|
|
file.directory:
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- dir_mode: 755
|
|
|
|
- file_mode: 644
|
|
|
|
- makedirs: True
|
|
|
|
|
|
|
|
/etc/postfix/main.cf:
|
|
|
|
file.managed:
|
|
|
|
- source: salt://postfix/files/main.cf
|
|
|
|
- user: root
|
|
|
|
- group: root
|
|
|
|
- mode: 644
|
2014-08-20 03:42:08 +02:00
|
|
|
- require:
|
|
|
|
- pkg: postfix
|
2014-08-20 02:32:47 +02:00
|
|
|
- watch_in:
|
2014-08-20 03:46:15 +02:00
|
|
|
- service: postfix
|
2014-08-20 02:32:47 +02:00
|
|
|
- template: jinja
|
|
|
|
- defaults:
|
|
|
|
smtpd_banner: {{ salt['pillar.get']('postfix:smtpd_banner', '$myhostname ESMTP $mail_name (Ubuntu)' )}}
|
|
|
|
biff: {{ salt['pillar.get']('postfix:biff', 'no' )}}
|
|
|
|
|
|
|
|
append_dot_mydomain: {{ salt['pillar.get']('postfix:append_dot_mydomain', 'no' )}}
|
|
|
|
|
|
|
|
readme_directory: {{ salt['pillar.get']('postfix:readme_directory', 'no' )}}
|
|
|
|
|
|
|
|
smtpd_tls_cert_file: {{ salt['pillar.get']('postfix:smtpd_tls_cert_file', '/etc/ssl/certs/ssl-cert-snakeoil.pem' )}}
|
|
|
|
smtpd_tls_key_file: {{ salt['pillar.get']('postfix:smtpd_tls_key_file', '/etc/ssl/private/ssl-cert-snakeoil.key' )}}
|
|
|
|
smtpd_use_tls: {{ salt['pillar.get']('postfix:smtpd_use_tls', 'yes' )}}
|
|
|
|
smtpd_tls_session_cache_database: {{ salt['pillar.get']('postfix:smtpd_tls_session_cache_database', 'btree:${data_directory}/smtpd_scache' )}}
|
|
|
|
smtp_tls_session_cache_database: {{ salt['pillar.get']('postfix:smtp_tls_session_cache_database', 'btree:${data_directory}/smtp_scache' )}}
|
|
|
|
|
2014-08-20 03:42:08 +02:00
|
|
|
myhostname: {{ salt['pillar.get']('postfix:myhostname', grains['fqdn'] )}}
|
2014-08-20 02:32:47 +02:00
|
|
|
alias_maps: {{ salt['pillar.get']('postfix:alias_maps', 'hash:/etc/aliases' )}}
|
|
|
|
alias_database: {{ salt['pillar.get']('postfix:alias_database', 'hash:/etc/aliases' )}}
|
2014-08-20 03:42:08 +02:00
|
|
|
mydestination: {{ salt['pillar.get']('postfix:mydestination', grains['fqdn'] + ', localhost.localdomain, ' + grains['domain'] )}}
|
2014-08-20 02:32:47 +02:00
|
|
|
relayhost: {{ salt['pillar.get']('postfix:relayhost', '' )}}
|
|
|
|
mynetworks: {{ salt['pillar.get']('postfix:mynetworks', '127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128' )}}
|
|
|
|
mailbox_size_limit: {{ salt['pillar.get']('postfix:mailbox_size_limit', '0' )}}
|
|
|
|
recipient_delimiter: {{ salt['pillar.get']('postfix:recipient_delimiter', '+' )}}
|
|
|
|
inet_interfaces: {{ salt['pillar.get']('postfix:inet_interfaces', 'all' )}}
|