Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
105
Merge Requests
105
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
2060bfd6
Commit
2060bfd6
authored
Feb 17, 2023
by
Joanne Hugé
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WIP: deltachat connects
parent
b2b1a909
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
124 additions
and
69 deletions
+124
-69
component/postfix/buildout.cfg
component/postfix/buildout.cfg
+1
-1
software/dovecot/buildout.hash.cfg
software/dovecot/buildout.hash.cfg
+5
-5
software/dovecot/instance-default.cfg.in
software/dovecot/instance-default.cfg.in
+85
-13
software/dovecot/postfix_alias.jinja2
software/dovecot/postfix_alias.jinja2
+1
-1
software/dovecot/postfix_main.jinja2.cf
software/dovecot/postfix_main.jinja2.cf
+30
-47
software/dovecot/postfix_vhosts.jinja2
software/dovecot/postfix_vhosts.jinja2
+0
-0
software/dovecot/postfix_virtual.jinja2
software/dovecot/postfix_virtual.jinja2
+1
-1
software/dovecot/postfix_vmailbox.jinja2
software/dovecot/postfix_vmailbox.jinja2
+1
-1
No files found.
component/postfix/buildout.cfg
View file @
2060bfd6
...
@@ -13,7 +13,7 @@ extends =
...
@@ -13,7 +13,7 @@ extends =
[postfix]
[postfix]
recipe = slapos.recipe.cmmi
recipe = slapos.recipe.cmmi
shared =
tru
e
shared =
fals
e
url = http://cdn.postfix.johnriley.me/mirrors/postfix-release/official/postfix-3.7.3.tar.gz
url = http://cdn.postfix.johnriley.me/mirrors/postfix-release/official/postfix-3.7.3.tar.gz
md5sum = bbb2168f85530fe4eaa65408a48e731b
md5sum = bbb2168f85530fe4eaa65408a48e731b
location = @@LOCATION@@
location = @@LOCATION@@
...
...
software/dovecot/buildout.hash.cfg
View file @
2060bfd6
...
@@ -19,7 +19,7 @@ md5sum = 5ded78c210ad723606f808165fe10be6
...
@@ -19,7 +19,7 @@ md5sum = 5ded78c210ad723606f808165fe10be6
[template-default]
[template-default]
_update_hash_filename_ = instance-default.cfg.in
_update_hash_filename_ = instance-default.cfg.in
md5sum =
ec7f74baca8268d169e77447fa0f93b0
md5sum =
1e87d360ed90b40530a7c28e50949e0d
[dovecot.jinja2.conf]
[dovecot.jinja2.conf]
_update_hash_filename_ = dovecot.jinja2.conf
_update_hash_filename_ = dovecot.jinja2.conf
...
@@ -30,19 +30,19 @@ md5sum = 190b3130b1b60bf4ca7a58ccf1ab3e9b
...
@@ -30,19 +30,19 @@ md5sum = 190b3130b1b60bf4ca7a58ccf1ab3e9b
[postfix_main.jinja2.cf]
[postfix_main.jinja2.cf]
_update_hash_filename_ = postfix_main.jinja2.cf
_update_hash_filename_ = postfix_main.jinja2.cf
md5sum =
f0074c518821be72d4d331aa558e254e
md5sum =
7f41fc15c0242bf7f9344673e068d8dc
[postfix_master.jinja2.cf]
[postfix_master.jinja2.cf]
_update_hash_filename_ = postfix_master.jinja2.cf
_update_hash_filename_ = postfix_master.jinja2.cf
md5sum = 7752a8b4af5c18dc404e0a862af89272
md5sum = 7752a8b4af5c18dc404e0a862af89272
[postfix_alias.jinja2]
[postfix_alias.jinja2]
_update_hash_filename_ = postfix_alias.jinja2
_update_hash_filename_ = postfix_alias.jinja2
md5sum =
170fcb64781e966fa1a9718b5a925535
md5sum =
b6941dd8632208c592ba3a531df63034
[postfix_mailname.jinja2]
[postfix_mailname.jinja2]
_update_hash_filename_ = postfix_mailname.jinja2
_update_hash_filename_ = postfix_mailname.jinja2
md5sum = e7eb11cb4485b0d46f968f612643c1b0
md5sum = e7eb11cb4485b0d46f968f612643c1b0
[postfix_vmailbox.jinja2]
[postfix_vmailbox.jinja2]
_update_hash_filename_ = postfix_vmailbox.jinja2
_update_hash_filename_ = postfix_vmailbox.jinja2
md5sum =
8c720937c1cbf74371ee41c5e5577369
md5sum =
dcff25a0b3b46414cbbd88b43fa808eb
[postfix_virtual.jinja2]
[postfix_virtual.jinja2]
_update_hash_filename_ = postfix_virtual.jinja2
_update_hash_filename_ = postfix_virtual.jinja2
md5sum =
5b51b6cb273f8aeedf49f7d46c19f0dd
md5sum =
0ce1aff8574a14359c4c17f02d88dec8
software/dovecot/instance-default.cfg.in
View file @
2060bfd6
[buildout]
{% set part_list = [] -%}
parts =
{% macro section(name) %}{% do part_list.append(name) %}{{ name }}{% endmacro -%}
directory
dovecot-conf
dovecot-service
postfix-conf-main
postfix-conf-master
postfix-service
postfix-symlinks-libexec
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline= true
[directory]
[directory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
...
@@ -102,6 +92,15 @@ init =
...
@@ -102,6 +92,15 @@ init =
except:
except:
options['ipv4'] = "0.0.0.0"
options['ipv4'] = "0.0.0.0"
[typed-paths]
# Postfix-friendly rendering of file paths, prefixed with database type.
aliases = hash:${postfix-alias:output}
[{{ section('postalias-db') }}]
recipe = plone.recipe.command
stop-on-error = true
command = '${wrapper-postalias:wrapper-path}' '${typed-paths:aliases}'
update-command = ${:command}
[postfix-conf-main]
[postfix-conf-main]
<= config-base
<= config-base
...
@@ -174,7 +173,7 @@ recipe = slapos.recipe.template
...
@@ -174,7 +173,7 @@ recipe = slapos.recipe.template
output = ${directory:bin}/${:_buildout_section_name_}
output = ${directory:bin}/${:_buildout_section_name_}
inline =
inline =
#!/bin/sh
#!/bin/sh
${directory:usr-postfix}/libexec/postfix/master -
d -v -w -
c ${directory:etc-postfix}
${directory:usr-postfix}/libexec/postfix/master -c ${directory:etc-postfix}
[postfix-service]
[postfix-service]
recipe = slapos.cookbook:wrapper
recipe = slapos.cookbook:wrapper
...
@@ -187,3 +186,76 @@ environment =
...
@@ -187,3 +186,76 @@ environment =
hash-files =
hash-files =
${postfix-conf-main:output}
${postfix-conf-main:output}
${postfix-wrapper:output}
${postfix-wrapper:output}
[base-wrapper]
recipe = slapos.cookbook:wrapper
environment =
MAIL_CONFIG=${directory:etc-postfix}
[base-bin-wrapper]
< = base-wrapper
command-line = ${:path}/${:basename}
wrapper-path = ${directory:bin}/${:basename}
[base-bin-bin-wrapper]
< = base-bin-wrapper
path = {{ postfix_location }}/usr/bin
[base-sbin-bin-wrapper]
< = base-bin-wrapper
path = {{ postfix_location }}/usr/sbin
{% for extend, basename_list in (
(
'base-bin-bin-wrapper',
(
'mailq',
'newaliases',
),
),
(
'base-sbin-bin-wrapper',
(
'postalias',
'postcat',
'postconf',
'postdrop',
'postfix',
'postkick',
'postlock',
'postlog',
'postmap',
'postmulti',
'postqueue',
'postsuper',
'sendmail',
),
),
) %}
{% for basename in basename_list -%}
[{{ section('wrapper-' ~ basename) }}]
< = {{ extend }}
basename = {{ basename }}
{% endfor %}
{% endfor %}
[{{ section('service-postfix-master') }}]
< = base-wrapper
command-line = ${directory:usr}/libexec/postfix/master -c ${directory:etc-postfix}
wrapper-path = ${directory:run}/postfix-master
[buildout]
parts =
directory
dovecot-conf
dovecot-service
postfix-conf-main
postfix-conf-master
postfix-service
postfix-symlinks-libexec
{{ part_list | join('\n ') }}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline= true
software/dovecot/postfix_alias.jinja2
View file @
2060bfd6
postmaster:
root
postmaster:
ors
software/dovecot/postfix_main.jinja2.cf
View file @
2060bfd6
# http://www.postfix.org/STANDARD_CONFIGURATION_README.html
# http://www.postfix.org/postconf.5.html
queue_directory = {{ queue_directory }}
queue_directory = {{ queue_directory }}
command_directory = {{ bin_directory }}
command_directory = {{ bin_directory }}
daemon_directory = {{ usr_directory }}/libexec/postfix
daemon_directory = {{ usr_directory }}/libexec/postfix
data_directory = {{ data_directory }}
data_directory = {{ data_directory }}
mail_owner = {{ mail_owner }}
alias_maps = hash:{{ alias_file }}
alias_database = hash:{{ alias_file }}
mail_spool_directory = {{ spool_directory }}
mail_spool_directory = {{ spool_directory }}
sendmail_path = {{ bin_directory }}/sendmail
sendmail_path = {{ bin_directory }}/sendmail
newaliases_path = {{ bin_directory }}/newaliases
newaliases_path = {{ bin_directory }}/newaliases
mailq_path = {{ bin_directory }}/mailq
mailq_path = {{ bin_directory }}/mailq
manpage_directory = {{ postfix_location }}/usr/local/man
sample_directory = {{ postfix_location }}/etc/postfix
mail_owner = {{ mail_owner }}
setgid_group = {{ setgid_group }}
setgid_group = {{ setgid_group }}
html_directory = no
html_directory = no
manpage_directory = {{ postfix_location }}/usr/local/man
sample_directory = {{ postfix_location }}/etc/postfix
readme_directory = no
readme_directory = no
inet_interfaces = {{ ip_address }}
smtp_bind_address = 0.0.0.0
smtp_bind_address = 0.0.0.0
smtp_bind_address6 = ::
smtp_bind_address6 = ::
compatibility_level = 3.6
smtputf8_enable = no
smtputf8_enable = no
# Compared to default:
# - remove X-related variables, irrelevant for slapos, to be concise
# - add SASL_CONF_PATH to have per-partition cyrus-sasl configuration
import_environment =
import_environment =
MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG TZ LANG=C
MAIL_CONFIG MAIL_DEBUG MAIL_LOGTAG TZ LANG=C
SASL_CONF_PATH
allow_min_user = yes
biff = no
# appending .domain is the MUA's job.
append_dot_mydomain = no
# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h
readme_directory = no
# See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on
# fresh installs.
compatibility_level = 2
home_mailbox = Maildir/
smtpd_tls_security_level = none
smtpd_tls_security_level = none
smtpd_sasl_type = dovecot
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_auth_enable = yes
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
myhostname = mydomain.local
# Reject as many bogus cases as soon as possible, so errors are visible to ERP5
alias_maps = hash:{{ alias_file }}
# developper rather than relying on bounces.
alias_database = hash:{{ alias_file }}
smtpd_recipient_restrictions =
myorigin = {{ mailname_file }}
reject_non_fqdn_recipient
#mydestination = ors64, localhost.localdomain, localhost
reject_unknown_recipient_domain
relayhost =
permit_sasl_authenticated
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 {{ netaddr.IPNetwork(ip_address + '/24') }}
reject
mailbox_size_limit = 0
# Do not allow mynetworks to send mails, only authenticated clients.
recipient_delimiter = +
smtpd_relay_restrictions =
inet_interfaces = {{ ip_address }}
permit_sasl_authenticated
default_transport = error
defer_unauth_destination
relay_transport = error
inet_protocols = all
# We do not pass mail address in command lines, so accept those starting with
# a dash.
allow_min_user = yes
virtual_mailbox_domains = mydomain.local
# Disable local delivery
virtual_mailbox_base = {{ vhosts_directory }}
local_transport = error
virtual_mailbox_maps = hash:{{ vmailbox_file }}
virtual_minimum_uid = 100
virtual_uid_maps = static:1001
virtual_gid_maps = static:1022
virtual_alias_maps = hash:{{ virtual_file }}
virtual_transport = lmtp:unix:private/dovecot-lmtp
maillog_file = {{
directory['log']
}}/postfix.log
maillog_file = {{
log_directory
}}/postfix.log
maillog_file_compressor = {{ xz_utils_location }}/bin/xz
maillog_file_compressor = {{ xz_utils_location }}/bin/xz
maillog_file_prefixes = {{ log_directory }}
maillog_file_prefixes = {{ log_directory }}
software/dovecot/postfix_vhosts.jinja2
deleted
100644 → 0
View file @
b2b1a909
software/dovecot/postfix_virtual.jinja2
View file @
2060bfd6
postmaster@ors.local
slapuser15
@ors.local
postmaster@ors.local
ors
@ors.local
software/dovecot/postfix_vmailbox.jinja2
View file @
2060bfd6
slapuser15@ors.local ors.local/slapuser15
ors@ors.local ors.local/ors
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