forked from tozd/docker-sympa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
977ef59
commit af74cf8
Showing
9 changed files
with
646 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,26 @@ | ||
Image providing [Sympa](https://www.sympa.org/) mailing list service. | ||
## Ready to use sympa docker image | ||
|
||
You should make sure you mount spool and data volumes (`/var/spool/sympa`, `/var/spool/nullmailer`, | ||
and `/var/lib/sympa`) so that you do not lose e-mails and mailing lists data when you are | ||
recreating a container. If volumes are empty, image will initialize them at the first startup. | ||
|
||
The intended use of this image is that it is extended (see [cloyne/sympa](https://github.com/cloyne/docker-sympa) | ||
for an example) with customizations for your installation, and used together with | ||
[tozd/postfix](https://github.com/tozd/docker-postfix) for receiving and sending e-mails | ||
(see [cloyne/postfix](https://github.com/cloyne/docker-postfix) for an example how to integrate | ||
them together). It is configured to be used with [tozd/postgresql](https://github.com/tozd/docker-postgresql) | ||
PostgreSQL database, by default, running in a contained named `pgsql`. You can link containers together | ||
or use [tozd/hosts](https://github.com/tozd/docker-hosts). Use `REMOTES` environment variable to | ||
specify the container or server used for sending e-mails. | ||
|
||
**The image contains only example values and cannot run without extending (or mounting necessary files into it).** | ||
|
||
You should provide two volumes, `/etc/sympa/includes` and `/etc/sympa/shared`. | ||
|
||
`/etc/sympa/includes` should contain two files: | ||
* `database` – a password for `sympa` user with permissions over `sympa` PostgreSQL database at (by default) `pgsql` container | ||
* `cookie` – a randomly generated string used for cookie string secret | ||
Build the image: | ||
``` | ||
git clone -b 6.2.38 https://github.com/OlivierGuilloux/docker-sympa | ||
cd docker-sympa | ||
docker build -t docker-sympa:6.2.38 . | ||
``` | ||
|
||
`/etc/sympa/shared` is a volume shared with (for example) `cloyne/postfix` | ||
container to provide necessary SSH keys for communication between containers. | ||
Add your specifics (cf. sample/): | ||
``` | ||
FROM docker-sympa-ws:6.2.38 | ||
When extending the image you should override files in the `/etc/sympa/conf.d` directory | ||
with ones containing your values. Moreover you probably want to define your own Sympa robot. | ||
# Update the configuration | ||
COPY ./etc/sympa /etc/sympa | ||
RUN chown sympa.sympa -R /etc/sympa | ||
To create a database for Sympa, `exec` into your PostgreSQL container and run: | ||
# Copy id_rsa.pub (when using ssh between postfix and sympa) | ||
RUN mkdir /var/lib/sympa/.ssh/ && chmod 700 /var/lib/sympa/.ssh/ && mkdir -p /var/spool/sympa/wwsbounce && mkdir -p /var/spool/sympa/bulk | ||
COPY ./shared/id_rsa.pub /var/lib/sympa/.ssh/ | ||
# Update Locale | ||
RUN locale-gen fr_FR.UTF-8 && export LANG=fr_FR.UTF-8 | ||
``` | ||
$ createuser -U postgres -DRS -PE sympa | ||
$ createdb -U postgres -O sympa sympa | ||
``` | ||
|
||
You might have to initialize afterwards the database. Run from inside your Sympa container: | ||
|
||
``` | ||
$ psql -h pgsql -U sympa -W -f /usr/share/sympa/bin/create_db.Pg | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
FROM docker-sympa-ws:6.2.38 | ||
|
||
# Configuration | ||
COPY ./etc/sympa /etc/sympa | ||
RUN chown sympa.sympa -R /etc/sympa | ||
|
||
# Copy id_rsa.pub (when using ssh between postfix and sympa) | ||
RUN mkdir /var/lib/sympa/.ssh/ && chmod 700 /var/lib/sympa/.ssh/ && mkdir -p /var/spool/sympa/wwsbounce && mkdir -p /var/spool/sympa/bulk | ||
COPY ./shared/id_rsa.pub /var/lib/sympa/.ssh/ | ||
|
||
# Update Locale | ||
RUN locale-gen fr_FR.UTF-8 && export LANG=fr_FR.UTF-8 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# postfix transport regexp | ||
/^.*-owner\@mylist.mydomain$/ sympabounce: | ||
/^.*\@mylist.mydomain$/ sympa: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Postfix host and port | ||
172.17.0.1 smtp --port=2525 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# This file is automatically created by sympa.pl after installation | ||
# Unless you know what you are doing, you should not modify it | ||
6.2.38 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
host mylist.mydomain | ||
|
||
http_host mylist.mydomain | ||
|
||
listmaster [email protected] | ||
|
||
title My Sympa Service for mydomain | ||
|
||
create_list listmaster | ||
|
||
supported_lang fr,en | ||
lang fr | ||
|
||
default_home lists | ||
|
||
dark_color #00aa00 | ||
light_color #ddffdd | ||
selected_color #0099cc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
trusted_application | ||
name myapplication | ||
md5password generateit | ||
proxy_for_variables USER_EMAIL |
Oops, something went wrong.