Initial Chef repository
This commit is contained in:
10
cookbooks/postfix/templates/default/access.erb
Normal file
10
cookbooks/postfix/templates/default/access.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# This file is generated by Chef for <%= node['fqdn'] %>
|
||||
#
|
||||
# Local changes will be overwritten
|
||||
#
|
||||
# See man 5 access for format
|
||||
|
||||
<% node['postfix']['access'].each do |name, value| %>
|
||||
<%= name %> <%= value %>
|
||||
<% end unless node['postfix']['access'].nil? %>
|
||||
11
cookbooks/postfix/templates/default/aliases.erb
Normal file
11
cookbooks/postfix/templates/default/aliases.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
#
|
||||
# This file is generated by Chef for <%= node['fqdn'] %>
|
||||
#
|
||||
# Local changes will be overwritten
|
||||
#
|
||||
# See man 5 aliases for format
|
||||
postmaster: root
|
||||
|
||||
<% node['postfix']['aliases'].each do |name, value| %>
|
||||
<%= name %>: <%= [value].flatten.map{|x| %Q("#{x}")}.join(', ') %>
|
||||
<% end unless node['postfix']['aliases'].nil? %>
|
||||
13
cookbooks/postfix/templates/default/main.cf.erb
Normal file
13
cookbooks/postfix/templates/default/main.cf.erb
Normal file
@@ -0,0 +1,13 @@
|
||||
###
|
||||
# Generated by Chef for <%= node['fqdn'] %>
|
||||
# Configured as <%= node['postfix']['mail_type'] %>
|
||||
###
|
||||
|
||||
<% @settings.sort.map do |key, value| -%>
|
||||
<% next if value.nil? -%>
|
||||
<% if value.kind_of? Array -%>
|
||||
<%= "#{key} = #{value.join(', ')}"%>
|
||||
<% else -%>
|
||||
<%= "#{key} = #{value}"%>
|
||||
<% end -%>
|
||||
<% end -%>
|
||||
84
cookbooks/postfix/templates/default/manifest-postfix.xml.erb
Normal file
84
cookbooks/postfix/templates/default/manifest-postfix.xml.erb
Normal file
@@ -0,0 +1,84 @@
|
||||
<?xml version="1.0"?>
|
||||
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
|
||||
<!--
|
||||
#
|
||||
# CDDL HEADER START
|
||||
#
|
||||
# The contents of this file are subject to the terms of the
|
||||
# Common Development and Distribution License (the "License").
|
||||
# You may not use this file except in compliance with the License.
|
||||
#
|
||||
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
|
||||
# or http://www.opensolaris.org/os/licensing.
|
||||
# See the License for the specific language governing permissions
|
||||
# and limitations under the License.
|
||||
#
|
||||
# When distributing Covered Code, include this CDDL HEADER in each
|
||||
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
||||
# If applicable, add the following below this CDDL HEADER, with the
|
||||
# fields enclosed by brackets "[]" replaced with your own identifying
|
||||
# information: Portions Copyright [yyyy] [name of copyright owner]
|
||||
#
|
||||
# CDDL HEADER END
|
||||
#
|
||||
-->
|
||||
|
||||
<service_bundle type="manifest" name="SFEpostfix:postfix">
|
||||
<service name="network/smtp/postfix" type="service" version="1">
|
||||
<create_default_instance enabled="false" />
|
||||
<single_instance />
|
||||
<dependency name="network" grouping="require_all" restart_on="error" type="service">
|
||||
<service_fmri value="svc:/milestone/network:default" />
|
||||
</dependency>
|
||||
|
||||
<dependency name="filesystem-local" grouping="require_all" restart_on="error" type="service">
|
||||
<service_fmri value="svc:/system/filesystem/local" />
|
||||
</dependency>
|
||||
|
||||
<dependency name="name-services" grouping="require_all" restart_on="refresh" type="service">
|
||||
<service_fmri value="svc:/milestone/name-services" />
|
||||
</dependency>
|
||||
|
||||
<dependency name="system-log" grouping="optional_all" restart_on="error" type="service">
|
||||
<service_fmri value="svc:/system/system-log" />
|
||||
</dependency>
|
||||
|
||||
<!--
|
||||
If autofs is enabled, wait for it to get users" home
|
||||
directories.
|
||||
-->
|
||||
<dependency name="autofs" grouping="optional_all" restart_on="error" type="service">
|
||||
<service_fmri value="svc:/system/filesystem/autofs" />
|
||||
</dependency>
|
||||
|
||||
<dependent name="postfix_multi-user" grouping="optional_all" restart_on="none">
|
||||
<service_fmri value="svc:/milestone/multi-user" />
|
||||
</dependent>
|
||||
|
||||
<exec_method type="method" name="start"
|
||||
exec="/opt/omni/sbin/postfix start"
|
||||
timeout_seconds="180" />
|
||||
|
||||
<exec_method type="method" name="stop"
|
||||
exec="/opt/omni/sbin/postfix stop"
|
||||
timeout_seconds="60" />
|
||||
|
||||
<exec_method type="method" name="restart"
|
||||
exec="/opt/omni/sbin/postfix reload"
|
||||
timeout_seconds="60" />
|
||||
|
||||
<stability value="Unstable" />
|
||||
|
||||
<template>
|
||||
<common_name>
|
||||
<loctext xml:lang="C">
|
||||
Postfix Mailserver
|
||||
</loctext>
|
||||
</common_name>
|
||||
|
||||
<documentation>
|
||||
<manpage title="postfix" section="1" manpath="/usr/local/man" />
|
||||
</documentation>
|
||||
</template>
|
||||
</service>
|
||||
</service_bundle>
|
||||
81
cookbooks/postfix/templates/default/master.cf.erb
Normal file
81
cookbooks/postfix/templates/default/master.cf.erb
Normal file
@@ -0,0 +1,81 @@
|
||||
#
|
||||
# Postfix master process configuration file. For details on the format
|
||||
# of the file, see the master(5) manual page (command: "man 5 master").
|
||||
#
|
||||
# ==========================================================================
|
||||
# service type private unpriv chroot wakeup maxproc command + args
|
||||
# (yes) (yes) (yes) (never) (100)
|
||||
# ==========================================================================
|
||||
smtp inet n - n - - smtpd
|
||||
<% if @settings['submission'] -%>
|
||||
submission inet n - n - - smtpd
|
||||
-o smtpd_enforce_tls=yes
|
||||
-o smtpd_sasl_auth_enable=yes
|
||||
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
|
||||
<% end -%>
|
||||
#smtps inet n - n - - smtpd
|
||||
# -o smtpd_tls_wrappermode=yes
|
||||
# -o smtpd_sasl_auth_enable=yes
|
||||
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
|
||||
#628 inet n - n - - qmqpd
|
||||
pickup fifo n - n 60 1 pickup
|
||||
cleanup unix n - n - 0 cleanup
|
||||
qmgr fifo n - n 300 1 qmgr
|
||||
#qmgr fifo n - n 300 1 oqmgr
|
||||
tlsmgr unix - - n 1000? 1 tlsmgr
|
||||
rewrite unix - - n - - trivial-rewrite
|
||||
bounce unix - - n - 0 bounce
|
||||
defer unix - - n - 0 bounce
|
||||
trace unix - - n - 0 bounce
|
||||
verify unix - - n - 1 verify
|
||||
flush unix n - n 1000? 0 flush
|
||||
proxymap unix - - n - - proxymap
|
||||
smtp unix - - n - 500 smtp
|
||||
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
|
||||
relay unix - - n - - smtp
|
||||
-o smtp_fallback_relay=
|
||||
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
|
||||
showq unix n - n - - showq
|
||||
error unix - - n - - error
|
||||
discard unix - - n - - discard
|
||||
local unix - n n - - local
|
||||
virtual unix - n n - - virtual
|
||||
lmtp unix - - n - - lmtp
|
||||
anvil unix - - n - 1 anvil
|
||||
scache unix - - n - 1 scache
|
||||
#
|
||||
# ====================================================================
|
||||
# Interfaces to non-Postfix software. Be sure to examine the manual
|
||||
# pages of the non-Postfix software to find out what options it wants.
|
||||
#
|
||||
# Many of the following services use the Postfix pipe(8) delivery
|
||||
# agent. See the pipe(8) man page for information about ${recipient}
|
||||
# and other message envelope options.
|
||||
# ====================================================================
|
||||
#
|
||||
# maildrop. See the Postfix MAILDROP_README file for details.
|
||||
# Also specify in main.cf: maildrop_destination_recipient_limit=1
|
||||
#
|
||||
maildrop unix - n n - - pipe
|
||||
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
|
||||
#
|
||||
# The Cyrus deliver program has changed incompatibly, multiple times.
|
||||
#
|
||||
old-cyrus unix - n n - - pipe
|
||||
flags=R user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -m ${extension} ${user}
|
||||
# Cyrus 2.1.5 (Amos Gouaux)
|
||||
# Also specify in main.cf: cyrus_destination_recipient_limit=1
|
||||
cyrus unix - n n - - pipe
|
||||
user=cyrus argv=/usr/lib/cyrus-imapd/deliver -e -r ${sender} -m ${extension} ${user}
|
||||
#
|
||||
# See the Postfix UUCP_README file for configuration details.
|
||||
#
|
||||
uucp unix - n n - - pipe
|
||||
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
|
||||
#
|
||||
# Other external delivery methods.
|
||||
#
|
||||
ifmail unix - n n - - pipe
|
||||
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
|
||||
bsmtp unix - n n - - pipe
|
||||
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
|
||||
2
cookbooks/postfix/templates/default/port_smtp.erb
Normal file
2
cookbooks/postfix/templates/default/port_smtp.erb
Normal file
@@ -0,0 +1,2 @@
|
||||
# SMTP
|
||||
-A FWR -p tcp -m tcp --dport 25 -j ACCEPT
|
||||
2
cookbooks/postfix/templates/default/sasl_passwd.erb
Normal file
2
cookbooks/postfix/templates/default/sasl_passwd.erb
Normal file
@@ -0,0 +1,2 @@
|
||||
# This file is generated by Chef for <%= node['fqdn'] %>
|
||||
<%= node['postfix']['main']['relayhost'] %> <%= @settings['smtp_sasl_user_name'] %>:<%= @settings['smtp_sasl_passwd'] %>
|
||||
10
cookbooks/postfix/templates/default/sender_canonical.erb
Normal file
10
cookbooks/postfix/templates/default/sender_canonical.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# This file is generated by Chef for <%= node['fqdn'] %>
|
||||
#
|
||||
# Local changes will be overwritten
|
||||
#
|
||||
# See man 5 canonical for format
|
||||
|
||||
<% node['postfix']['sender_canonical_map_entries'].each do |name, value| %>
|
||||
<%= name %> <%= value %>
|
||||
<% end unless node['postfix']['sender_canonical_map_entries'].nil? %>
|
||||
10
cookbooks/postfix/templates/default/smtp_generic.erb
Normal file
10
cookbooks/postfix/templates/default/smtp_generic.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# This file is generated by Chef for <%= node['fqdn'] %>
|
||||
#
|
||||
# Local changes will be overwritten
|
||||
#
|
||||
# See man 5 generic for format
|
||||
|
||||
<% node['postfix']['smtp_generic_map_entries'].each do |name, value| %>
|
||||
<%= name %> <%= value %>
|
||||
<% end unless node['postfix']['smtp_generic_map_entries'].nil? %>
|
||||
10
cookbooks/postfix/templates/default/transport.erb
Normal file
10
cookbooks/postfix/templates/default/transport.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# This file is generated by Chef for <%= node['fqdn'] %>
|
||||
#
|
||||
# Local changes will be overwritten
|
||||
#
|
||||
# See man 5 transport for format
|
||||
|
||||
<% node['postfix']['transports'].each do |name, value| %>
|
||||
<%= name %> <%= value %>
|
||||
<% end unless node['postfix']['transports'].nil? %>
|
||||
10
cookbooks/postfix/templates/default/virtual_aliases.erb
Normal file
10
cookbooks/postfix/templates/default/virtual_aliases.erb
Normal file
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# This file is generated by Chef for <%= node['fqdn'] %>
|
||||
#
|
||||
# Local changes will be overwritten
|
||||
#
|
||||
# See man 5 virtual for format
|
||||
|
||||
<% node['postfix']['virtual_aliases'].each do |key, value| %>
|
||||
<%= key %> <%= value %>
|
||||
<% end unless node['postfix']['virtual_aliases'].nil? %>
|
||||
@@ -0,0 +1,10 @@
|
||||
#
|
||||
# This file is generated by Chef for <%= node['fqdn'] %>
|
||||
#
|
||||
# Local changes will be overwritten
|
||||
#
|
||||
# See man 5 virtual for format
|
||||
|
||||
<% node['postfix']['virtual_aliases_domains'].each do |key, value| %>
|
||||
<%= key %> <%= value %>
|
||||
<% end unless node['postfix']['virtual_aliases_domains'].nil? %>
|
||||
Reference in New Issue
Block a user