mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-07-21 19:24:46 +02:00
Better incorporate the new, great documentation (#1878)
This commit is contained in:
parent
f3652e52c8
commit
65622c56e9
4 changed files with 67 additions and 65 deletions
|
@ -0,0 +1,43 @@
|
|||
---
|
||||
title: 'Custom User Changes & Patches | Scripting'
|
||||
---
|
||||
|
||||
If you'd like to change, patch or alter files or behavior of `docker-mailserver`, you can use a script.
|
||||
|
||||
In case you cloned this repository, you can copy the file `user-patches.sh.dist` under `config/` with `#!sh cp config/user-patches.sh.dist config/user-patches.sh` in order to create the `user-patches.sh` script. In case you are managing your directory structure yourself, create a `config/` directory and the `user-patches.sh` file yourself.
|
||||
|
||||
``` sh
|
||||
# 1. Either create the config/ directory yourself
|
||||
# or let docker-mailserver create it on initial
|
||||
# startup
|
||||
~/somewhere $ mkdir config && cd config
|
||||
|
||||
# 2. Create the user-patches.sh and edit it
|
||||
~/somewhere/config $ touch user-patches.sh
|
||||
~/somewhere/config $ vi user-patches.sh
|
||||
```
|
||||
|
||||
The contents could look like this
|
||||
|
||||
``` sh
|
||||
#! /bin/bash
|
||||
|
||||
sed -i -E 's|(log_level).*|\1 = -1;|g' /etc/amavis/conf.d/49-docker-mailserver
|
||||
|
||||
cat >/etc/amavis/conf.d/50-user << "END"
|
||||
use strict;
|
||||
|
||||
$undecipherable_subject_tag = undef;
|
||||
$admin_maps_by_ccat{+CC_UNCHECKED} = undef;
|
||||
|
||||
#------------ Do not modify anything below this line -------------
|
||||
1; # ensure a defined return
|
||||
END
|
||||
|
||||
...
|
||||
```
|
||||
|
||||
And you're done. The user patches script runs right before starting daemons. That means, all the other configuration is in place, so the script can make final adjustments.
|
||||
|
||||
!!! note
|
||||
Many "patches" can already be done with the Docker Compose-/Stack-file. Adding hostnames to `/etc/hosts` is done with the `#!yaml extra_hosts:` section, `sysctl` commands can be managed with the `#!yaml sysctls:` section, etc.
|
|
@ -18,6 +18,9 @@ This documentation provides you with advanced configuration, detailed examples,
|
|||
!!! tip
|
||||
See the [FAQ][docs-faq] for some more tips!
|
||||
|
||||
!!! important
|
||||
If you'd like to change, patch or alter files or behavior of `docker-mailserver`, you can use a script. Just place it in the `config/` folder that is created on startup and call it `user-patches.sh`. If you'd like to see the full documentation and an example, visit the ['Modifications via Script' page][docs-userpatches].
|
||||
|
||||
## Contributing
|
||||
|
||||
We are always happy to welcome new contributors. For guidelines and entrypoints please have a look at the [Contributing section][docs-contributing].
|
||||
|
@ -26,6 +29,7 @@ We are always happy to welcome new contributors. For guidelines and entrypoints
|
|||
[docs-faq]: ./faq.md
|
||||
[docs-optionalconfig]: ./config/advanced/optional-config.md
|
||||
[docs-setupsh]: ./config/setup.sh.md
|
||||
[docs-userpatches]: ./config/advanced/override-defaults/user-patches.md
|
||||
[github-file-readme]: https://github.com/docker-mailserver/docker-mailserver/blob/master/README.md
|
||||
[github-file-env]: https://github.com/docker-mailserver/docker-mailserver/blob/master/ENVIRONMENT.md
|
||||
[github-file-setupsh]: https://github.com/docker-mailserver/docker-mailserver/blob/master/setup.sh
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue