Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos-caddy
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Guillaume Hervier
slapos-caddy
Commits
48672684
Commit
48672684
authored
Sep 02, 2014
by
Marco Mariani
Committed by
Vincent Pelletier
Aug 24, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
postfix: added postfix instance to erp5 stack
parent
7d534478
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
260 additions
and
2 deletions
+260
-2
stack/erp5/buildout.cfg
stack/erp5/buildout.cfg
+23
-2
stack/erp5/instance-erp5.cfg.in
stack/erp5/instance-erp5.cfg.in
+1
-0
stack/erp5/instance-postfix.cfg.in
stack/erp5/instance-postfix.cfg.in
+168
-0
stack/erp5/instance.cfg.in
stack/erp5/instance.cfg.in
+14
-0
stack/erp5/postfix_main.cf.in
stack/erp5/postfix_main.cf.in
+24
-0
stack/erp5/postfix_master.cf.in
stack/erp5/postfix_master.cf.in
+30
-0
No files found.
stack/erp5/buildout.cfg
View file @
48672684
...
...
@@ -53,6 +53,7 @@ extends =
../../component/findutils/buildout.cfg
../../component/userhosts/buildout.cfg
../../software/neoppod/software-common.cfg
../../component/postfix/buildout.cfg
parts +=
erp5-util-develop
...
...
@@ -90,6 +91,7 @@ parts +=
dash
wget
userhosts
postfix
# Buildoutish
eggs
...
...
@@ -197,12 +199,27 @@ md5sum = 71cef1d06065951ab4cf43eb13f311a3
filename = instance-create-erp5-site-real.cfg.in
md5sum = 79f789360e71146486c82a7a10834bae
[template-postfix]
< = download-base
filename = instance-postfix.cfg.in
md5sum = a1b131b5bf6a749b0c853e9577f43cca
[template-postfix-master-cf]
< = download-base
filename = postfix_master.cf.in
md5sum = 67f06ed63c5d3fa47908a83071b76bd3
[template-postfix-main-cf]
< = download-base
filename = postfix_main.cf.in
md5sum = b6f44d8507aa15d71fdff75bf3eeddb9
[template]
recipe = slapos.recipe.template:jinja2
# XXX: "template.cfg" is hardcoded in instanciation recipe
rendered = ${buildout:directory}/template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum =
f0c8b6491f97fdb0568b0db883dcda0b
md5sum =
4b7ef360e34de488daab0d44973fd598
mode = 640
context =
key mariadb_link_binary template-mariadb:link-binary
...
...
@@ -252,6 +269,7 @@ context =
key mesa_location mesa:location
key openssl_location openssl:location
key pixman_location pixman:location
key postfix_location postfix:location
key root_common root-common:target
key sixtunnel_location 6tunnel:location
key slapos_core_version versions:slapos.core
...
...
@@ -267,6 +285,9 @@ context =
key template_mariadb template-mariadb:target
key template_mariadb_initial_setup template-mariadb-initial-setup:target
key template_my_cnf template-my-cnf:target
key template_postfix template-postfix:target
key template_postfix_main_cf template-postfix-main-cf:target
key template_postfix_master_cf template-postfix-master-cf:target
key template_runzope_userhosts_preloaded template-runzope-userhosts-preloaded:target
key template_zeo template-zeo:target
key template_zope template-zope:target
...
...
@@ -280,7 +301,7 @@ context =
[template-erp5]
<= download-base
filename = instance-erp5.cfg.in
md5sum =
70820c1608edfc923d57ec2d92aed012
md5sum =
bb951a205def0235f3c041045abd7801
[template-zeo]
<= download-base
...
...
stack/erp5/instance-erp5.cfg.in
View file @
48672684
...
...
@@ -31,6 +31,7 @@ config-{{ k }} = {{ dumps(v) }}
{{ request('memcached-volatile', 'kumofs', 'memcached', {'tcpv4-port': 2010, 'ram-storage-size': 64}) }}
{{ request('cloudooo', 'cloudooo', 'cloudooo', {'tcpv4-port': 2020}) }}
{{ request('mariadb', 'mariadb', 'mariadb', {'tcpv4-port': 2099}, {'database-list': True, 'test-database-list': True}) }}
{{ request('postfix', 'postfix', 'postfix', {'tcpv4-port': 2025}) }}
{# ZODB -#}
{% set zodb_dict = {} -%}
...
...
stack/erp5/instance-postfix.cfg.in
0 → 100644
View file @
48672684
{% if software_type == slap_software_type -%}
{% set part_list = [] -%}
{% macro section(name) %}{% do part_list.append(name) %}{{ name }}{% endmacro -%}
{% set ipv4 = (ipv4_set | list)[0] -%}
{% set tcpv4_port = slapparameter_dict['tcpv4-port'] -%}
[buildout]
parts =
publish-postfix-connection-information
postfix-main-cf
postfix-master-cf
postfix-symlinks-bin
postfix-symlinks-sbin
postfix-symlinks-libexec
service-postfix-master
sh-postfix-environment
newaliases
{{ part_list | join('\n ') }}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
[publish-postfix-connection-information]
recipe = slapos.cookbook:publish.serialised
url = smtp://${:ipv4}:${:port}/
ipv4 = {{ ipv4 }}
port = ${postfix-master-cf-parameters:smtp_port}
[directory]
recipe = slapos.cookbook:mkdirectory
etc = ${buildout:directory}/etc
etc_postfix = ${:etc}/postfix
script = ${:etc}/run
service = ${:etc}/service
promise = ${:etc}/promise
usr = ${buildout:directory}/usr
usr_bin = ${:usr}/bin
usr_sbin = ${:usr}/sbin
var = ${buildout:directory}/var
var_spool = ${:var}/spool
var_spool_postfix = ${:var_spool}/postfix
var_spool_postfix_active = ${:var_spool_postfix}/active
var_spool_postfix_bounce = ${:var_spool_postfix}/bounce
var_spool_postfix_corrupt = ${:var_spool_postfix}/corrupt
var_spool_postfix_defer = ${:var_spool_postfix}/defer
var_spool_postfix_deferred = ${:var_spool_postfix}/deferred
var_spool_postfix_flush = ${:var_spool_postfix}/flush
var_spool_postfix_hold = ${:var_spool_postfix}/hold
var_spool_postfix_incoming = ${:var_spool_postfix}/incoming
var_spool_postfix_maildrop = ${:var_spool_postfix}/maildrop
var_spool_postfix_pid = ${:var_spool_postfix}/pid
var_spool_postfix_private = ${:var_spool_postfix}/private
var_spool_postfix_public = ${:var_spool_postfix}/public
var_spool_postfix_saved = ${:var_spool_postfix}/saved
var_spool_postfix_trace = ${:var_spool_postfix}/trace
var_lib = ${:var}/lib
var_mail = ${:var}/mail
var_lib_postfix = ${:var_lib}/postfix
[userinfo]
recipe = slapos.cookbook:userinfo
[postfix-main-cf]
recipe = slapos.recipe.template:jinja2
rendered = ${directory:etc_postfix}/main.cf
template = {{ parameter_dict['template-postfix-main-cf'] }}
context =
raw queue_directory ${directory:var_spool_postfix}
raw command_directory ${directory:usr_sbin}
raw daemon_directory {{ parameter_dict['postfix-location'] }}/usr/libexec/postfix
raw data_directory ${directory:var_lib_postfix}
raw mail_owner ${userinfo:pw_name}
raw alias_database hash:${aliases:rendered}
raw alias_maps hash:${aliases:rendered}, nis:mail.aliases
raw mail_spool_directory ${directory:var_mail}
raw mydomain localdomain
raw myhostname test.localdomain
raw setgid_group ${userinfo:gr_name}
raw inet_interfaces {{ ipv4 }}
[postfix-master-cf-parameters]
smtp_port = {{ tcpv4_port }}
[postfix-master-cf]
recipe = slapos.recipe.template:jinja2
rendered = ${directory:etc_postfix}/master.cf
template = {{ parameter_dict['template-postfix-master-cf'] }}
context = section parameter_dict postfix-master-cf-parameters
[aliases]
recipe = slapos.recipe.template:jinja2
template = inline:
# See http://www.postfix.org/aliases.5.html for format
rendered = ${directory:etc_postfix}/aliases
mode = 644
[newaliases]
recipe = plone.recipe.command
stop-on-error = true
command =
MAIL_CONFIG="${directory:etc_postfix}" {{ parameter_dict['postfix-location'] }}/usr/bin/newaliases
update-command = ${:command}
[postfix-symlinks-bin]
recipe = slapos.cookbook:symbolic.link
target-directory = ${directory:usr_bin}
link-binary =
{{ parameter_dict['postfix-location'] }}/usr/bin/mailq
{{ parameter_dict['postfix-location'] }}/usr/bin/newaliases
[postfix-symlinks-sbin]
recipe = slapos.cookbook:symbolic.link
target-directory = ${directory:usr_sbin}
link-binary =
{{ parameter_dict['postfix-location'] }}/usr/sbin/postalias
{{ parameter_dict['postfix-location'] }}/usr/sbin/postcat
{{ parameter_dict['postfix-location'] }}/usr/sbin/postconf
{{ parameter_dict['postfix-location'] }}/usr/sbin/postdrop
{{ parameter_dict['postfix-location'] }}/usr/sbin/postfix
{{ parameter_dict['postfix-location'] }}/usr/sbin/postkick
{{ parameter_dict['postfix-location'] }}/usr/sbin/postlock
{{ parameter_dict['postfix-location'] }}/usr/sbin/postlog
{{ parameter_dict['postfix-location'] }}/usr/sbin/postmap
{{ parameter_dict['postfix-location'] }}/usr/sbin/postmulti
{{ parameter_dict['postfix-location'] }}/usr/sbin/postqueue
{{ parameter_dict['postfix-location'] }}/usr/sbin/postsuper
{{ parameter_dict['postfix-location'] }}/usr/sbin/sendmail
[postfix-symlinks-libexec]
recipe = slapos.cookbook:symbolic.link
target-directory = ${directory:usr}
link-binary =
{{ parameter_dict['postfix-location'] }}/usr/libexec
[service-postfix-master]
recipe = slapos.cookbook:wrapper
command-line = {{ parameter_dict['postfix-location'] }}/usr/libexec/postfix/master
wrapper-path = ${directory:service}/start-postfix-master
environment = MAIL_CONFIG=${directory:etc_postfix}
[postfix-environment]
MAIL_CONFIG=${directory:etc_postfix}
[sh-postfix-environment]
recipe = slapos.recipe.template:jinja2
template = inline:
export MAIL_CONFIG="${directory:etc_postfix}"
rendered = ${buildout:directory}/postfix-environment.sh
context =
section postfix_environment postfix-environment
mode = 755
{% endif %}
stack/erp5/instance.cfg.in
View file @
48672684
...
...
@@ -44,6 +44,19 @@ filename = instance-cloudoo.cfg
extra-context =
section parameter_dict dynamic-template-cloudooo-parameters
[dynamic-template-postfix-parameters]
postfix-location = {{ postfix_location }}
template-postfix-main-cf = {{ template_postfix_main_cf }}
template-postfix-master-cf = {{ template_postfix_master_cf }}
[dynamic-template-postfix]
< = jinja2-template-base
template = {{ template_postfix }}
filename = instance-postfix.cfg
extensions = jinja2.ext.do
extra-context =
section parameter_dict dynamic-template-postfix-parameters
[dynamic-template-erp5-parameters]
local-bt5-repository = {{ local_bt5_repository }}
...
...
@@ -167,6 +180,7 @@ kumofs = dynamic-template-kumofs:rendered
cloudooo = dynamic-template-cloudooo:rendered
mariadb = dynamic-template-mariadb:rendered
balancer = dynamic-template-balancer:rendered
postfix = dynamic-template-postfix:rendered
zodb-zeo = dynamic-template-zeo:rendered
zodb-neo = neo-storage-mysql:rendered
zope = dynamic-template-zope:rendered
stack/erp5/postfix_main.cf.in
0 → 100644
View file @
48672684
# http://www.postfix.org/STANDARD_CONFIGURATION_README.html
# http://www.postfix.org/postconf.5.html
queue_directory = {{ queue_directory }}
command_directory = {{ command_directory }}
daemon_directory = {{ daemon_directory }}
data_directory = {{ data_directory }}
mail_owner = {{ mail_owner }}
myhostname = {{ myhostname }}
mydomain = {{ mydomain }}
unknown_local_recipient_reject_code = 550
alias_maps = {{ alias_maps }}
alias_database = {{ alias_database }}
mail_spool_directory = {{ mail_spool_directory }}
debug_peer_level = 2
sendmail_path =
newaliases_path =
mailq_path =
setgid_group = {{ setgid_group }}
html_directory =
manpage_directory =
sample_directory =
readme_directory =
inet_protocols = ipv4
inet_interfaces = {{ inet_interfaces }}
stack/erp5/postfix_master.cf.in
0 → 100644
View file @
48672684
{% set smtp = parameter_dict['smtp_port'] -%}
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
{{smtp}} inet n - n - - smtpd
#submission inet n - n - - smtpd
pickup unix n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr unix n - n 300 1 qmgr
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
proxywrite unix - - n - 1 proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
showq unix n - n - - showq
error unix - - n - - error
retry 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment