Skip to content

Commit 4abd709

Browse files
authored
Merge pull request #80 from ruby/postfix
Added postfix recipe
2 parents 2d4c75d + a326547 commit 4abd709

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed

recipes/default.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
package 'rsync'
1212

1313
include_recipe 'apache2'
14+
include_recipe 'postfix'
1415
include_recipe 'cgit'
1516
include_recipe 'git-user'
1617
include_recipe 'git-sync-check'

recipes/files/etc/postfix/main.cf

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
21+
# fresh installs.
22+
compatibility_level = 2
23+
24+
25+
26+
# TLS parameters
27+
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
28+
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
29+
smtpd_tls_security_level=may
30+
31+
smtp_tls_CApath=/etc/ssl/certs
32+
smtp_tls_security_level=may
33+
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
34+
35+
36+
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
37+
myhostname = git.ruby-lang.org
38+
alias_maps = hash:/etc/aliases
39+
alias_database = hash:/etc/aliases
40+
myorigin = /etc/mailname
41+
mydestination = $myhostname, git.ruby-lang.org, localhost.ruby-lang.org, , localhost
42+
relayhost =
43+
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
44+
mailbox_size_limit = 0
45+
recipient_delimiter = +
46+
inet_interfaces = all
47+
inet_protocols = all
48+
smtp_address_preference = ipv4

recipes/postfix.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
remote_file '/etc/postfix/main.cf' do
2+
mode '644'
3+
owner 'root'
4+
end

0 commit comments

Comments
 (0)