Merge branch 'master' of ssh://pwan.org/var/www/git/projects/hgr
[hgr.git] / templates / postfix / main.cf.erb
1 # See /usr/share/postfix/main.cf.dist for a commented, more complete version
2
3
4 # Debian specific: Specifying a file name will cause the first
5 # line of that file to be used as the name. The Debian default
6 # is /etc/mailname.
7 #myorigin = /etc/mailname
8
9 smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
10 biff = no
11
12 # appending .domain is the MUA's job.
13 append_dot_mydomain = no
14
15 # Uncomment the next line to generate "delayed mail" warnings
16 #delay_warning_time = 4h
17
18 readme_directory = no
19
20 # TLS parameters
21 #smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
22 smtpd_tls_cert_file=/etc/ssl/certs/<%= scope.lookupvar('::fqdn') %>.pem
23 #smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
24 smtpd_tls_key_file=/etc/ssl/private/<%= scope.lookupvar('::fqdn') %>.key
25 smtpd_tls_CAfile=/etc/ssl/certs/<%= scope.lookupvar('::fqdn') %>-CA.pem
26 smtpd_use_tls=yes
27 smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
28 smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
29
30 # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
31 # information on enabling SSL in the smtp client.
32
33 #myhostname = localhost
34 myhostname = <%= scope.lookupvar('::fqdn') %>
35 alias_maps = hash:/etc/aliases,regexp:/etc/postfix/regexp_aliases
36 alias_database = hash:/etc/aliases
37 myorigin = <%= scope.lookupvar('::fqdn') %>
38 mydestination = <%= scope.lookupvar('::fqdn') %>, localhost, localhost.localdomain, localhost
39 relayhost =
40 mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
41 mailbox_size_limit = 0
42 recipient_delimiter = +
43 inet_interfaces = all
44
45 mailbox_command = procmail -a "$EXTENSION"
46 home_mailbox = Maildir/
47
48 smtpd_sasl_type = dovecot
49 smtpd_sasl_path = private/auth
50 smtpd_sasl_auth_enable = yes
51 smtpd_sasl_security_options = noanonymous
52 smtpd_sasl_local_domain = $myhostname
53 broken_sasl_auth_clients = yes
54
55 smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks,
56 #smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination,
57 # reject_unknown_sender_domain,reject
58
59 smtpd_recipient_restrictions = reject_unauth_pipelining,
60 permit_sasl_authenticated,
61 permit_mynetworks,
62 reject_non_fqdn_recipient,
63 reject_unknown_recipient_domain,
64 reject_unauth_destination,
65 reject_rbl_client sbl-xbl.spamhaus.org,
66 check_sender_access hash:/etc/postfix/sender_access
67 relay_domains = <%= scope.lookupvar('::fqdn') %>