From b6d8ce371cabab5c2829cb2b4a38e96a1a8f455d Mon Sep 17 00:00:00 2001 From: polarathene <5098581+polarathene@users.noreply.github.com> Date: Mon, 1 Mar 2021 00:53:15 +1300 Subject: [PATCH 01/14] docs(config): Add initial `mkdocs.yml` config --- docs/mkdocs.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 docs/mkdocs.yml diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml new file mode 100644 index 00000000..0fac38a7 --- /dev/null +++ b/docs/mkdocs.yml @@ -0,0 +1,35 @@ +site_name: 'Docker Mailserver' +site_description: 'A fullstack but simple mail server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.) using Docker.' +site_author: 'docker-mailserver (Github Organization)' +repo_name: 'docker-mailserver' +repo_url: 'https://github.com/docker-mailserver/docker-mailserver' +copyright: '

© Docker Mailserver Organization
This project is licensed under the MIT license.

' + +docs_dir: 'content/' +theme: + name: 'material' + icon: + repo: fontawesome/brands/github + features: + - navigation.tabs + - navigation.expand + +markdown_extensions: + - toc: + permalink: ⚓︎ + - abbr + - attr_list + - admonition + - pymdownx.highlight: + extend_pygments_lang: + - name: yml + lang: yaml + - name: cf + lang: cfg + - name: conf + lang: cfg + - pymdownx.superfences + - pymdownx.magiclink + - pymdownx.emoji: + emoji_index: !!python/name:materialx.emoji.twemoji + emoji_generator: !!python/name:materialx.emoji.to_svg From 48cf6ffeb0eb6e6a2b03cb322d139dff11489e13 Mon Sep 17 00:00:00 2001 From: polarathene <5098581+polarathene@users.noreply.github.com> Date: Fri, 5 Mar 2021 01:39:26 +1300 Subject: [PATCH 02/14] docs(assets): Add SVG logo and ICO favicon. Adds the SVG logo I created (composited rather) in mid-feb in one of my PRs that went slightly off-topic about migrating docs from Github Wiki. Enables the logo and favicon in `mkdocs.yml`. SVG sources for both full colour and simplified monochromatic are included along with PNG images for use anywhere else, such as the organization logo. The two SVG of the same names from `src` dir, are used by the docs and have been processed through SVGOMG, an SVG file size optimizer. Any future modifications should use the source files. --- docs/content/assets/logo/dmo-logo-white.svg | Bin 0 -> 1931 bytes docs/content/assets/logo/dmo-logo.svg | Bin 0 -> 2644 bytes docs/content/assets/logo/favicon-32x32.png | Bin 0 -> 1130 bytes docs/content/assets/logo/src/dmo-logo-white.png | Bin 0 -> 33684 bytes docs/content/assets/logo/src/dmo-logo-white.svg | Bin 0 -> 4709 bytes docs/content/assets/logo/src/dmo-logo.png | Bin 0 -> 53338 bytes docs/content/assets/logo/src/dmo-logo.svg | Bin 0 -> 5728 bytes docs/mkdocs.yml | 3 +++ 8 files changed, 3 insertions(+) create mode 100644 docs/content/assets/logo/dmo-logo-white.svg create mode 100644 docs/content/assets/logo/dmo-logo.svg create mode 100644 docs/content/assets/logo/favicon-32x32.png create mode 100644 docs/content/assets/logo/src/dmo-logo-white.png create mode 100644 docs/content/assets/logo/src/dmo-logo-white.svg create mode 100644 docs/content/assets/logo/src/dmo-logo.png create mode 100644 docs/content/assets/logo/src/dmo-logo.svg diff --git a/docs/content/assets/logo/dmo-logo-white.svg b/docs/content/assets/logo/dmo-logo-white.svg new file mode 100644 index 0000000000000000000000000000000000000000..70d4bfacc6d81e3e2b5cb87c758154c3998e23d5 GIT binary patch literal 1931 zcmb7FyK);j5d0O?IpG6$G}Q1P`<@?-HKF^w5apfUjtmaD9edUBCre0 zqo=2Vy+6LL&Fgk~{<43YcHU7kUX_Xo?CY;HZ_mT-IPEs4)5~9z$@zSyv(Wyqo_Ocn z1n%9#{bIQ~KHRUi!)bXi+r_l&;WzDEXZ~yBdAm4mrX6=?v)ryXr}jAC5Br1N?%?yX zANtdFzq6MRNO%0_?=J|vT7IookNxSeeKW89@O_C*N1hF!dJL|OoQ=cFA1zl8gE-yf z;eK*SjE74pYlDSh+U@qcWoM43!~Wl;ecl4;gqjo0uu+;4?XwEIW## zy-@bvTt;MZ9wkSMe#tjx!6Zho*6g_1p+ML*6Wgo@o0UYXo%8(BvKj?bL;h%J!NRAN z^m9#>sGndP%A{Ac7o6n=XU*PnBTo{`R9yO&BB_c=OyYE~obj5C01)4%CGT{`bc zax_s%0}r84U?`QzqhfGeINJc)0_sVnAa@;G<(@JpOD?=Cyi$}(Y=-e_=u@tJ({NMy zYQbUNB(lD#UV+EMyJX5vdvvEVfuW_0z?u-6bq>y5M*oRpwm4oKsu-}ZmII`b4ce@Z zYltkl2B{OmFkB;YKm{?I0*2x^woPco*BsvE8HAIAZzz0&(In_!||286=5K6=Ej7cJ=GKISaz(5PMdVD1 z5LTP$8?F%trpAzvgn&RGC(oe`m29E7Yy~a#mJ0wy3%rt`{Xibp5seHM=OKu>Wd9TzqB=tx#J<5Y=lkC%n(^385-VQps} zA-oUXmwi7@zcFYoSOB`Qr0^7H`imVF%M9iGYRP`~Veu=ZilYV1 zA}R!q&j1cG&m(aW;HhE&Zy+_|IN)JV%EmKv-VQDDJHT+` qJqm@frI_N+=3OuH-+d06KBSQ~Y5^}E1d2DlUBKb4-7WZxKKu{nQ>^>| literal 0 HcmV?d00001 diff --git a/docs/content/assets/logo/dmo-logo.svg b/docs/content/assets/logo/dmo-logo.svg new file mode 100644 index 0000000000000000000000000000000000000000..d738edb3b9cf88a98d789d83377c486fe56d4143 GIT binary patch literal 2644 zcmeHJ%W~UD4E&WT=8_x;4IcAKMLBFPK4h=HvuMjwg|=L>HuCP*Z-Y`~%lkNQsyxObmF-G$X=nwH(e_Tjb*Py5~W+iicp+28J_4Q|VhBdi{W{W{z%yI)zDECs8L zYO^&LA*oY|q^(?Cm`=uI*eAj#jC8PDHW9;X?wmF^(Ehw1UdM6%vZQKDowu% zXq6mbOxg0(TP7``W)iEfB61t_<|1M>(yB;3lL=33pd%!8?*ayTRuEVLDOvN-SZDZ! zV(p0~O}#KvYZidsoYZ7ITk_E|f$JPHfyq~ytZq1sp2_0QwcYQAho{wccfaiJhy8Bz z{2qWBx9n$xAA9J=B?nRGTR*(kTRQifGstk)S9q87K+<+=ZPSaEgq~ieIO< zYC@dsiW00TosP%u%Zw9+8t~9k5Dpc~2+U1k#!heTfiufoOQrNs0jPznWMG1mQi=@- zBJ{vM8TOnjLPY?LCrR)M`Q?&d1ktFY$wg^^^%&<+Eng(7)hXgHT)-;~P-}?;D>{v# zm8Ts?1WpF|dh}WW<4p|P*0?Wgc$l^k73W-0MamFXozIG`dEM6HDuF%tQAsG%;%c%R zFe|nZFq3a`EhOwvp^)1_Sf*MqV`}m{4ld?>>rucBsTzqw7RgSHv*r{>P>k3Sth)qA z0G@{U(SV5}qazqtOhI|_bQF{#DXj=zG-I#v6{{vgTBUzr)&8ATWd6b`qpiTJ-<(-P zl{mABQQNgIft#hT@#r40xs>59UJ_p?sak1Drt{S{!6GpQzqw0u?J756|e6mYk^V z<1lXazb`vtr)k{m#_2YU_)sJO;Vz8$ALlOYa66CAmukImu-r}#K6J2$6N*UBeyi2$ zQjDK%YH+zm37kcWJwc6h#deJve*1deV~kzQnCpCHZ|o>tw=2wsx0Wpbu@Uv#ZhHT2 v_~82aH{<-J|LG?G{~C6G|Glrq_}Ov#;2$3ZGaA2#1OqopI*O0qgP;Ed#{)PD literal 0 HcmV?d00001 diff --git a/docs/content/assets/logo/favicon-32x32.png b/docs/content/assets/logo/favicon-32x32.png new file mode 100644 index 0000000000000000000000000000000000000000..f129fc449c1ae90b39f32da80e214e28e8dfc26c GIT binary patch literal 1130 zcmV-w1eN=VP)5r;fx)y$f4it-@ka^JE;gxu!Q z>0+nTF@7!^6XzYX!i2p}gg#C~z-`VC;Wn?JgWNM!k8;_?6a$pY@?`}GwC{R2=rP0d zcJ|30jGxWIM4tmUzT5|Yy$b*PD*P^iz=ykMg&FhM_7Fly><(=Us9z0w8(d+8&vpPBmy7VFxF}BAcPQ0s@%mC1EOgNNx7wnbVEEz zxh{zin-=dvhgmc?fWOt44_(-yK$BKQ2qCdtw=u~5pO>LrWl}#yhKy= z$H_zS>itv^%1mcx8|mG(wuzov8+vMO=&rS)t5QSPk;VPh%UZDgdA(_WhMqoMi_3DR z+8|xSkgWj-*Dyr$HKe?7IugPvjuXaZGgAz#i&Yy^%3P3bA*l6NV6Ey#QqfT`%?8S4 zXG~1Yy@Yb3DJi!MqVdl)w`?APacT_en?Hidy^&B{{%YZ(m=F>bIVOrcmXKWnC@wNQKA3+=6+Rt1->0qiVwfhopK3l}L1PJCRd z*v1qC%4_GR7pm2LV2XjJ58TjC{C0=%AW~mE1E$(w;quuf&plI&ACd|yA=^Tc0LS~m z6a$GyI`q21mAAdckCgIH!SpmxF6(Z4@i40_VVVi0#(V1*yzwoxw|`#QuG>P;PYxmZ z=>{-$H<%*dogTKOB{nfG`x7z_K|L`z-HDYA+coeSFA{SOgK>F-T4m`nz_+w5MQo+q zxSWu22-fO;2-nDMgUHq(^piv2H9jO2zY3H&Ne3&C z`qEjbb$>u>xC*`TZ|IGGL2I}Q^}S259_vN&;YK7Lcq-CvZv0NUcw)&rewm84aB+|- z#sK9q%rq16>G?>=DndeLA>z{l wLapM6g^On>7Y>V6#1cZH*BrW`4c%@13!ImS;1L_K4gdfE07*qoM6N<$f;%P|Pyhe` literal 0 HcmV?d00001 diff --git a/docs/content/assets/logo/src/dmo-logo-white.png b/docs/content/assets/logo/src/dmo-logo-white.png new file mode 100644 index 0000000000000000000000000000000000000000..5768359865334f984add5ab49a0269f3a6afafb4 GIT binary patch literal 33684 zcmeFZ_g7Te(msC327(yKK^r4cKm>`cq6jF0qJTunK{7NM8XW~Ci4sJzh(raHoYf&H zQKEz<2MOII$)Ue>n3?;|``$m``^#t6x@+#bx6e6y*RFc%si$i5R9#JpVIRjn1VI>- zuPNR_5Ni0Z)W{xM_?I8Iz$5tAUWaQs&IrOCfc}RfY<$5C{zrC~E7~r%?af`>?mL+w zZfc_^8|BRmhI4?}oi^U(uS`FH`ZIU`GN(oIk-HjJK zolEcDM!XAraA*?G)pzhCcdS%$p<35{^K;^DmTFbod_P?e^18f=@nRfoab2JrvaF=8 z>2g-6n)FqK75~3~{+|W@f42ah_P!MztRlPf*DuTBf`Vm*&F!7|_wV1w%JJL`Fw<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DVO*^)JNU@2bAtf6A`mRIU#9b%&PVN-`YG3O^$K%D@B$&zhzc4EwOjlcB*L z7)Mb42C+j95@*bbCel;7K@4lRQhA{>b&LYWu|Lp;!g-#!D z3%Sv^nP3^~aq@IHb-~-ml#^GAn;2w_wh;JUM=FB2jZv;p%5oXBjl<1=b{&g51hKep z53gPh&s4hC*YuyOes|3}$n?mx=ThrJ3d^1JY{y*S*06st%yJish#OMStYVr6rHb^M z5-gZPSzJ*-%@nf=T!>hdIR2eBgDd3u6sGVRQXYjzoZfL`bm1k} z!Z7PO)heg&KR51VH)X8!aC@Rs4R9i_Olg1Ms8U=9S2)9QWHTGNmA+7tE3Fyu5M?Mz zi@Mq5vyTy8<2UD9@c@0?-h}-s-$Q|XbZLRRE>J!Y=8R=eC494%c6AeBPWUYqZO2pU zHt$*QrVplrGc`-1js+sKLB659Eymkj8kEy9I@wOpH4;!&LIY+Yav7zdxKKs!LPSBQ zryQRH#I*_tT3Hz_TQQ(f!X{$ItAJ4$3m#n5NVDeBdyOe+;TFsk9x@g1vH&9}f>Kfz z`5~E*w4ay3+amDbrDTyi;~W~gn4YqxM{NbFtGUKjj{T0iKQ~^QVA$VM6j7KV2znS} zz&1e`7Yh>{qOisz3Qtg)z#c$>euogG5-Tpe}(dSY}_?J0Kto z)hevP`6Pm+T@r)^Oy!5M+QU%fc@e&;Sw2(+?tY+(H%3Yd_0IQ{M}tAJai}GeqDbC{zse6!G3H{p*p(?&hicZ#Wly`i`NMyr)hPKC)lZ5U`^$*cO{8 zuLu@sO=^Lt5=b6t0R8v8r>tIho4M-oZ5YhuyB3-}CJzbur ak@BDniAD#l(|yAVJz(~Z{%7&_#s2^#H*5C* literal 0 HcmV?d00001 diff --git a/docs/content/assets/logo/src/dmo-logo.png b/docs/content/assets/logo/src/dmo-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..cd049f8d541d83e1bad890b4c7d33171bfe20351 GIT binary patch literal 53338 zcmeFZ^WkS=MI6hWFrvrs{lbkQY9N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 diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 0fac38a7..8fd516b7 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -6,8 +6,11 @@ repo_url: 'https://github.com/docker-mailserver/docker-mailserver' copyright: '

© Docker Mailserver Organization
This project is licensed under the MIT license.

' docs_dir: 'content/' +site_url: 'https://docker-mailserver.github.io/docker-mailserver' theme: name: 'material' + favicon: assets/logo/favicon-32x32.png + logo: assets/logo/dmo-logo-white.svg icon: repo: fontawesome/brands/github features: From 95983cbebc7251b610f11d2228ba1064978ede88 Mon Sep 17 00:00:00 2001 From: polarathene <5098581+polarathene@users.noreply.github.com> Date: Mon, 1 Mar 2021 01:14:12 +1300 Subject: [PATCH 03/14] docs(ci): Add workflow to build and deploy docs Separate workflows for `push` and `pull_request` events. This avoids a `skipped` job status (`Check Run`?) always being presented for the `deploy` job in Pull Requests. --- chore(`.gitignore`): Ignore the `docs/site/` build output Ignore to avoid local builds output appearing in git as unstaged. --- .github/workflows/deploy-docs.yml | 33 +++++++++++++++++++++++++++++++ .github/workflows/pr-docs.yml | 22 +++++++++++++++++++++ .gitignore | 2 ++ 3 files changed, 57 insertions(+) create mode 100644 .github/workflows/deploy-docs.yml create mode 100644 .github/workflows/pr-docs.yml diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 00000000..8aeba50a --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -0,0 +1,33 @@ +name: 'Documentation' + +on: + workflow_dispatch: + push: + branches: + - master + paths: + - '.github/workflows/deploy-docs.yml' + - 'docs/**' + +# Jobs will run shell commands from this subdirectory: +defaults: + run: + working-directory: docs + +jobs: + deploy: + name: 'Deploy Docs' + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + + - name: 'Build with mkdocs-material via Docker' + run: docker run --rm -v ${PWD}:/docs squidfunk/mkdocs-material build --strict + + - name: 'Deploy to Github Pages' + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/site + user_name: 'github-actions[bot]' + user_email: '41898282+github-actions[bot]@users.noreply.github.com' diff --git a/.github/workflows/pr-docs.yml b/.github/workflows/pr-docs.yml new file mode 100644 index 00000000..d0f1d030 --- /dev/null +++ b/.github/workflows/pr-docs.yml @@ -0,0 +1,22 @@ +name: 'Documentation' + +on: + pull_request: + paths: + - '.github/workflows/pr-docs.yml' + - 'docs/**' + +# Jobs will run shell commands from this subdirectory: +defaults: + run: + working-directory: docs + +jobs: + build: + name: 'Verify Build' + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v2 + + - name: 'Build with mkdocs-material via Docker' + run: docker run --rm -v ${PWD}:/docs squidfunk/mkdocs-material build --strict diff --git a/.gitignore b/.gitignore index 71cc9fed..0b897101 100644 --- a/.gitignore +++ b/.gitignore @@ -46,3 +46,5 @@ test/duplicate_configs config.bak testconfig.bak + +docs/site From 251a87e622c67ceeb1f425feaaf3ef02ff569efb Mon Sep 17 00:00:00 2001 From: polarathene <5098581+polarathene@users.noreply.github.com> Date: Thu, 11 Mar 2021 17:57:16 +1300 Subject: [PATCH 04/14] docs(ci): Add versioning support without using 'mike' It seems it may have be simpler to just use 'mike'.. Additionally squashes related commits providing minor fixes + improvements: - Use a job dependency (`needs`) to avoid `push` event race conditions due to parallel jobs. - Improve workflow file documentation via inline comments. - Make ShellCheck linting happy. - `chown` doesn't seem to work unless on the default branch for CI. Opted to use the docker `--user` approach instead. --- .github/workflows/deploy-docs.yml | 85 +++++++++++++++++-- .../scripts/docs/update-versions-json.sh | 59 +++++++++++++ docs/mkdocs.yml | 7 ++ 3 files changed, 144 insertions(+), 7 deletions(-) create mode 100755 .github/workflows/scripts/docs/update-versions-json.sh diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index 8aeba50a..a721a8ed 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -8,11 +8,18 @@ on: paths: - '.github/workflows/deploy-docs.yml' - 'docs/**' + # Responds to tags being pushed (branches and paths conditions above do not apply to tags). + # Takes a snapshot of the docs from the tag (unaffected by branch or path restraints above), + # Stores build in a subdirectory with name matching the git tag `v.` substring: + tags: + - 'v[0-9]+.[0-9]+*' -# Jobs will run shell commands from this subdirectory: -defaults: - run: - working-directory: docs +env: + # Default docs version to build and deploy: + DOCS_VERSION: edge + # Assign commit authorship to official Github Actions bot when pushing to the `gh-pages` branch: + GIT_USER: 'github-actions[bot]' + GIT_EMAIL: '41898282+github-actions[bot]@users.noreply.github.com' jobs: deploy: @@ -21,13 +28,77 @@ jobs: steps: - uses: actions/checkout@v2 + - name: 'Check if deploy is for a `v.` tag version instead of `edge`' + if: startsWith(github.ref, 'refs/tags/') + working-directory: docs + run: | + DOCS_VERSION=$(grep -oE 'v[0-9]+\.[0-9]+' <<< "${GITHUB_REF}") + echo "DOCS_VERSION=${DOCS_VERSION}" >> "${GITHUB_ENV}" + + # Docs should build referencing the tagged version instead: + sed -i "s|^\(site_url:.*\)edge|\1${DOCS_VERSION}|" mkdocs.yml + - name: 'Build with mkdocs-material via Docker' - run: docker run --rm -v ${PWD}:/docs squidfunk/mkdocs-material build --strict + working-directory: docs + # --user is required for build output file ownership to match the CI user instead of the containers internal user + run: docker run --rm --user "$(id -u):$(id -g)" -v "${PWD}:/docs" squidfunk/mkdocs-material build --strict + + - name: 'If a tagged version, fix canonical links and remove `404.html`' + if: startsWith(github.ref, 'refs/tags/') + working-directory: docs/site + run: | + # 404 is not useful due to how Github Pages implement custom 404 support: + # (Note the edge 404.html isn't useful either as it's not copied to the `gh-pages` branch root) + rm 404.html + + # Replace '${DOCS_VERSION}' (defaults to 'edge') in the 'canonical' link element of HTML files, + # with the tagged docs version: + find . -type f -name "*.html" -exec \ + sed -i "s|^\(.*.` substring from tag name' + id: add-version + continue-on-error: true + working-directory: gh-pages + run: '../.github/workflows/scripts/docs/update-versions-json.sh' + + # If an actual change was made to `versions.json`, commit and push it. + # Otherwise the step is skipped instead of reporting job failure. + - name: 'Push update for `versions.json`' + if: ${{ steps.add-version.outcome == 'success' }} + working-directory: gh-pages + run: | + git config user.name ${{ env.GIT_USER }} + git config user.email ${{ env.GIT_EMAIL }} + git add versions.json + git commit -m "chore: Add ${{ env.DOCS_VERSION }} to version selector list" + git push diff --git a/.github/workflows/scripts/docs/update-versions-json.sh b/.github/workflows/scripts/docs/update-versions-json.sh new file mode 100755 index 00000000..6c27dc85 --- /dev/null +++ b/.github/workflows/scripts/docs/update-versions-json.sh @@ -0,0 +1,59 @@ +#!/bin/bash + +# CI ENV `GITHUB_REF` from Github Actions CI provides the tag or branch that triggered the build +# See `github.ref`: https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context +# https://docs.github.com/en/actions/reference/environment-variables +function _update-versions-json { + # Extract the version tag, truncate `` version and any suffix beyond it. + local MAJOR_MINOR + MAJOR_MINOR=$(grep -oE 'v[0-9]+\.[0-9]+' <<< "${GITHUB_REF}") + # Github Actions CI method for exporting ENV vars to share across a jobs steps + # https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable + echo "DOCS_VERSION=${MAJOR_MINOR}" >> "${GITHUB_ENV}" + + if [[ -z "${MAJOR_MINOR}" ]] + then + echo "Could not extract valid \`v.\` substring, exiting.." + exit 1 + fi + + local VERSIONS_JSON='versions.json' + local IS_VALID + IS_VALID=$(jq '.' "${VERSIONS_JSON}") + + if [[ ! -f "${VERSIONS_JSON}" ]] || [[ -z "${IS_VALID}" ]] + then + echo "'${VERSIONS_JSON}' doesn't exist or is invalid. Creating.." + echo '[{"version": "edge", "title": "edge", "aliases": []}]' > "${VERSIONS_JSON}" + fi + + + # Only add this tag version the first time it's encountered: + local VERSION_EXISTS + VERSION_EXISTS=$(jq --arg version "${MAJOR_MINOR}" '[.[].version == $version] | any' "${VERSIONS_JSON}") + + if [[ "${VERSION_EXISTS}" == "true" ]] + then + echo "${MAJOR_MINOR} docs are already supported. Nothing to change, exiting.." + exit 1 + else + echo "Added support for ${MAJOR_MINOR} docs." + # Add any logic here if you want the version selector to have a different label (`title`) than the `version` URL/subdirectory. + local TITLE=${TITLE:-${MAJOR_MINOR}} + + # Assumes the first element is always the "latest" unreleased version (`edge` for us), and then newest version to oldest. + # `jq` takes the first array element of array as slice, concats with new element, then takes the slice of remaining original elements to concat. + # Thus assumes this script is always triggered by newer versions, no older major/minor releases as our build workflow isn't setup to support rebuilding older docs. + local UPDATED_JSON + UPDATED_JSON=$(jq --arg version "${MAJOR_MINOR}" --arg title "${TITLE}" \ + '.[:1] + [{version: $version, title: $title, aliases: []}] + .[1:]' \ + "${VERSIONS_JSON}" + ) + + # See `jq` FAQ advising this approach to update file: + # https://github.com/stedolan/jq/wiki/FAQ + echo "${UPDATED_JSON}" > tmp.json && mv tmp.json "${VERSIONS_JSON}" + fi +} + +_update-versions-json diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 8fd516b7..c5eb1b00 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -17,6 +17,13 @@ theme: - navigation.tabs - navigation.expand +# We do not use `mike`, but enabling this will enable the version selector UI. +# It references `versions.json` on `gh-pages` branch, +# however we have a basic setup that only matches `version` to a subdirectory. +extra: + version: + provider: mike + markdown_extensions: - toc: permalink: ⚓︎ From f13df19b874e56ae3a2c5c95a1660d98e4111c98 Mon Sep 17 00:00:00 2001 From: polarathene <5098581+polarathene@users.noreply.github.com> Date: Thu, 11 Mar 2021 16:49:43 +1300 Subject: [PATCH 05/14] docs(styles): Add external link icon workaround Adds some third-party CSS as`mkdocs-material` doesn't seem interested in a PR to upstream this feature to the community. --- Uses a font icon approach for the external link as alternatives like SVG was reported in PR as breaking on Chrome. The logo has been made larger than theme default, it needs a little push from the left to align well with the tabs below it. --- Unrelated: Additionally experiment with the Instant Navigation feature. --- docs(styles): Various improvements Multiple related commits from original PR have been squashed into this. Some messages may be redundant due to loss of history. --- docs(styles): Minor improvements - Use relative path for external-link - UI enhancement for version selector - Improve inline documentation for `customizations.css` Make separate styling sections more evident (since we're not using multiple files or build tools). --- docs(styles): Replace permalink to fix UX bug --- docs(styles): Replace permalink feature for alternative approach Previous commit already switched `permalink` for `anchorlink` option, but the `#` symbol had UI concerns regarding font-size/scale and fitting into the gutter. Gutter change reverted, switch to REM units and symbol replaced by thin vertical rectangle scaled by font height, far better consistency for placement. --- docs(styles): Refactor the heading link style Effectively ended up making a border-left line style, just not as consistent and more complicated. Fixed that by adjusting styles. Adds optional background fill and restores inline code style for headings. --- docs/content/assets/css/customizations.css | 84 +++++++++++++++++++ docs/content/assets/fonts/external-link.woff | Bin 0 -> 1008 bytes docs/mkdocs.yml | 6 +- 3 files changed, 89 insertions(+), 1 deletion(-) create mode 100644 docs/content/assets/css/customizations.css create mode 100644 docs/content/assets/fonts/external-link.woff diff --git a/docs/content/assets/css/customizations.css b/docs/content/assets/css/customizations.css new file mode 100644 index 00000000..53fee32d --- /dev/null +++ b/docs/content/assets/css/customizations.css @@ -0,0 +1,84 @@ +/* This file adds our styling additions / fixes to maintain. */ + +/* ============================================================================================================= */ + +/* External Link icon feature. Rejected from upstreaming to `mkdocs-material`. +Alternative solution using SVG icon here (Broken on Chrome?): https://github.com/squidfunk/mkdocs-material/issues/2318#issuecomment-789461149 +Tab or Nav sidebar with non-relative links will prepend an icon (font glyph) +If you want to append instead, switch `::before` to `::after`. +*/ +/* reference the icon font to use */ +@font-face { + font-family: 'external-link'; + src: url('../fonts/external-link.woff') format('woff'); +} + +/* Matches the two nav link classes that start with `http` `href` values, regular docs pages use relative URLs instead. */ +.md-tabs__link[href^="http"]::before, .md-nav__link[href^="http"]::before { + display: inline-block; /* treat similar to text */ + font-family: 'external-link'; + content:'\0041'; /* represents "A" which our font renders as an icon instead of the "A" glyph */ + font-size: 80%; /* icon is a little too big by default, scale it down */ +} + +/* ============================================================================================================= */ + +/* UI Improvement: Header bar (top of page) adjustments - Increase scale of logo and adjust white-space */ +/* Make the logo larger without impacting other header components */ +.md-header__button.md-logo > img { transform: scale(180%); margin-left: 0.4rem; } +/* Reduce the white-space between the Logo and Title components */ +.md-header__title { margin-left: 0.3rem; } + +/* ============================================================================================================= */ + +/* UI Improvement: Add light colour bg for the version selector, with some rounded corners */ +.md-version__current { + background-color: rgb(255,255,255,0.18); /* white with 18% opacity */ + padding: 5px; + border-radius: 3px; +} + +/* ============================================================================================================= */ + +/* + UX Bugfix for permalink affecting typography in headings. + Upstream will not fix: https://github.com/squidfunk/mkdocs-material/issues/2369 +*/ + +/* Headings are configured to be links (instead of only the permalink symbol), removes the link colour */ +div.md-content article.md-content__inner a.toclink { + color: currentColor; +} + +/* Instead of a permalink symbol at the end of heading text, use a border line on the left spanning height of heading */ +/* Includes optional background fill with rounded right-side corners, and restores inline code style */ +/* NOTE: Headings with markdown links embedded disrupt the bg fill style, as they're not children of `a.toclink` element */ +div.md-content article.md-content__inner a.toclink { + display: inline-block; /* Enables multi-line support for both border and bg color */ + border-left: .2rem solid transparent; /* transparent placeholder to avoid heading shift during reveal transition */ + margin-left: -0.6rem; /* Offset heading to the left */ + padding-left: 0.4rem; /* Push heading back to original position, margin-left - border-left widths */ + transition: background-color 200ms,border-left 200ms; + + /* Only relevant if using background highlight style */ + border-radius: 0 0.25rem 0.25rem 0; + padding-right: 0.4rem; +} + +div.md-content article.md-content__inner a.toclink:hover, +div.md-content article.md-content__inner :target > a.toclink { + border-left: .2rem solid #448aff; /* highlight line on the left */ + background-color: #b3dbff6e; /* background highlight fill */ + transition: background-color 200ms,border-left 200ms; +} + +/* Upstream overrides some of the `code` element styles for headings, restore them */ +div.md-content article.md-content__inner a.toclink code { + padding: 0 0.3em; /* padding to the left and right, not top and bottom */ + border-radius: 0.2rem; /* 0.1rem of original style bit too small */ + background-color: var(--md-code-bg-color); +} + +.highlight.no-copy .md-clipboard { display: none; } + +/* ============================================================================================================= */ diff --git a/docs/content/assets/fonts/external-link.woff b/docs/content/assets/fonts/external-link.woff new file mode 100644 index 0000000000000000000000000000000000000000..6e888e08eb8c9d68a544cb12a2a6a303ad4783cb GIT binary patch literal 1008 zcmXT-cXMN4WB>x@4-8x&nk@&y2eDCsf3Ut0P~-~`+W~P{*w$p@iE&7HoVeGWu_LPA+1V@RsCEZ( zH91JM{J(kRUS08I(~X-<15|h>7Q}1S+|Djx>3?w1$}7K=b7^l{LR(|L$ArnxeJo=; zC(NJl+xkVo_Pe~(AFYr)UCk~Xj=u^DtXHga=FO8jg7$-}_6 zm=PG;6?1C)z5Nawh`6r*?YyOlk%Mh+f}sP`l`qN%7X&X!V+&%RYv2{V+}^xTXnU6V z0l5eU?L^rPjAjQ_zp8lTu1TL?Ui0+{gT-NUma_Y-*~gjG-;~815L_oK{xV;7`icI& z(<>gHENuOEvrzPVMQO}o%X=1%Q~GY+eRy}HgY5i1Zi}PSA1nRse=PKB(VHDT-i1$h zIQ@UHqpPu^Fy?UYj}M_sCLLI{Q6_Kc`t2XDta8cS;o6w@B67=%)hE5!E2n3(X?dor zP0C$A_4Ce)FRLzXG@Fu`G;LG5(&{Z{Mt)~vde@k5HG5|^d*SDMCv+Y VJ+?Ot8s|BJm>C$aF$e)80|54Ca) Date: Mon, 1 Mar 2021 23:41:19 +1300 Subject: [PATCH 06/14] docs(refactor): Large refactor + additions + fixes Consistency pass, formatting cleanup and fixes, introduce admonitions, add front-matter. --- docs: Add front-matter --- docs: Fix and format links - Some links were invalid (eg files moved or renamed) - Some were valid but had invalid section headers (content removed or migrated) - Some use `http://` instead of `https://` when the website supports a secure connection. - Some already used the `[name][reference]` convention but often with a number that wasn't as useful for maintenance. - All referenced docs needed URLs replaced. Opted for the `[name][reference]` approach to group them all clearly at the bottom of the doc, especially with the relative URLs and in some cases many duplicate entries. - All `tomav` references from the original repo prior to switch to an organization have been corrected. - Minor cosmetic changes to the `name` part of the URL, such as for referencing issues to be consistent. - Some small changes to text body, usually due to duplicate URL reference that was unnecessary (open relay, youtous) - Switched other links to use the `[name][reference]` format when there was a large group of URLs such as wikipedia or kubernetes. Github repos that reference projects related to `docker-mailserver` also got placed here so they're noticed better by maintainers. This also helped quite a bit with `mermaid` external links that are very long. - There was a Github Wiki supported syntax in use `[[name | link]]` for `fetchmail` page that isn't compatible by default with MkDocs (needs a plugin), converted to `[name][reference]` instead since it's a relative link. --- docs: Update commit link for LDAP override script Logic moved to another file, keeping the permalink commit reference so it's unaffected by any changes in the file referenced in future. --- docs: Heading corrections Consistency pass. Helps with the Table of Contents (top-right UI) aka Document Outline. docs: codefence cleanup --- docs: misc cleanup --- docs: Add Admonitions Switches `
` usage for collapsible admonitions (`???`) while other text content is switched to the visually more distinct admoniton (`!!!` or `???+`) style. This does affect editor syntax highlighting a bit and markdown linting as it's custom non-standard markdown syntax. --- docs/content/advanced/auth-ldap.md | 40 +- docs/content/advanced/full-text-search.md | 72 +-- docs/content/advanced/ipv6.md | 16 +- docs/content/advanced/kubernetes.md | 176 +++---- docs/content/advanced/mail-fetchmail.md | 64 ++- .../advanced/mail-forwarding/aws-ses.md | 31 +- .../advanced/mail-forwarding/relay-hosts.md | 51 +- docs/content/advanced/mail-sieve.md | 42 +- .../maintenance/update-and-cleanup.md | 16 +- docs/content/advanced/optional-config.md | 78 ++- .../advanced/override-defaults/dovecot.md | 53 +- .../advanced/override-defaults/postfix.md | 22 +- .../config/best-practices/autodiscover.md | 10 +- docs/content/config/best-practices/dkim.md | 43 +- docs/content/config/best-practices/dmarc.md | 13 +- docs/content/config/best-practices/spf.md | 38 +- docs/content/config/pop3.md | 23 +- docs/content/config/security/fail2ban.md | 38 +- docs/content/config/security/ssl.md | 491 ++++++++++-------- .../security/understanding-the-ports.md | 89 ++-- docs/content/config/setup.sh.md | 16 +- .../config/troubleshooting/debugging.md | 54 +- docs/content/config/troubleshooting/faq.md | 272 ++++++---- .../config/user-management/accounts.md | 33 +- .../content/config/user-management/aliases.md | 25 +- docs/content/index.md | 29 +- docs/content/introduction.md | 94 +++- .../tutorials/installation-examples.md | 436 ++++++++-------- ...nly-mailserver-with-ldap-authentication.md | 20 +- docs/mkdocs.yml | 11 + 30 files changed, 1369 insertions(+), 1027 deletions(-) diff --git a/docs/content/advanced/auth-ldap.md b/docs/content/advanced/auth-ldap.md index e602240c..8e0f4eb7 100644 --- a/docs/content/advanced/auth-ldap.md +++ b/docs/content/advanced/auth-ldap.md @@ -1,4 +1,8 @@ -### Introduction +--- +title: 'LDAP Authentication' +--- + +## Introduction Getting started with ldap and this mailserver we need to take 3 parts in account: @@ -6,9 +10,10 @@ Getting started with ldap and this mailserver we need to take 3 parts in account * DOVECOT * SASLAUTHD (this can also be handled by dovecot above) -### List with the variables to control the container provisioning +## Variables to Control Provisioning by the Container __POSTFIX__: + * `LDAP_QUERY_FILTER_USER` * `LDAP_QUERY_FILTER_GROUP` * `LDAP_QUERY_FILTER_ALIAS` @@ -19,14 +24,16 @@ __SASLAUTHD__: * `SASLAUTHD_LDAP_FILTER` __DOVECOT__: + * `DOVECOT_USER_FILTER` * `DOVECOT_PASS_FILTER` +!!! note + This page will provide several use cases like recipes to show, how this project can be used with it's LDAP Features. -**NOTE**: This page will provide several use cases like recipes to show, how this project can be used with it's LDAP Features. +## LDAP Setup - Kopano / Zarafa -### Ldap Setup - Kopano/Zarafa -```yml +```yaml --- version: '2' @@ -55,7 +62,7 @@ services: - ENABLE_CLAMAV=1 - ENABLE_FAIL2BAN=1 - ENABLE_POSTGREY=1 - - SASLAUTHD_PASSWD= + - SASLAUTHD_PASSWD= # >>> SASL Authentication - ENABLE_SASLAUTHD=1 @@ -100,19 +107,18 @@ volumes: driver: local ``` -If your directory has not the postfix-book schema installed, then you must change the internal attribute handling for dovecot. For this you have to change the ```pass_attr``` and the ```user_attr``` mapping, as shown in the example below: +If your directory has not the postfix-book schema installed, then you must change the internal attribute handling for dovecot. For this you have to change the `pass_attr` and the `user_attr` mapping, as shown in the example below: -```yml - - DOVECOT_PASS_ATTR==user,=password - - DOVECOT_USER_ATTR==home,=mail,=uid, =gid +```yaml +- DOVECOT_PASS_ATTR==user,=password +- DOVECOT_USER_ATTR==home,=mail,=uid, =gid ``` -The following example illustrates this for a directory that has the qmail-schema installed and that uses ```uid```: +The following example illustrates this for a directory that has the qmail-schema installed and that uses `uid`: -```yml - - DOVECOT_PASS_ATTRS=uid=user,userPassword=password - - DOVECOT_USER_ATTRS=homeDirectory=home,qmailUID=uid,qmailGID=gid,mailMessageStore=mail - - DOVECOT_PASS_FILTER=(&(objectClass=qmailUser)(uid=%u)(accountStatus=active)) - - DOVECOT_USER_FILTER=(&(objectClass=qmailUser)(uid=%u)(accountStatus=active)) +```yaml +- DOVECOT_PASS_ATTRS=uid=user,userPassword=password +- DOVECOT_USER_ATTRS=homeDirectory=home,qmailUID=uid,qmailGID=gid,mailMessageStore=mail +- DOVECOT_PASS_FILTER=(&(objectClass=qmailUser)(uid=%u)(accountStatus=active)) +- DOVECOT_USER_FILTER=(&(objectClass=qmailUser)(uid=%u)(accountStatus=active)) ``` - diff --git a/docs/content/advanced/full-text-search.md b/docs/content/advanced/full-text-search.md index b4ec6f6a..2a73507c 100644 --- a/docs/content/advanced/full-text-search.md +++ b/docs/content/advanced/full-text-search.md @@ -1,3 +1,7 @@ +--- +title: 'Full-Text Search' +--- + ## Overview Full-text search allows all messages to be indexed, so that mail clients can quickly and efficiently search messages by their full text content. @@ -6,49 +10,49 @@ The [dovecot-solr Plugin](https://wiki2.dovecot.org/Plugins/FTS/Solr) is used in ## Setup Steps -1. docker-compose.yml: +1. `docker-compose.yml`: + + ```yaml + solr: + image: lmmdock/dovecot-solr:latest + volumes: + - solr-dovecot:/opt/solr/server/solr/dovecot + restart: always + + mailserver: + image: tvial/docker-mailserver:latest + ... + volumes: + ... + - ./etc/dovecot/conf.d/10-plugin.conf:/etc/dovecot/conf.d/10-plugin.conf:ro + ... -``` - solr: - image: lmmdock/dovecot-solr:latest volumes: - - solr-dovecot:/opt/solr/server/solr/dovecot - restart: always - - mailserver: - image: tvial/docker-mailserver:latest - ... - volumes: - ... - - ./etc/dovecot/conf.d/10-plugin.conf:/etc/dovecot/conf.d/10-plugin.conf:ro - ... - -volumes: - solr-dovecot: - driver: local - -``` + solr-dovecot: + driver: local + ``` 2. `etc/dovecot/conf.d/10-plugin.conf`: -``` -mail_plugins = $mail_plugins fts fts_solr -plugin { - fts = solr - fts_autoindex = yes - fts_solr = url=http://solr:8983/solr/dovecot/ -} -``` + ```conf + mail_plugins = $mail_plugins fts fts_solr + + plugin { + fts = solr + fts_autoindex = yes + fts_solr = url=http://solr:8983/solr/dovecot/ + } + ``` 3. Start the solr container: `docker-compose up -d --remove-orphans solr` 4. Restart the mailserver container: `docker-compose restart mailserver` -5. Flag all user mailbox FTS indexes as invalid, so they are rescanned on demand when they are next searched -``` -docker-compose exec mailserver doveadm fts rescan -A -``` +5. Flag all user mailbox FTS indexes as invalid, so they are rescanned on demand when they are next searched: `docker-compose exec mailserver doveadm fts rescan -A` -## Further discussion -See [issue #905](https://github.com/tomav/docker-mailserver/issues/905) \ No newline at end of file +## Further Discussion + +See [#905][github-issue-905] + +[github-issue-905]: https://github.com/docker-mailserver/docker-mailserver/issues/905 diff --git a/docs/content/advanced/ipv6.md b/docs/content/advanced/ipv6.md index 4a00485e..c5ec5fb1 100644 --- a/docs/content/advanced/ipv6.md +++ b/docs/content/advanced/ipv6.md @@ -1,6 +1,10 @@ +--- +title: 'IPv6' +--- + ## Background -If your container host supports IPv6, then `docker-mailserver` will automatically accept IPv6 connections by way of the docker host's IPv6. However, incoming mail will fail SPF checks because they will appear to come from the IPv4 gateway that docker is using to proxy the IPv6 connection (172.20.0.1 is the gateway). +If your container host supports IPv6, then `docker-mailserver` will automatically accept IPv6 connections by way of the docker host's IPv6. However, incoming mail will fail SPF checks because they will appear to come from the IPv4 gateway that docker is using to proxy the IPv6 connection (`172.20.0.1` is the gateway). This can be solved by supporting IPv6 connections all the way to the `docker-mailserver` container. @@ -11,9 +15,9 @@ This can be solved by supporting IPv6 connections all the way to the `docker-mai @@ -1,4 +1,4 @@ -version: '2' +version: '2.1' - + @@ -32,6 +32,16 @@ services: - + + ipv6nat: + image: robbertkl/ipv6nat + restart: always @@ -37,6 +41,8 @@ This can be solved by supporting IPv6 connections all the way to the `docker-mai + gateway: fd00:0123:4567::1 ``` -## Further discussion +## Further Discussion -See [issue #1438](https://github.com/tomav/docker-mailserver/issues/1438) \ No newline at end of file +See [#1438][github-issue-1438] + +[github-issue-1438]: https://github.com/docker-mailserver/docker-mailserver/issues/1438 diff --git a/docs/content/advanced/kubernetes.md b/docs/content/advanced/kubernetes.md index ecd24ef1..74a3bc31 100644 --- a/docs/content/advanced/kubernetes.md +++ b/docs/content/advanced/kubernetes.md @@ -1,13 +1,17 @@ -## Deployment example +--- +title: 'Kubernetes' +--- -There is nothing much in deploying mailserver to Kubernetes itself. The things are pretty same as in [`docker-compose.yml`][1], but with Kubernetes syntax. +## Deployment Example + +There is nothing much in deploying mailserver to Kubernetes itself. The things are pretty same as in [`docker-compose.yml`][github-file-compose], but with Kubernetes syntax. ```yaml apiVersion: v1 kind: Namespace metadata: name: mailserver ---- +--- kind: ConfigMap apiVersion: v1 metadata: @@ -62,7 +66,7 @@ data: TrustedHosts: | 127.0.0.1 localhost - + #user-patches.sh: | # #!/bin/bash @@ -224,27 +228,24 @@ spec: claimName: mail-storage - name: tmp-files emptyDir: {} - ``` -__Note:__ -Any sensitive data (keys, etc) should be deployed via [Secrets][50]. Other configuration just fits well into [ConfigMaps][51]. +!!! note + Any sensitive data (keys, etc) should be deployed via [Secrets][k8s-config-secret]. Other configuration just fits well into [ConfigMaps][k8s-config-pod]. -__Note:__ -Make sure that [Pod][52] is [assigned][59] to specific [Node][53] in case you're using volume for data directly with `hostPath`. Otherwise Pod can be rescheduled on a different Node and previous data won't be found. Except the case when you're using some shared filesystem on your Nodes. +!!! note + Make sure that [Pod][k8s-workload-pod] is [assigned][k8s-assign-pod-node] to specific [Node][k8s-nodes] in case you're using volume for data directly with `hostPath`. Otherwise Pod can be rescheduled on a different Node and previous data won't be found. Except the case when you're using some shared filesystem on your Nodes. - - - -## Exposing to outside world +## Exposing to the Outside World The hard part with Kubernetes is to expose deployed mailserver to outside world. Kubernetes provides multiple ways for doing that. Each has its downsides and complexity. -The major problem with exposing mailserver to outside world in Kubernetes is to [preserve real client IP][57]. Real client IP is required by mailserver for performing IP-based SPF checks and spam checks. +The major problem with exposing mailserver to outside world in Kubernetes is to [preserve real client IP][k8s-service-source-ip]. Real client IP is required by mailserver for performing IP-based SPF checks and spam checks. -Preserving real client IP is relatively [non-trivial in Kubernetes][57] and most exposing ways do not provide it. So, it's up to you to decide which exposing way suits better your needs in a price of complexity. +Preserving real client IP is relatively [non-trivial in Kubernetes][k8s-service-source-ip] and most exposing ways do not provide it. So, it's up to you to decide which exposing way suits better your needs in a price of complexity. + +If you do not require SPF checks for incoming mails you may disable them in [Postfix configuration][docs-postfix] by dropping following line (which removes `check_policy_service unix:private/policyd-spf` option): -If you do not require SPF checks for incoming mails you may disable them in [Postfix configuration][2] by dropping following line (which removes `check_policy_service unix:private/policyd-spf` option): ```yaml kind: ConfigMap apiVersion: v1 @@ -264,18 +265,16 @@ apiVersion: extensions/v1beta1 metadata: name: mailserver # ... - volumeMounts: - - name: config - subPath: postfix-main.cf - mountPath: /tmp/docker-mailserver/postfix-main.cf - readOnly: true -# ... + volumeMounts: + - name: config + subPath: postfix-main.cf + mountPath: /tmp/docker-mailserver/postfix-main.cf + readOnly: true ``` - ### External IPs Service -The simplest way is to expose mailserver as a [Service][55] with [external IPs][56]. +The simplest way is to expose mailserver as a [Service][k8s-network-service] with [external IPs][k8s-network-external-ip]. ```yaml kind: Service @@ -292,29 +291,27 @@ spec: port: 25 targetPort: smtp # ... - externalIPs: - - 80.11.12.10 + externalIPs: + - 80.11.12.10 ``` -##### Downsides +**Downsides** - __Real client IP is not preserved__, so SPF check of incoming mail will fail. - Requirement to specify exposed IPs explicitly. - ### Proxy port to Service -The [Proxy Pod][58] helps to avoid necessity of specifying external IPs explicitly. This comes in price of complexity: you must deploy Proxy Pod on each [Node][53] you want to expose mailserver on. +The [Proxy Pod][k8s-proxy-service] helps to avoid necessity of specifying external IPs explicitly. This comes in price of complexity: you must deploy Proxy Pod on each [Node][k8s-nodes] you want to expose mailserver on. -##### Downsides +**Downsides** - __Real client IP is not preserved__, so SPF check of incoming mail will fail. - ### Bind to concrete Node and use host network -The simplest way to preserve real client IP is to use `hostPort` and `hostNetwork: true` in the mailserver [Pod][52]. This comes in price of availability: you can talk to mailserver from outside world only via IPs of [Node][53] where mailserver is deployed. +The simplest way to preserve real client IP is to use `hostPort` and `hostNetwork: true` in the mailserver [Pod][k8s-workload-pod]. This comes in price of availability: you can talk to mailserver from outside world only via IPs of [Node][k8s-nodes] where mailserver is deployed. ```yaml kind: Deployment @@ -326,7 +323,7 @@ metadata: hostNetwork: true # ... containers: -# ... +# ... ports: - name: smtp containerPort: 25 @@ -340,31 +337,32 @@ metadata: # ... ``` -##### Downsides +**Downsides** - Not possible to access mailserver via other cluster Nodes, only via the one mailserver deployed at. - Every Port within the Container is exposed on the Host side, regardless of what the `ports` section in the Configuration defines. - -### Proxy port to Service via PROXY protocol +### Proxy Port to Service via PROXY Protocol This way is ideologically the same as [using Proxy Pod](#proxy-port-to-service), but instead of a separate proxy pod, you configure your ingress to proxy TCP traffic to the mailserver pod using the PROXY protocol, which preserves the real client IP. -#### Configure your ingress -With an [NGINX ingress controller][12], set `externalTrafficPolicy: Local` for its service, and add the following to the TCP services config map (as described [here][13]): +#### Configure your Ingress + +With an [NGINX ingress controller][k8s-nginx], set `externalTrafficPolicy: Local` for its service, and add the following to the TCP services config map (as described [here][k8s-nginx-expose]): + ```yaml -# ... - 25: "mailserver/mailserver:25::PROXY" - 465: "mailserver/mailserver:465::PROXY" - 587: "mailserver/mailserver:587::PROXY" - 993: "mailserver/mailserver:993::PROXY" -# ... +25: "mailserver/mailserver:25::PROXY" +465: "mailserver/mailserver:465::PROXY" +587: "mailserver/mailserver:587::PROXY" +993: "mailserver/mailserver:993::PROXY" ``` -With [HAProxy][11], the configuration should look similar to the above. If you know what it actually looks like, add an example here. :) +With [HAProxy][dockerhub-haproxy], the configuration should look similar to the above. If you know what it actually looks like, add an example here. :smiley: + +#### Configure the Mailserver + +Then, configure both [Postfix][docs-postfix] and [Dovecot][docs-dovecot] to expect the PROXY protocol: -#### Configure the mailserver -Then, configure both [Postfix][2] and [Dovecot][3] to expect the PROXY protocol: ```yaml kind: ConfigMap apiVersion: v1 @@ -379,7 +377,8 @@ data: submission/inet/smtpd_upstream_proxy_protocol=haproxy smtps/inet/smtpd_upstream_proxy_protocol=haproxy dovecot.cf: | - haproxy_trusted_networks = 10.0.0.0/8, 127.0.0.0/8 # Assuming your ingress controller is bound to 10.0.0.0/8 + # Assuming your ingress controller is bound to 10.0.0.0/8 + haproxy_trusted_networks = 10.0.0.0/8, 127.0.0.0/8 service imap-login { inet_listener imaps { haproxy = yes @@ -410,18 +409,15 @@ spec: subPath: dovecot.cf mountPath: /tmp/docker-mailserver/dovecot.cf readOnly: true -# ... ``` -##### Downsides +**Downsides** - Not possible to access mailserver via inner cluster Kubernetes DNS, as PROXY protocol is required for incoming connections. +## Let's Encrypt Certificates - -## Let's Encrypt certificates - -[Kube-Lego][10] may be used for a role of Let's Encrypt client. It works with Kubernetes [Ingress Resources][54] and automatically issues/manages certificates/keys for exposed services via Ingresses. +[Kube-Lego][kube-lego] may be used for a role of Let's Encrypt client. It works with Kubernetes [Ingress Resources][k8s-network-ingress] and automatically issues/manages certificates/keys for exposed services via Ingresses. ```yaml kind: Ingress @@ -447,49 +443,43 @@ spec: - example.com ``` -Now, you can use Let's Encrypt cert and key from `mailserver.tls` [Secret][50] -in your [Pod][52] spec. +Now, you can use Let's Encrypt cert and key from `mailserver.tls` [Secret][k8s-config-secret] in your [Pod][k8s-workload-pod] spec: ```yaml # ... - env: - - name: SSL_TYPE - value: 'manual' - - name: SSL_CERT_PATH - value: '/etc/ssl/mailserver/tls.crt' - - name: SSL_KEY_PATH - value: '/etc/ssl/mailserver/tls.key' +env: + - name: SSL_TYPE + value: 'manual' + - name: SSL_CERT_PATH + value: '/etc/ssl/mailserver/tls.crt' + - name: SSL_KEY_PATH + value: '/etc/ssl/mailserver/tls.key' # ... - volumeMounts: - - name: tls - mountPath: /etc/ssl/mailserver - readOnly: true -# ... - volumes: - - name: tls - secret: - secretName: mailserver.tls +volumeMounts: + - name: tls + mountPath: /etc/ssl/mailserver + readOnly: true # ... +volumes: + - name: tls + secret: + secretName: mailserver.tls ``` - - - - -[1]: https://github.com/tomav/docker-mailserver/blob/master/docker-compose.yml.dist -[2]: https://github.com/tomav/docker-mailserver/wiki/Overwrite-Default-Postfix-Configuration -[3]: https://github.com/tomav/docker-mailserver/wiki/Override-Default-Dovecot-Configuration -[10]: https://github.com/jetstack/kube-lego -[11]: https://hub.docker.com/_/haproxy -[12]: https://kubernetes.github.io/ingress-nginx/ -[13]: https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services/ -[50]: https://kubernetes.io/docs/concepts/configuration/secret -[51]: https://kubernetes.io/docs/tasks/configure-pod-container/configmap -[52]: https://kubernetes.io/docs/concepts/workloads/pods/pod -[53]: https://kubernetes.io/docs/concepts/architecture/nodes -[54]: https://kubernetes.io/docs/concepts/services-networking/ingress -[55]: https://kubernetes.io/docs/concepts/services-networking/service -[56]: https://kubernetes.io/docs/concepts/services-networking/service/#external-ips -[57]: https://kubernetes.io/docs/tutorials/services/source-ip -[58]: https://github.com/kubernetes/contrib/tree/master/for-demos/proxy-to-service -[59]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node +[docs-dovecot]: ./override-defaults/dovecot.md +[docs-postfix]: ./override-defaults/postfix.md +[github-file-compose]: https://github.com/docker-mailserver/docker-mailserver/blob/master/docker-compose.yml +[dockerhub-haproxy]: https://hub.docker.com/_/haproxy +[kube-lego]: https://github.com/jetstack/kube-lego +[k8s-assign-pod-node]: https://kubernetes.io/docs/concepts/configuration/assign-pod-node +[k8s-config-pod]: https://kubernetes.io/docs/tasks/configure-pod-container/configmap +[k8s-config-secret]: https://kubernetes.io/docs/concepts/configuration/secret +[k8s-nginx]: https://kubernetes.github.io/ingress-nginx +[k8s-nginx-expose]: https://kubernetes.github.io/ingress-nginx/user-guide/exposing-tcp-udp-services +[k8s-network-ingress]: https://kubernetes.io/docs/concepts/services-networking/ingress +[k8s-network-service]: https://kubernetes.io/docs/concepts/services-networking/service +[k8s-network-external-ip]: https://kubernetes.io/docs/concepts/services-networking/service/#external-ips +[k8s-nodes]: https://kubernetes.io/docs/concepts/architecture/nodes +[k8s-proxy-service]: https://github.com/kubernetes/contrib/tree/master/for-demos/proxy-to-service +[k8s-service-source-ip]: https://kubernetes.io/docs/tutorials/services/source-ip +[k8s-workload-pod]: https://kubernetes.io/docs/concepts/workloads/pods/pod diff --git a/docs/content/advanced/mail-fetchmail.md b/docs/content/advanced/mail-fetchmail.md index 596056db..30aa6208 100644 --- a/docs/content/advanced/mail-fetchmail.md +++ b/docs/content/advanced/mail-fetchmail.md @@ -1,16 +1,18 @@ -To enable the [fetchmail](http://www.fetchmail.info) service to retrieve e-mails set the environment variable `ENABLE_FETCHMAIL` to `1`. Your `docker-compose.yml` file should look like following snippet: +--- +title: 'Email Gathering with Fetchmail' +--- + +To enable the [fetchmail][fetchmail-website] service to retrieve e-mails set the environment variable `ENABLE_FETCHMAIL` to `1`. Your `docker-compose.yml` file should look like following snippet: ```yaml -... environment: - ENABLE_FETCHMAIL=1 - FETCHMAIL_POLL=300 -... ``` Generate a file called `fetchmail.cf` and place it in the `config` folder. Your `docker-mailserver` folder should look like this example: -``` +```txt ├── config │   ├── dovecot.cf │   ├── fetchmail.cf @@ -20,56 +22,59 @@ Generate a file called `fetchmail.cf` and place it in the `config` folder. Your └── README.md ``` -# Configuration +## Configuration -A detailed description of the configuration options can be found in the [online version of the manual page](http://www.fetchmail.info/fetchmail-man.html). +A detailed description of the configuration options can be found in the [online version of the manual page][fetchmail-docs]. -## Example IMAP configuration +### Example IMAP Configuration -``` +```fetchmailrc poll 'imap.example.com' proto imap - user 'username' - pass 'secret' - is 'user1@domain.tld' - ssl + user 'username' + pass 'secret' + is 'user1@domain.tld' + ssl ``` -## Example POP3 configuration +### Example POP3 Configuration -``` +```fetchmailrc poll 'pop3.example.com' proto pop3 - user 'username' - pass 'secret' - is 'user2@domain.tld' - ssl + user 'username' + pass 'secret' + is 'user2@domain.tld' + ssl ``` -__IMPORTANT__: Don’t forget the last line: e. g. `is 'user1@domain.tld'`. After `is` you have to specify one email address from the configuration file `config/postfix-accounts.cf`. +!!! caution + Don’t forget the last line: eg: `is 'user1@domain.tld'`. After `is` you have to specify one email address from the configuration file `config/postfix-accounts.cf`. -More details how to configure fetchmail can be found in the [fetchmail man page in the chapter “The run control file”](http://www.fetchmail.info/fetchmail-man.html#31). +More details how to configure fetchmail can be found in the [fetchmail man page in the chapter “The run control file”][fetchmail-docs-run]. -## Polling interval +### Polling Interval -By default the fetchmail service searches every 5 minutes for new mails on your external mail accounts. You can override this default value by changing the ENV variable `FETCHMAIL_POLL`. +By default the fetchmail service searches every 5 minutes for new mails on your external mail accounts. You can override this default value by changing the ENV variable `FETCHMAIL_POLL`: ```yaml +environment: - FETCHMAIL_POLL=60 ``` + You must specify a numeric argument which is a polling interval in seconds. The example above polls every minute for new mails. -# Debugging +## Debugging To debug your `fetchmail.cf` configuration run this command: -``` +```sh ./setup.sh debug fetchmail ``` -For more informations about the configuration script `setup.sh` [[read the corresponding wiki page|Setup-docker-mailserver-using-the-script-setup.sh]]. +For more informations about the configuration script `setup.sh` [read the corresponding docs][docs-setup]. Here a sample output of `./setup.sh debug fetchmail`: -``` +```log fetchmail: 6.3.26 querying outlook.office365.com (protocol POP3) at Mon Aug 29 22:11:09 2016: poll started Trying to connect to 132.245.48.18/995...connected. fetchmail: Server certificate: @@ -107,4 +112,9 @@ fetchmail: POP3> QUIT fetchmail: POP3< +OK Microsoft Exchange Server 2016 POP3 server signing off. fetchmail: 6.3.26 querying outlook.office365.com (protocol POP3) at Mon Aug 29 22:11:11 2016: poll completed fetchmail: normal termination, status 1 -``` \ No newline at end of file +``` + +[docs-setup]: ../config/setup.sh.md +[fetchmail-website]: https://www.fetchmail.info +[fetchmail-docs]: https://www.fetchmail.info/fetchmail-man.html +[fetchmail-docs-run]: https://www.fetchmail.info/fetchmail-man.html#31 diff --git a/docs/content/advanced/mail-forwarding/aws-ses.md b/docs/content/advanced/mail-forwarding/aws-ses.md index efd371c6..6e27588a 100644 --- a/docs/content/advanced/mail-forwarding/aws-ses.md +++ b/docs/content/advanced/mail-forwarding/aws-ses.md @@ -1,26 +1,35 @@ -Note: new configuration, see [Configure Relay Hosts](https://github.com/tomav/docker-mailserver/wiki/Configure-Relay-Hosts) +--- +title: 'Mail Forwarding | AWS SES' +--- -Instead of letting postfix deliver mail directly it is possible to configure it to deliver outgoing email via Amazon SES (Simple Email Service). (Receiving inbound email via SES is not implemented.) The configuration follows the guidelines provided by AWS in http://docs.aws.amazon.com/ses/latest/DeveloperGuide/postfix.html, specifically, the STARTTLS method. +!!! note + New configuration, see [Configure Relay Hosts][docs-relay] -As described in the AWS Developer Guide you will have to generate SMTP credentials and define the following two environment variables in the docker-compose.yml with the appropriate values for your AWS SES subscription (the values for AWS_SES_USERPASS are the "SMTP username" and "SMTP password" provided when you create SMTP credentials for SES): +Instead of letting postfix deliver mail directly it is possible to configure it to deliver outgoing email via Amazon SES (Simple Email Service). (Receiving inbound email via SES is not implemented.) The configuration follows the guidelines provided by AWS in https://docs.aws.amazon.com/ses/latest/DeveloperGuide/postfix.html, specifically, the `STARTTLS` method. -``` - environment: - - AWS_SES_HOST=email-smtp.us-east-1.amazonaws.com - - AWS_SES_USERPASS=AKIAXXXXXXXXXXXXXXXX:kqXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX +As described in the AWS Developer Guide you will have to generate SMTP credentials and define the following two environment variables in the docker-compose.yml with the appropriate values for your AWS SES subscription (the values for `AWS_SES_USERPASS` are the "SMTP username" and "SMTP password" provided when you create SMTP credentials for SES): + +```yaml +environment: + - AWS_SES_HOST=email-smtp.us-east-1.amazonaws.com + - AWS_SES_USERPASS=AKIAXXXXXXXXXXXXXXXX:kqXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ``` -If necessary, you can also provide AWS_SES_PORT. If not provided, it defaults to 25. +If necessary, you can also provide `AWS_SES_PORT`. If not provided, it defaults to 25. When you start the container you will see a log line as follows confirming the configuration: -``` + +```log Setting up outgoing email via AWS SES host email-smtp.us-east-1.amazonaws.com ``` + To verify proper operation, send an email to some external account of yours and inspect the mail headers. You will also see the connection to SES in the mail logs. For example: -``` + +```log May 23 07:09:36 mail postfix/smtp[692]: Trusted TLS connection established to email-smtp.us-east-1.amazonaws.com[107.20.142.169]:25: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits) May 23 07:09:36 mail postfix/smtp[692]: 8C82A7E7: to=, relay=email-smtp.us-east-1.amazonaws.com[107.20.142.169]:25, delay=0.35, delays=0/0.02/0.13/0.2, dsn=2.0.0, status=sent (250 Ok 01000154dc729264-93fdd7ea-f039-43d6-91ed-653e8547867c-000000) - ``` + +[docs-relay]: ./relay-hosts.md diff --git a/docs/content/advanced/mail-forwarding/relay-hosts.md b/docs/content/advanced/mail-forwarding/relay-hosts.md index 70003536..ac11ffcd 100644 --- a/docs/content/advanced/mail-forwarding/relay-hosts.md +++ b/docs/content/advanced/mail-forwarding/relay-hosts.md @@ -1,10 +1,14 @@ -# Introduction +--- +title: 'Mail Forwarding | Relay Hosts' +--- + +## Introduction Rather than having Postfix deliver mail directly, you can configure Postfix to send mail via another mail relay (smarthost). Examples include [Mailgun](https://www.mailgun.com/), [Sendgrid](https://sendgrid.com/) and [AWS SES](https://aws.amazon.com/ses/). Depending on the domain of the sender, you may want to send via a different relay, or authenticate in a different way. -# Basic Configuration +## Basic Configuration Basic configuration is done via environment variables: @@ -15,57 +19,62 @@ Basic configuration is done via environment variables: Setting these environment variables will cause mail for all sender domains to be routed via the specified host, authenticating with the user/password combination. -Note for users of the previous AWS_SES_* variables: please update your configuration to use these new variables, no other configuration is required. +!!! note + For users of the previous `AWS_SES_*` variables: please update your configuration to use these new variables, no other configuration is required. -# Advanced Configuration -## Sender-dependent Authentication +## Advanced Configuration -Sender dependent authentication is done in `config/postfix-sasl-password.cf`. You can create this file manually, or use +### Sender-dependent Authentication -```bash +Sender dependent authentication is done in `config/postfix-sasl-password.cf`. You can create this file manually, or use: + +```sh setup.sh relay add-auth [] ``` An example configuration file looks like this: -``` +```txt @domain1.com relay_user_1:password_1 @domain2.com relay_user_2:password_2 ``` -If there is no other configuration, this will cause Postfix to deliver email throught the relay specified in `RELAY_HOST` env variable, authenticating as `relay_user_1` when sent from domain1.com and authenticating as `relay_user_2` when sending from domain2.com. +If there is no other configuration, this will cause Postfix to deliver email throught the relay specified in `RELAY_HOST` env variable, authenticating as `relay_user_1` when sent from `domain1.com` and authenticating as `relay_user_2` when sending from domain2.com. -**NOTE** to activate the configuration you must either restart the container, or you can also trigger an update by modifying a mail account. +!!! note + To activate the configuration you must either restart the container, or you can also trigger an update by modifying a mail account. -## Sender-dependent Relay Host +### Sender-dependent Relay Host -Sender dependent relay hosts are configured in `config/postfix-relaymap.cf`. You can create this file manually, or use +Sender dependent relay hosts are configured in `config/postfix-relaymap.cf`. You can create this file manually, or use: -```bash +```sh setup.sh relay add-domain [] ``` An example configuration file looks like this: -``` +```txt @domain1.com [relay1.org]:587 @domain2.com [relay2.org]:2525 ``` -Combined with the previous configuration in `config/postfix-sasl-password.cf`, this will cause Postfix to deliver mail sent from domain1.com via `relay1.org:587`, authenticating as `relay_user_1`, and mail sent from domain2.com via `relay2.org:2525` authenticating as `relay_user_2`. -**NOTE** You still have to define RELAY_HOST to activate the feature +Combined with the previous configuration in `config/postfix-sasl-password.cf`, this will cause Postfix to deliver mail sent from domain1.com via `relay1.org:587`, authenticating as `relay_user_1`, and mail sent from domain2.com via `relay2.org:2525` authenticating as `relay_user_2`. -## Excluding Sender Domains +!!! note + You still have to define `RELAY_HOST` to activate the feature -If you want mail sent from some domains to be delivered directly, you can exclude them from being delivered via the default relay by adding them to `config/postfix-relaymap.cf` with no destination. You can also do this via +### Excluding Sender Domains -```bash +If you want mail sent from some domains to be delivered directly, you can exclude them from being delivered via the default relay by adding them to `config/postfix-relaymap.cf` with no destination. You can also do this via: + +```sh setup.sh relay exclude-domain ``` Extending the configuration file from above: -``` +```txt @domain1.com [relay1.org]:587 @domain2.com [relay2.org]:2525 @domain3.com @@ -73,7 +82,7 @@ Extending the configuration file from above: This will cause email sent from domain3.com to be delivered directly. -### References +#### References Thanks to the author of [this article][1] for the inspiration. This is also worth reading to understand a bit more about how to set up Mailgun to work with this. diff --git a/docs/content/advanced/mail-sieve.md b/docs/content/advanced/mail-sieve.md index 83654dba..001648f0 100644 --- a/docs/content/advanced/mail-sieve.md +++ b/docs/content/advanced/mail-sieve.md @@ -1,4 +1,8 @@ -### User-defined sieve filters +--- +title: 'Email Filtering with Sieve' +--- + +## User-Defined Sieve Filters [Sieve](http://sieve.info/) allows to specify filtering rules for incoming emails that allow for example sorting mails into different folders depending on the title of an email. There are global and user specific filters which are filtering the incoming emails in the following order: @@ -11,62 +15,62 @@ If any filter in this filtering chain discards an incoming mail, the delivery pr To specify a user-defined Sieve filter place a `.dovecot.sieve` file into a virtual user's mail folder e.g. `/var/mail/domain.com/user1/.dovecot.sieve`. If this file exists dovecot will apply the filtering rules. -It's even possible to install a user provided Sieve filter at startup during users setup: simply include a Sieve file in the `config `path for each user login that need a filter. The file name provided should be in the form **\.dovecot.sieve**, so for example for `user1@domain.tld` you should provide a Sieve file named `config/user1@domain.tld.dovecot.sieve`. +It's even possible to install a user provided Sieve filter at startup during users setup: simply include a Sieve file in the `config` path for each user login that need a filter. The file name provided should be in the form `.dovecot.sieve`, so for example for `user1@domain.tld` you should provide a Sieve file named `config/user1@domain.tld.dovecot.sieve`. An example of a sieve filter that moves mails to a folder `INBOX/spam` depending on the sender address: -``` +```sieve require ["fileinto", "reject"]; if address :contains ["From"] "spam@spam.com" { - fileinto "INBOX.spam"; + fileinto "INBOX.spam"; } else { - keep; + keep; } ``` -***Note:*** that folders have to exist beforehand if sieve should move them. - +!!! note + That folders have to exist beforehand if sieve should move them. Another example of a sieve filter that forward mails to a different address: -``` +```sieve require ["copy"]; redirect :copy "user2@otherdomain.tld"; ``` Just forward all incoming emails and do not save them locally: -``` + +```sieve redirect "user2@otherdomain.tld"; ``` You can also use external programs to filter or pipe (process) messages by adding executable scripts in `config/sieve-pipe` or `config/sieve-filter`. This can be used in lieu of a local alias file, for instance to forward an email to a webservice. These programs can then be referenced by filename, by all users. Note that the process running the scripts run as a privileged user. For further information see [Dovecot's wiki](https://wiki.dovecot.org/Pigeonhole/Sieve/Plugins/Pipe). -``` + +```sieve require ["vnd.dovecot.pipe"]; pipe "external-program"; ``` - For more examples or a detailed description of the Sieve language have a look at [the official site](http://sieve.info/examplescripts). Other resources are available on the internet where you can find several [examples](https://support.tigertech.net/sieve#sieve-example-rules-jmp). -### Manage Sieve +## Manage Sieve The [Manage Sieve](https://doc.dovecot.org/admin_manual/pigeonhole_managesieve_server/) extension allows users to modify their Sieve script by themselves. The authentication mechanisms are the same as for the main dovecot service. ManageSieve runs on port `4190` and needs to be enabled using the `ENABLE_MANAGESIEVE=1` environment variable. -``` -(docker-compose.yml) +```yaml +# docker-compose.yml ports: - - ... - - "4190:4190" + - "4190:4190" environment: - - ... - - ENABLE_MANAGESIEVE=1 + - ENABLE_MANAGESIEVE=1 ``` All user defined sieve scripts that are managed by ManageSieve are stored in the user's home folder in `/var/mail/domain.com/user1/sieve`. Just one sieve script might be active for a user and is sym-linked to `/var/mail/domain.com/user1/.dovecot.sieve` automatically. -***Note:*** ManageSieve makes sure to not overwrite an existing `.dovecot.sieve` file. If a user activates a new sieve script the old one is backuped and moved to the `sieve` folder. +!!! note + ManageSieve makes sure to not overwrite an existing `.dovecot.sieve` file. If a user activates a new sieve script the old one is backuped and moved to the `sieve` folder. The extension is known to work with the following ManageSieve clients: * **Sieve Editor** a portable standalone application based on the former Thunderbird plugin (https://github.com/thsmi/sieve). diff --git a/docs/content/advanced/maintenance/update-and-cleanup.md b/docs/content/advanced/maintenance/update-and-cleanup.md index c6f07ce2..4b4a885a 100644 --- a/docs/content/advanced/maintenance/update-and-cleanup.md +++ b/docs/content/advanced/maintenance/update-and-cleanup.md @@ -1,10 +1,15 @@ -## Automatic update +--- +title: 'Maintenance | Update and Cleanup' +--- + +## Automatic Update Docker images are handy but it can get a a hassle to keep them updated. Also when a repository is automated you want to get these images when they get out. -One could setup a complex action/hook-based workflow using probes, but there is a nice, easy to use docker image that solves this issue and could prove useful: [watchtower](https://hub.docker.com/r/containrrr/watchtower). +One could setup a complex action/hook-based workflow using probes, but there is a nice, easy to use docker image that solves this issue and could prove useful: [`watchtower`](https://hub.docker.com/r/containrrr/watchtower). A docker-compose example: + ```yaml services: watchtower: @@ -16,11 +21,12 @@ services: For more details, see the [manual](https://containrrr.github.io/watchtower/) -## Automatic cleanup +## Automatic Cleanup -When you are pulling new images in automatically, it would be nice to have them cleaned up as well. There is also a docker image for this: [spotify/docker-gc](https://hub.docker.com/r/spotify/docker-gc/). +When you are pulling new images in automatically, it would be nice to have them cleaned up as well. There is also a docker image for this: [`spotify/docker-gc`](https://hub.docker.com/r/spotify/docker-gc/). A docker-compose example: + ```yaml services: docker-gc: @@ -32,4 +38,4 @@ services: For more details, see the [manual](https://github.com/spotify/docker-gc/blob/master/README.md) -Or you can just use the [`--cleanup`](https://containrrr.github.io/watchtower/arguments/#cleanup) option provided by containrrr/watchtower. \ No newline at end of file +Or you can just use the [`--cleanup`](https://containrrr.github.io/watchtower/arguments/#cleanup) option provided by `containrrr/watchtower`. diff --git a/docs/content/advanced/optional-config.md b/docs/content/advanced/optional-config.md index a8bbe564..97702c0b 100644 --- a/docs/content/advanced/optional-config.md +++ b/docs/content/advanced/optional-config.md @@ -1,32 +1,54 @@ +--- +title: 'Optional Configuration' +hide: + - toc # Hide Table of Contents for this page +--- + This is a list of all configuration files and directories which are optional or automatically generated in your `config` directory. -## Directories: -- **sieve-filter:** directory for sieve filter scripts. See [wiki](https://github.com/tomav/docker-mailserver/wiki/Configure-Sieve-filters) -- **sieve-pipe:** directory for sieve pipe scripts. See [wiki](https://github.com/tomav/docker-mailserver/wiki/Configure-Sieve-filters) -- **opendkim:** DKIM directory. Autoconfigurable via [setup.sh config dkim](https://github.com/tomav/docker-mailserver/wiki/Setup-docker-mailserver-using-the-script-setup.sh#config). See [wiki](https://github.com/tomav/docker-mailserver/wiki/Configure-DKIM) for further info -- **ssl:** SSL Certificate directory. Autoconfigurable via [setup.sh config ssl](https://github.com/tomav/docker-mailserver/wiki/Setup-docker-mailserver-using-the-script-setup.sh#config). Make sure to read the [wiki](https://github.com/tomav/docker-mailserver/wiki/Configure-SSL) as well to get a working mail server. +## Directories -## Files: -- **{user_email_address}.dovecot.sieve:** User specific Sieve filter file. See [wiki](https://github.com/tomav/docker-mailserver/wiki/Configure-Sieve-filters) -- **before.dovecot.sieve:** Global Sieve filter file, applied prior to the ${login}.dovecot.sieve filter. See [wiki](https://github.com/tomav/docker-mailserver/wiki/Configure-Sieve-filters) -- **after.dovecot.sieve**: Global Sieve filter file, applied after the ${login}.dovecot.sieve filter. See [wiki](https://github.com/tomav/docker-mailserver/wiki/Configure-Sieve-filters) -- **postfix-main.cf:** Every line will be added to the postfix main configuration. See [wiki](https://github.com/tomav/docker-mailserver/wiki/Override-Default-Postfix-Configuration) -- **postfix-master.cf:** Every line will be added to the postfix master configuration. See [wiki](https://github.com/tomav/docker-mailserver/wiki/Override-Default-Postfix-Configuration) -- **postfix-accounts.cf:** User accounts file. Modify via the [setup.sh email](https://github.com/tomav/docker-mailserver/wiki/Setup-docker-mailserver-using-the-script-setup.sh#email) script. -- **postfix-send-access.cf:** List of users denied sending. Modify via [setup.sh email restrict](https://github.com/tomav/docker-mailserver/wiki/Setup-docker-mailserver-using-the-script-setup.sh#email) -- **postfix-receive-access.cf:** List of users denied receiving. Modify via [setup.sh email restrict](https://github.com/tomav/docker-mailserver/wiki/Setup-docker-mailserver-using-the-script-setup.sh#email) -- **postfix-virtual.cf:** Alias configuration file. Modify via [setup.sh alias](https://github.com/tomav/docker-mailserver/wiki/Setup-docker-mailserver-using-the-script-setup.sh#alias) -- **postfix-sasl-password.cf:** listing of relayed domains with their respective username:password. Modify via `setup.sh relay add-auth []`. See [wiki](https://github.com/tomav/docker-mailserver/wiki/Configure-Relay-Hosts#sender-dependent-authentication) -- **postfix-relaymap.cf:** domain-specific relays and exclusions Modify via `setup.sh relay add-domain` and `setup.sh relay exclude-domain`. See [wiki](https://github.com/tomav/docker-mailserver/wiki/Configure-Relay-Hosts#sender-dependent-relay-host) -- **postfix-regexp.cf:** Regular expression alias file. See [wiki](https://github.com/tomav/docker-mailserver/wiki/Configure-Aliases#configuring-regexp-aliases) -- **ldap-users.cf:** Configuration for the virtual user mapping (virtual_mailbox_maps). See the [start-mailserver.sh](https://github.com/tomav/docker-mailserver/blob/a564cca0e55feba40e273a5419d4c9a864460bf6/target/start-mailserver.sh#L583) script -- **ldap-groups.cf:** Configuration for the virtual alias mapping (virtual_alias_maps). See the [start-mailserver.sh](https://github.com/tomav/docker-mailserver/blob/a564cca0e55feba40e273a5419d4c9a864460bf6/target/start-mailserver.sh#L583) script -- **ldap-aliases.cf:** Configuration for the virtual alias mapping (virtual_alias_maps). See the [start-mailserver.sh](https://github.com/tomav/docker-mailserver/blob/a564cca0e55feba40e273a5419d4c9a864460bf6/target/start-mailserver.sh#L583) script -- **ldap-domains.cf:** Configuration for the virtual domain mapping (virtual_mailbox_domains). See the [start-mailserver.sh](https://github.com/tomav/docker-mailserver/blob/a564cca0e55feba40e273a5419d4c9a864460bf6/target/start-mailserver.sh#L583) script +- **sieve-filter:** directory for sieve filter scripts. (Docs: [Sieve][docs-sieve]) +- **sieve-pipe:** directory for sieve pipe scripts. (Docs: [Sieve][docs-sieve]) +- **opendkim:** DKIM directory. Auto-configurable via [`setup.sh config dkim`][docs-setupsh]. (Docs: [DKIM][docs-dkim]) +- **ssl:** SSL Certificate directory. Auto-configurable via [`setup.sh config ssl`][docs-setupsh]. (Docs: [SSL][docs-ssl]) + +## Files + +- **{user_email_address}.dovecot.sieve:** User specific Sieve filter file. (Docs: [Sieve][docs-sieve]) +- **before.dovecot.sieve:** Global Sieve filter file, applied prior to the `${login}.dovecot.sieve` filter. (Docs: [Sieve][docs-sieve]) +- **after.dovecot.sieve**: Global Sieve filter file, applied after the `${login}.dovecot.sieve` filter. (Docs: [Sieve][docs-sieve]) +- **postfix-main.cf:** Every line will be added to the postfix main configuration. (Docs: [Override Postfix Defaults][docs-override-postfix]) +- **postfix-master.cf:** Every line will be added to the postfix master configuration. (Docs: [Override Postfix Defaults][docs-override-postfix]) +- **postfix-accounts.cf:** User accounts file. Modify via the [`setup.sh email`][docs-setupsh] script. +- **postfix-send-access.cf:** List of users denied sending. Modify via [`setup.sh email restrict`][docs-setupsh]. +- **postfix-receive-access.cf:** List of users denied receiving. Modify via [`setup.sh email restrict`][docs-setupsh]. +- **postfix-virtual.cf:** Alias configuration file. Modify via [`setup.sh alias`][docs-setupsh]. +- **postfix-sasl-password.cf:** listing of relayed domains with their respective `:`. Modify via `setup.sh relay add-auth []`. (Docs: [Relay-Hosts Auth][docs-relayhosts-senderauth]) +- **postfix-relaymap.cf:** domain-specific relays and exclusions. Modify via `setup.sh relay add-domain` and `setup.sh relay exclude-domain`. (Docs: [Relay-Hosts Senders][docs-relayhosts-senderhost]) +- **postfix-regexp.cf:** Regular expression alias file. (Docs: [Aliases][docs-aliases-regex]) +- **ldap-users.cf:** Configuration for the virtual user mapping `virtual_mailbox_maps`. See the [`setup-stack.sh`][github-commit-setup-stack.sh-L411] script. +- **ldap-groups.cf:** Configuration for the virtual alias mapping `virtual_alias_maps`. See the [`setup-stack.sh`][github-commit-setup-stack.sh-L411] script. +- **ldap-aliases.cf:** Configuration for the virtual alias mapping `virtual_alias_maps`. See the [`setup-stack.sh`][github-commit-setup-stack.sh-L411] script. +- **ldap-domains.cf:** Configuration for the virtual domain mapping `virtual_mailbox_domains`. See the [`setup-stack.sh`][github-commit-setup-stack.sh-L411] script. - **whitelist_clients.local:** Whitelisted domains, not considered by postgrey. Enter one host or domain per line. -- **spamassassin-rules.cf:** Antispam rules for Spamassassin. See [wiki](https://github.com/tomav/docker-mailserver/wiki/FAQ-and-Tips#how-can-i-manage-my-custom-spamassassin-rules) -- **fail2ban-fail2ban.cf:** Additional config options for fail2ban.cf. See [wiki](https://github.com/tomav/docker-mailserver/wiki/Configure-Fail2ban) -- **fail2ban-jail.cf:** Additional config options for fail2ban's jail behaviour. See [wiki](https://github.com/tomav/docker-mailserver/wiki/Configure-Fail2ban) -- **amavis.cf:** replaces the /etc/amavis/conf.d/50-user file -- **dovecot.cf:** replaces /etc/dovecot/local.conf. See [wiki](https://github.com/tomav/docker-mailserver/wiki/Override-Default-Dovecot-Configuration) -- **dovecot-quotas.cf:** list of custom quotas per mailbox. See [wiki](https://github.com/tomav/docker-mailserver/wiki/Configure-Accounts#mailbox-quota) +- **spamassassin-rules.cf:** Antispam rules for Spamassassin. (Docs: [FAQ - SpamAssassin Rules][docs-faq-spamrules]) +- **fail2ban-fail2ban.cf:** Additional config options for `fail2ban.cf`. (Docs: [Fail2Ban][docs-fail2ban]) +- **fail2ban-jail.cf:** Additional config options for fail2ban's jail behaviour. (Docs: [Fail2Ban][docs-fail2ban]) +- **amavis.cf:** replaces the `/etc/amavis/conf.d/50-user` file +- **dovecot.cf:** replaces `/etc/dovecot/local.conf`. (Docs: [Override Dovecot Defaults][docs-override-dovecot]) +- **dovecot-quotas.cf:** list of custom quotas per mailbox. (Docs: [Accounts][docs-accounts-quota]) + +[docs-accounts-quota]: ../config/user-management/accounts.md#notes +[docs-aliases-regex]: ../config/user-management/aliases.md#configuring-regexp-aliases +[docs-dkim]: ../config/best-practices/dkim.md +[docs-fail2ban]: ../config/security/fail2ban.md +[docs-faq-spamrules]: ../config/troubleshooting/faq.md#how-can-i-manage-my-custom-spamassassin-rules +[docs-override-postfix]: ./override-defaults/postfix.md +[docs-override-dovecot]: ./override-defaults/dovecot.md +[docs-relayhosts-senderauth]: ./mail-forwarding/relay-hosts.md#sender-dependent-authentication +[docs-relayhosts-senderhost]: ./mail-forwarding/relay-hosts.md#sender-dependent-relay-host +[docs-sieve]: ./mail-sieve.md +[docs-setupsh]: ../config/setup.sh.md +[docs-ssl]: ../config/security/ssl.md +[github-commit-setup-stack.sh-L411]: https://github.com/docker-mailserver/docker-mailserver/blob/941e7acdaebe271eaf3d296b36d4d81df4c54b90/target/scripts/startup/setup-stack.sh#L411 diff --git a/docs/content/advanced/override-defaults/dovecot.md b/docs/content/advanced/override-defaults/dovecot.md index 85c0d02b..e4ef7490 100644 --- a/docs/content/advanced/override-defaults/dovecot.md +++ b/docs/content/advanced/override-defaults/dovecot.md @@ -1,11 +1,15 @@ -# Add configuration +--- +title: 'Override the Default Configs | Dovecot' +--- + +## Add Configuration The Dovecot default configuration can easily be extended providing a `config/dovecot.cf` file. -[Dovecot documentation](http://wiki.dovecot.org/FrontPage) remains the best place to find configuration options. +[Dovecot documentation](https://wiki.dovecot.org) remains the best place to find configuration options. Your `docker-mailserver` folder should look like this example: -``` +```txt ├── config │ ├── dovecot.cf │ ├── postfix-accounts.cf @@ -16,47 +20,40 @@ Your `docker-mailserver` folder should look like this example: One common option to change is the maximum number of connections per user: -``` +```cf mail_max_userip_connections = 100 ``` -Another important option is the `default_process_limit` (defaults to `100`). If high-security mode is enabled you'll need to make sure this count is higher than the maximum number of users that can be logged in simultaneously. This limit is quickly reached if users connect to the mail server with multiple end devices. +Another important option is the `default_process_limit` (defaults to `100`). If high-security mode is enabled you'll need to make sure this count is higher than the maximum number of users that can be logged in simultaneously. -# Override configuration +This limit is quickly reached if users connect to the mail server with multiple end devices. -For major configuration changes it’s best to override the `dovecot` configuration files. For each configuration file you want to override, add a list entry under the `volumes:` key. +## Override Configuration + +For major configuration changes it’s best to override the dovecot configuration files. For each configuration file you want to override, add a list entry under the `volumes` key. ```yaml -version: '2' - services: mail: - ... volumes: - maildata:/var/mail - ... - ./config/dovecot/10-master.conf:/etc/dovecot/conf.d/10-master.conf - ``` -# Debugging +## Debugging -To debug your dovecot configuration you can use this command: +To debug your dovecot configuration you can use: + +- This command: `./setup.sh debug login doveconf | grep ` +- Or: `docker exec -it doveconf | grep ` + +!!! note + [`setup.sh`][github-file-setupsh] is included in the `docker-mailserver` repository. + +The `config/dovecot.cf` is copied internally to `/etc/dovecot/local.conf`. To check this file run: ```sh -./setup.sh debug login doveconf | grep +docker exec -it cat /etc/dovecot/local.conf ``` -[setup.sh](https://github.com/tomav/docker-mailserver/blob/master/setup.sh) is included in the `docker-mailserver` repository. - -or - -```sh -docker exec -ti doveconf | grep -``` - -The `config/dovecot.cf` is copied to `/etc/dovecot/local.conf`. To check this file run: - -```sh -docker exec -ti cat /etc/dovecot/local.conf -``` +[github-file-setupsh]: https://github.com/docker-mailserver/docker-mailserver/blob/master/setup.sh diff --git a/docs/content/advanced/override-defaults/postfix.md b/docs/content/advanced/override-defaults/postfix.md index d8ed58eb..e380b231 100644 --- a/docs/content/advanced/override-defaults/postfix.md +++ b/docs/content/advanced/override-defaults/postfix.md @@ -1,24 +1,32 @@ +--- +title: 'Override the Default Configs | Postfix' +--- + The Postfix default configuration can easily be extended by providing a `config/postfix-main.cf` in postfix format. This can also be used to add configuration that is not in our default configuration. For example, one common use of this file is for increasing the default maximum message size: -``` + +```cf # increase maximum message size - message_size_limit = 52428800 +message_size_limit = 52428800 ``` -That specific example is now supported and can be handled by setting POSTFIX_MESSAGE_SIZE_LIMIT. +That specific example is now supported and can be handled by setting `POSTFIX_MESSAGE_SIZE_LIMIT`. [Postfix documentation](http://www.postfix.org/documentation.html) remains the best place to find configuration options. Each line in the provided file will be loaded into postfix. -In the same way it is possible to add a custom `config/postfix-master.cf` file that will override the standard `master.cf`. Each line in the file will be passed to `postconf -P`. The expected format is service_name/type/parameter, for example: -``` +In the same way it is possible to add a custom `config/postfix-master.cf` file that will override the standard `master.cf`. Each line in the file will be passed to `postconf -P`. The expected format is `//`, for example: + +```cf submission/inet/smtpd_reject_unlisted_recipient=no ``` + Run `postconf -P` in the container without arguments to see the active master options. -Note! There should be no space between the parameter and the value. +!!! note + There should be no space between the parameter and the value. -Have a look at the code for more information. \ No newline at end of file +Have a look at the code for more information. diff --git a/docs/content/config/best-practices/autodiscover.md b/docs/content/config/best-practices/autodiscover.md index 7bd5b34e..fef6b64b 100644 --- a/docs/content/config/best-practices/autodiscover.md +++ b/docs/content/config/best-practices/autodiscover.md @@ -1,5 +1,11 @@ +--- +title: 'Best Practices | Auto-discovery' +hide: + - toc # Hide Table of Contents for this page +--- + Email auto-discovery means a client email is able to automagically find out about what ports and security options to use, based on the mail server URL. It can help simplify the tedious / confusing task of adding own's email account for non-tech savvy users. -Basically, email clients will search for auto-discoverable settings and prefill almost everything when a user enters its email address :heart: +Email clients will search for auto-discoverable settings and prefill almost everything when a user enters its email address :heart: -There exists [autodiscover-email-settings](https://hub.docker.com/r/monogramm/autodiscover-email-settings/) on hub.docker.com which provides IMAP/POP/SMTP/LDAP autodiscover capabilities on Microsoft Outlook/Apple Mail, autoconfig capabilities for Thunderbird or kmail and configuration profiles for iOS/Apple Mail. \ No newline at end of file +There exists [autodiscover-email-settings](https://hub.docker.com/r/monogramm/autodiscover-email-settings/) on which provides IMAP/POP/SMTP/LDAP autodiscover capabilities on Microsoft Outlook/Apple Mail, autoconfig capabilities for Thunderbird or kmail and configuration profiles for iOS/Apple Mail. diff --git a/docs/content/config/best-practices/dkim.md b/docs/content/config/best-practices/dkim.md index 253e2407..e012470d 100644 --- a/docs/content/config/best-practices/dkim.md +++ b/docs/content/config/best-practices/dkim.md @@ -1,35 +1,39 @@ +--- +title: 'Best Practices | DKIM' +--- + DKIM is a security measure targeting email spoofing. It is greatly recommended one activates it. See [the Wikipedia page](https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail) for more details on DKIM. -#### Enabling DKIM signature +## Enabling DKIM Signature To enable DKIM signature, **you must have created at least one email account**. Once its done, just run the following command to generate the signature: -``` BASH +```sh ./setup.sh config dkim ``` After generating DKIM keys, you should restart the mail server. DNS edits may take a few minutes to hours to propagate. The script assumes you're being in the directory where the `config/` directory is located. The default keysize when generating the signature is 4096 bits for now. If you need to change it (e.g. your DNS provider limits the size), then provide the size as the first parameter of the command: -``` BASH +```sh ./setup.sh config dkim ``` For LDAP systems that do not have any directly created user account you can run the following command (since `8.0.0`) to generate the signature by additionally providing the desired domain name (if you have multiple domains use the command multiple times or provide a comma-separated list of domains): -``` BASH +```sh ./setup.sh config dkim [,] ``` Now the keys are generated, you can configure your DNS server with DKIM signature, simply by adding a TXT record. If you have direct access to your DNS zone file, then it's only a matter of pasting the content of `config/opendkim/keys/domain.tld/mail.txt` in your `domain.tld.hosts` zone. -``` BASH +```console $ dig mail._domainkey.domain.tld TXT --- ;; ANSWER SECTION mail._domainkey. 300 IN TXT "v=DKIM1; k=rsa; p=AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN/AZERTYUIOPQSDFGHJKLMWXCVBN" ``` -#### Configuration using a web interface +## Configuration using a Web Interface 1. Generate a new record of the type `TXT`. 2. Paste `mail._domainkey` the `Name` txt field. @@ -37,24 +41,25 @@ mail._domainkey. 300 IN TXT "v=DKIM1; k=rsa; p=AZERTYUIOPQSDFGHJKLMWX 4. In `TTL` (time to live): Time span in seconds. How long the DNS server should cache the `TXT` record. 5. Save. -**Note**: Sometimes the key in `config/opendkim/keys/domain.tld/mail.txt` can be on multiple lines. If so then you need to concatenate the values in the TXT record: +!!! note + Sometimes the key in `config/opendkim/keys/domain.tld/mail.txt` can be on multiple lines. If so then you need to concatenate the values in the TXT record: -``` BASH +```console $ dig mail._domainkey.domain.tld TXT --- ;; ANSWER SECTION -mail._domainkey. 300 IN TXT "v=DKIM1; k=rsa; " - "p=AZERTYUIOPQSDF..." - "asdfQWERTYUIOPQSDF..." +mail._domainkey. 300 IN TXT "v=DKIM1; k=rsa; " + "p=AZERTYUIOPQSDF..." + "asdfQWERTYUIOPQSDF..." ``` The target (or value) field must then have all the parts together: `v=DKIM1; k=rsa; p=AZERTYUIOPQSDF...asdfQWERTYUIOPQSDF...` -#### Verify-only +## Verify-Only -If you want DKIM to only _verify_ incoming emails, the following version of /etc/opendkim.conf may be useful (right now there is no easy mechanism for installing it other than forking the repo): +If you want DKIM to only _verify_ incoming emails, the following version of `/etc/opendkim.conf` may be useful (right now there is no easy mechanism for installing it other than forking the repo): -``` TXT +```conf # This is a simple config file verifying messages only #LogWhy yes @@ -70,12 +75,12 @@ SendReports yes Mode v ``` -#### Debugging +## Debugging - [DKIM-verifer](https://addons.mozilla.org/en-US/thunderbird/addon/dkim-verifier): A add-on for the mail client Thunderbird. - You can debug your TXT records with the `dig` tool. -``` BASH +```console $ dig TXT mail._domainkey.domain.tld --- ; <<>> DiG 9.10.3-P4-Debian <<>> TXT mail._domainkey.domain.tld @@ -90,7 +95,7 @@ $ dig TXT mail._domainkey.domain.tld ;mail._domainkey.domain.tld. IN TXT ;; ANSWER SECTION: -mail._domainkey.domain.tld. 3600 IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCxBSjG6RnWAdU3oOlqsdf2WC0FOUmU8uHVrzxPLW2R3yRBPGLrGO1++yy3tv6kMieWZwEBHVOdefM6uQOQsZ4brahu9lhG8sFLPX4MaKYN/NR6RK4gdjrZu+MYSdfk3THgSbNwIDAQAB" +mail._domainkey.domain.tld. 3600 IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCxBSjG6RnWAdU3oOlqsdf2WC0FOUmU8uHVrzxPLW2R3yRBPGLrGO1++yy3tv6kMieWZwEBHVOdefM6uQOQsZ4brahu9lhG8sFLPX4MaKYN/NR6RK4gdjrZu+MYSdfk3THgSbNwIDAQAB" ;; Query time: 50 msec ;; SERVER: 127.0.1.1#53(127.0.1.1) @@ -98,6 +103,6 @@ mail._domainkey.domain.tld. 3600 IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBA ;; MSG SIZE rcvd: 310 ``` -#### Switch off DKIM +## Switch Off DKIM -Simply remove the DKIM key by recreating (not just relaunching) the mailserver container. \ No newline at end of file +Simply remove the DKIM key by recreating (not just relaunching) the mailserver container. diff --git a/docs/content/config/best-practices/dmarc.md b/docs/content/config/best-practices/dmarc.md index 12129211..e8309c66 100644 --- a/docs/content/config/best-practices/dmarc.md +++ b/docs/content/config/best-practices/dmarc.md @@ -1,10 +1,16 @@ +--- +title: 'Best Practices | DMARC' +hide: + - toc # Hide Table of Contents for this page +--- + DMARC Guide: https://github.com/internetstandards/toolbox-wiki/blob/master/DMARC-how-to.md ## Enabling DMARC In `docker-mailserver`, DMARC is pre-configured out-of the box. The only thing you need to do in order to enable it, is to add new TXT entry to your DNS. -In contrast with [DKIM](https://github.com/tomav/docker-mailserver/wiki/Configure-DKIM), DMARC DNS entry does not require any keys, but merely setting the [configuration values](https://github.com/internetstandards/toolbox-wiki/blob/master/DMARC-how-to.md#overview-of-dmarc-configuration-tags). You can either handcraft the entry by yourself or use one of available generators (like https://dmarcguide.globalcyberalliance.org/). +In contrast with [DKIM][docs-dkim], DMARC DNS entry does not require any keys, but merely setting the [configuration values](https://github.com/internetstandards/toolbox-wiki/blob/master/DMARC-how-to.md#overview-of-dmarc-configuration-tags). You can either handcraft the entry by yourself or use one of available generators (like https://dmarcguide.globalcyberalliance.org/). Typically something like this should be good to start with (don't forget to replace `@domain.com` to your actual domain) ``` @@ -18,4 +24,7 @@ _dmarc IN TXT "v=DMARC1; p=quarantine; rua=mailto:dmarc.report@domain.com; ruf=m DMARC status is not being displayed instantly in Gmail for instance. If you want to check it directly after DNS entries, you can use some services around the Internet such as https://dmarcguide.globalcyberalliance.org/ or https://ondmarc.redsift.com/. In other case, email clients will show "DMARC: PASS" in ~1 day or so. -Reference: [#1511](https://github.com/tomav/docker-mailserver/issues/1511) \ No newline at end of file +Reference: [#1511][github-issue-1511] + +[docs-dkim]: ./dkim.md +[github-issue-1511]: https://github.com/docker-mailserver/docker-mailserver/issues/1511 diff --git a/docs/content/config/best-practices/spf.md b/docs/content/config/best-practices/spf.md index c82f381a..15bfc55b 100644 --- a/docs/content/config/best-practices/spf.md +++ b/docs/content/config/best-practices/spf.md @@ -1,35 +1,44 @@ +--- +title: 'Best Practices | SPF' +hide: + - toc # Hide Table of Contents for this page +--- + From [Wikipedia](https://en.wikipedia.org/wiki/Sender_Policy_Framework): > Sender Policy Framework (SPF) is a simple email-validation system designed to detect email spoofing by providing a mechanism to allow receiving mail exchangers to check that incoming mail from a domain comes from a host authorized by that domain's administrators. The list of authorized sending hosts for a domain is published in the Domain Name System (DNS) records for that domain in the form of a specially formatted TXT record. Email spam and phishing often use forged "from" addresses, so publishing and checking SPF records can be considered anti-spam techniques. For a more technical review: https://github.com/internetstandards/toolbox-wiki/blob/master/SPF-how-to.md -## Add a SPF record +## Add a SPF Record To add a SPF record in your DNS, insert the following line in your DNS zone: - ; MX record must be declared for SPF to work - domain.com. IN MX 1 mail.domain.com. +```txt +; MX record must be declared for SPF to work +domain.com. IN MX 1 mail.domain.com. - ; SPF record - domain.com. IN TXT "v=spf1 mx ~all" +; SPF record +domain.com. IN TXT "v=spf1 mx ~all" +``` This enables the _Softfail_ mode for SPF. You could first add this SPF record with a very low TTL. _SoftFail_ is a good setting for getting started and testing, as it lets all email through, with spams tagged as such in the mailbox. -After verification, you _might_ want to change your SPF record to `v=spf1 mx -all` so as to enforce the _HardFail_ policy. See http://www.open-spf.org/SPF_Record_Syntax/ for more details about SPF policies. +After verification, you _might_ want to change your SPF record to `v=spf1 mx -all` so as to enforce the _HardFail_ policy. See http://www.open-spf.org/SPF_Record_Syntax for more details about SPF policies. In any case, increment the SPF record's TTL to its final value. ## Backup MX, Secondary MX -For whitelisting a IP-Address from the SPF test, you can create a config file (see [policyd-spf.conf](http://www.linuxcertif.com/man/5/policyd-spf.conf/)) and mount that file into `/etc/postfix-policyd-spf-python/policyd-spf.conf`. +For whitelisting a IP Address from the SPF test, you can create a config file (see [`policyd-spf.conf`](https://www.linuxcertif.com/man/5/policyd-spf.conf)) and mount that file into `/etc/postfix-policyd-spf-python/policyd-spf.conf`. **Example:** -Create and edit a policyd-spf.conf file here `//config/postfix-policyd-spf.conf`: -```shell -debugLevel = 1 +Create and edit a `policyd-spf.conf` file here `//config/postfix-policyd-spf.conf`: + +```conf +debugLevel = 1 #0(only errors)-4(complete data received) skip_addresses = 127.0.0.0/8,::ffff:127.0.0.0/104,::1 @@ -37,10 +46,11 @@ skip_addresses = 127.0.0.0/8,::ffff:127.0.0.0/104,::1 # Preferably use IP-Addresses for whitelist lookups: Whitelist = 192.168.0.0/31,192.168.1.0/30 # Domain_Whitelist = mx1.mybackupmx.com,mx2.mybackupmx.com - ``` -Then add this line to `docker-compose.yml` below the `volumes:` section + +Then add this line to `docker-compose.yml`: ```yaml -- ./config/postfix-policyd-spf.conf:/etc/postfix-policyd-spf-python/policyd-spf.conf -``` \ No newline at end of file +volumes: + - ./config/postfix-policyd-spf.conf:/etc/postfix-policyd-spf-python/policyd-spf.conf +``` diff --git a/docs/content/config/pop3.md b/docs/content/config/pop3.md index b95580b2..caa44891 100644 --- a/docs/content/config/pop3.md +++ b/docs/content/config/pop3.md @@ -1,18 +1,23 @@ +--- +title: Mail Delivery with POP3 +hide: + - toc # Hide Table of Contents for this page +--- + **We do not recommend using POP. Use IMAP instead.** If you really want to have POP3 running, add 3 lines to the docker-compose.yml : Add the ports 110 and 995, and add environment variable ENABLE_POP : -``` +```yaml mail: - [...] ports: - - "25:25" - - "143:143" - - "587:587" - - "993:993" - - "110:110" - - "995:995" + - "25:25" + - "143:143" + - "587:587" + - "993:993" + - "110:110" + - "995:995" environment: - - ENABLE_POP3=1 + - ENABLE_POP3=1 ``` diff --git a/docs/content/config/security/fail2ban.md b/docs/content/config/security/fail2ban.md index e04558bc..4ea7df63 100644 --- a/docs/content/config/security/fail2ban.md +++ b/docs/content/config/security/fail2ban.md @@ -1,17 +1,35 @@ -Fail2ban is installed automatically and bans IP addresses for 3 hours after 3 failed attempts in 10 minutes by default. If you want to change this, you can easily edit [config/fail2ban-jail.cf](https://github.com/tomav/docker-mailserver/blob/master/config/fail2ban-jail.cf). -You can do the same with the values from fail2ban.conf, e.g dbpurgeage. In that case you need to edit [config/fail2ban-fail2ban.cf](https://github.com/tomav/docker-mailserver/blob/master/config/fail2ban-fail2ban.cf) +--- +title: 'Security | Fail2Ban' +hide: + - toc # Hide Table of Contents for this page +--- -__Important__: The mail container must be launched with the NET_ADMIN capability in order to be able to install the iptable rules that actually ban IP addresses. Thus either include `--cap-add=NET_ADMIN` in the docker run commandline or the equivalent docker-compose.yml: -``` - cap_add: - - NET_ADMIN -``` -If you don't you will see errors of the form -``` +Fail2Ban is installed automatically and bans IP addresses for 3 hours after 3 failed attempts in 10 minutes by default. If you want to change this, you can easily edit [`config/fail2ban-jail.cf`][github-file-f2bjail]. + +You can do the same with the values from `fail2ban.conf`, e.g `dbpurgeage`. In that case you need to edit [`config/fail2ban-fail2ban.cf`][github-file-f2bconfig]. + +!!! attention + The mail container must be launched with the `NET_ADMIN` capability in order to be able to install the iptable rules that actually ban IP addresses. + + Thus either include `--cap-add=NET_ADMIN` in the docker run commandline or the equivalent `docker-compose.yml`: + + ```yaml + cap_add: + - NET_ADMIN + ``` + +If you don't you will see errors the form of: + +```log iptables -w -X f2b-postfix -- stderr: "getsockopt failed strangely: Operation not permitted\niptables v1.4.21: can't initialize iptabl es table `filter': Permission denied (you must be root)\nPerhaps iptables or your kernel needs to be upgraded.\niptables v1.4.21: can' t initialize iptables table `filter': Permission denied (you must be root)\nPerhaps iptables or your kernel needs to be upgraded.\n" 2016-06-01 00:53:51,284 fail2ban.action [678]: ERROR iptables -w -D INPUT -p tcp -m multiport --dports smtp,465,submission - j f2b-postfix ``` -You can also manage and list the banned IPs with the [setup.sh](https://github.com/tomav/docker-mailserver/wiki/Setup-docker-mailserver-using-the-script-setup.sh) script. \ No newline at end of file + +You can also manage and list the banned IPs with the [`setup.sh`][docs-setupsh] script. + +[docs-setupsh]: ../setup.sh.md +[github-file-f2bjail]: https://github.com/docker-mailserver/docker-mailserver/blob/master/config/fail2ban-jail.cf +[github-file-f2bconfig]: https://github.com/docker-mailserver/docker-mailserver/blob/master/config/fail2ban-fail2ban.cf diff --git a/docs/content/config/security/ssl.md b/docs/content/config/security/ssl.md index 3f2ae276..95a8f7f1 100644 --- a/docs/content/config/security/ssl.md +++ b/docs/content/config/security/ssl.md @@ -1,112 +1,140 @@ +--- +title: 'Security | TLS (aka SSL)' +--- + There are multiple options to enable SSL: -* using [letsencrypt](#lets-encrypt-recommended) (recommended) -* using [Caddy](#caddy) -* using [Traefik](#traefik) -* using [self-signed certificates](#self-signed-certificates-testing-only) with the provided tool -* using [your own certificates](#custom-certificate-files) +- Using [letsencrypt](#lets-encrypt-recommended) (recommended) +- Using [Caddy](#caddy) +- Using [Traefik](#traefik) +- Using [self-signed certificates](#self-signed-certificates-testing-only) with the provided tool +- Using [your own certificates](#custom-certificate-files) After installation, you can test your setup with: -- [checktls.com](https://www.checktls.com/TestReceiver) -- [testssl.sh](https://github.com/drwetter/testssl.sh) -### Let's encrypt (recommended) +- [`checktls.com`](https://www.checktls.com/TestReceiver) +- [`testssl.sh`](https://github.com/drwetter/testssl.sh) + +## Let's Encrypt (Recommended) To enable Let's Encrypt on your mail server, you have to: -* get your certificate using [letsencrypt client](https://github.com/letsencrypt/letsencrypt) -* add an environment variable `SSL_TYPE` with value `letsencrypt` (see `docker-compose.yml.dist`) -* mount your whole `letsencrypt` folder to `/etc/letsencrypt` -* the certs folder name located in `letsencrypt/live/` must be the `fqdn` of your container responding to the `hostname` command. The full qualified domain name (`fqdn`) inside the docker container is built combining the `hostname` and `domainname` values of the docker-compose file, e. g.: hostname: `mail`; domainname: `myserver.tld`; fqdn: `mail.myserver.tld` +- Get your certificate using [letsencrypt client](https://github.com/letsencrypt/letsencrypt) +- Add an environment variable `SSL_TYPE` with value `letsencrypt` (see [`docker-compose.yml`][github-file-compose]) +- Mount your whole `letsencrypt` folder to `/etc/letsencrypt` +- The certs folder name located in `letsencrypt/live/` must be the `fqdn` of your container responding to the `hostname` command. The `fqdn` (full qualified domain name) inside the docker container is built combining the `hostname` and `domainname` values of the `docker-compose` file, eg: + + ```yaml + services: + mail: + hostname: mail + domainname: myserver.tld + fqdn: mail.myserver.tld + ``` You don't have anything else to do. Enjoy. +### Example using Docker for Let's Encrypt +1. Make a directory to store your letsencrypt logs and configs. In my case: -#### Example using docker for letsencrypt -Make a directory to store your letsencrypt logs and configs. + ```sh + mkdir -p /home/ubuntu/docker/letsencrypt + cd /home/ubuntu/docker/letsencrypt + ``` -In my case -``` -mkdir -p /home/ubuntu/docker/letsencrypt -cd /home/ubuntu/docker/letsencrypt +2. Now get the certificate (modify `mail.myserver.tld`) and following the certbot instructions. + +3. This will need access to port 80 from the internet, adjust your firewall if needed: + + ```sh + docker run --rm -it \ + -v $PWD/log/:/var/log/letsencrypt/ \ + -v $PWD/etc/:/etc/letsencrypt/ \ + -p 80:80 \ + certbot/certbot certonly --standalone -d mail.myserver.tld + ``` + +4. You can now mount `/home/ubuntu/docker/letsencrypt/etc/` in `/etc/letsencrypt` of `docker-mailserver`. + + To renew your certificate just run (this will need access to port 443 from the internet, adjust your firewall if needed): + + ```sh + docker run --rm -it \ + -v $PWD/log/:/var/log/letsencrypt/ \ + -v $PWD/etc/:/etc/letsencrypt/ \ + -p 80:80 \ + -p 443:443 \ + certbot/certbot renew + ``` + +### Example using Docker, `nginx-proxy` and `letsencrypt-nginx-proxy-companion` + +If you are running a web server already, it is non-trivial to generate a Let's Encrypt certificate for your mail server using `certbot`, because port 80 is already occupied. In the following example, we show how `docker-mailserver` can be run alongside the docker containers `nginx-proxy` and `letsencrypt-nginx-proxy-companion`. + +There are several ways to start `nginx-proxy` and `letsencrypt-nginx-proxy-companion`. Any method should be suitable here. + +For example start `nginx-proxy` as in the `letsencrypt-nginx-proxy-companion` [documentation](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion): + +```sh +docker run --detach \ + --name nginx-proxy \ + --restart always \ + --publish 80:80 \ + --publish 443:443 \ + --volume /server/letsencrypt/etc:/etc/nginx/certs:ro \ + --volume /etc/nginx/vhost.d \ + --volume /usr/share/nginx/html \ + --volume /var/run/docker.sock:/tmp/docker.sock:ro \ + jwilder/nginx-proxy ``` -Now get the certificate (modify ```mail.myserver.tld```) and following the certbot instructions. -This will need access to port 80 from the internet, adjust your firewall if needed -``` -docker run --rm -ti -v $PWD/log/:/var/log/letsencrypt/ -v $PWD/etc/:/etc/letsencrypt/ -p 80:80 certbot/certbot certonly --standalone -d mail.myserver.tld -``` -You can now mount /home/ubuntu/docker/letsencrypt/etc/ in /etc/letsencrypt of ```docker-mailserver``` +Then start `nginx-proxy-letsencrypt`: -To renew your certificate just run (this will need access to port 443 from the internet, adjust your firewall if needed) -``` -docker run --rm -ti -v $PWD/log/:/var/log/letsencrypt/ -v $PWD/etc/:/etc/letsencrypt/ -p 80:80 -p 443:443 certbot/certbot renew +```sh +docker run --detach \ + --name nginx-proxy-letsencrypt \ + --restart always \ + --volume /server/letsencrypt/etc:/etc/nginx/certs:rw \ + --volumes-from nginx-proxy \ + --volume /var/run/docker.sock:/var/run/docker.sock:ro \ + jrcs/letsencrypt-nginx-proxy-companion ``` -#### Example using docker, nginx-proxy and letsencrypt-nginx-proxy-companion #### -If you are running a web server already, it is non-trivial to generate a Let's Encrypt certificate for your mail server using ```certbot```, because port 80 is already occupied. In the following example, we show how ```docker-mailserver``` can be run alongside the docker containers ```nginx-proxy``` and ```letsencrypt-nginx-proxy-companion```. - -There are several ways to start ```nginx-proxy``` and ```letsencrypt-nginx-proxy-companion```. Any method should be suitable here. For example start ```nginx-proxy``` as in the ```letsencrypt-nginx-proxy-companion``` [documentation](https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion): - -``` - docker run --detach \ - --name nginx-proxy \ - --restart always \ - --publish 80:80 \ - --publish 443:443 \ - --volume /server/letsencrypt/etc:/etc/nginx/certs:ro \ - --volume /etc/nginx/vhost.d \ - --volume /usr/share/nginx/html \ - --volume /var/run/docker.sock:/tmp/docker.sock:ro \ - jwilder/nginx-proxy -``` - -Then start ```nginx-proxy-letsencrypt```: -``` - docker run --detach \ - --name nginx-proxy-letsencrypt \ - --restart always \ - --volume /server/letsencrypt/etc:/etc/nginx/certs:rw \ - --volumes-from nginx-proxy \ - --volume /var/run/docker.sock:/var/run/docker.sock:ro \ - jrcs/letsencrypt-nginx-proxy-companion -``` Start the rest of your web server containers as usual. -Start another container for your ```mail.myserver.tld```. This will generate a Let's Encrypt certificate for your domain, which can be used by ```docker-mailserver```. It will also run a web server on port 80 at that address.: -``` +Start another container for your `mail.myserver.tld`. This will generate a Let's Encrypt certificate for your domain, which can be used by `docker-mailserver`. It will also run a web server on port 80 at that address: + +```sh docker run -d \ - --name webmail \ - -e "VIRTUAL_HOST=mail.myserver.tld" \ - -e "LETSENCRYPT_HOST=mail.myserver.tld" \ - -e "LETSENCRYPT_EMAIL=foo@bar.com" \ - library/nginx -``` -You may want to add ```-e LETSENCRYPT_TEST=true``` to the above while testing to avoid the Let's Encrypt certificate generation rate limits. - -Finally, start the mailserver with the docker-compose.yml -Make sure your mount path to the letsencrypt certificates is correct. -Inside your /path/to/mailserver/docker-compose.yml ( for the mailserver from this repo ) make sure volumes look like below example; - -``` - volumes: - - maildata:/var/mail - - mailstate:/var/mail-state - - ./config/:/tmp/docker-mailserver/ - - /server/letsencrypt/etc:/etc/letsencrypt/live + --name webmail \ + -e "VIRTUAL_HOST=mail.myserver.tld" \ + -e "LETSENCRYPT_HOST=mail.myserver.tld" \ + -e "LETSENCRYPT_EMAIL=foo@bar.com" \ + library/nginx ``` -Then +You may want to add `-e LETSENCRYPT_TEST=true` to the above while testing to avoid the Let's Encrypt certificate generation rate limits. -/path/to/mailserver/docker-compose up -d mail +Finally, start the mailserver with the `docker-compose.yml`. Make sure your mount path to the letsencrypt certificates is correct. +Inside your `/path/to/mailserver/docker-compose.yml` (for the mailserver from this repo) make sure volumes look like below example: +```yaml +volumes: + - maildata:/var/mail + - mailstate:/var/mail-state + - ./config/:/tmp/docker-mailserver/ + - /server/letsencrypt/etc:/etc/letsencrypt/live +``` -#### Example using docker, nginx-proxy and letsencrypt-nginx-proxy-companion with docker-compose -The following docker-compose.yml is the basic setup you need for using letsencrypt-nginx-proxy-companion. It is mainly derived from its own wiki/documenation. +Then: `/path/to/mailserver/docker-compose up -d mail` -```YAML +### Example using Docker, `nginx-proxy` and `letsencrypt-nginx-proxy-companion` with `docker-compose` + +The following `docker-compose.yml` is the basic setup you need for using `letsencrypt-nginx-proxy-companion`. It is mainly derived from its own wiki/documenation. + +```yaml version: "2" services: @@ -156,9 +184,9 @@ networks: name: nginx-proxy ``` -The second part of the setup is the actual mail container. So, in another folder, create another docker-compose.yml with the following content (Removed all ENV variables for this example): +The second part of the setup is the actual mail container. So, in another folder, create another `docker-compose.yml` with the following content (Removed all ENV variables for this example): -``` YAML +```yaml version: '2' services: mail: @@ -192,60 +220,62 @@ services: networks: - proxy-tier restart: always - + networks: proxy-tier: external: name: nginx-proxy - ``` -The mail container needs to have the letsencrypt certificate folder mounted as a volume. No further changes are needed. The second container is a dummy-sidecar we need, because the mail-container do not expose any web-ports. Set your ENV variables as you need. (VIRTUAL_HOST and LETSENCRYPT_HOST are mandandory, see documentation) +The mail container needs to have the letsencrypt certificate folder mounted as a volume. No further changes are needed. The second container is a dummy-sidecar we need, because the mail-container do not expose any web-ports. Set your ENV variables as you need. (`VIRTUAL_HOST` and `LETSENCRYPT_HOST` are mandandory, see documentation) +### Example using the Let's Encrypt Certificates on a Synology NAS -#### Example using the letsencrypt certificates on a Synology NAS +Version 6.2 and later of the Synology NAS DSM OS now come with an interface to generate and renew letencrypt certificates. Navigation into your DSM control panel and go to Security, then click on the tab Certificate to generate and manage letsencrypt certificates. -Version 6.2 and later of the Synology NAS DSM OS now come with an interface to generate and renew letencrypt certificates. Navigation into your DSM control panel and go to Security, then click on the tab Certificate to generate and manage letsencrypt certificates. Amongst other things, you can use these to secure your mail server. DSM locates the generated certificates in a folder below ```/usr/syno/etc/certificate/_archive/```. Navigate to that folder and note the 6 character random folder name of the certificate you'd like to use. Then, add the following to your ```docker-compose.yml``` declaration file: +Amongst other things, you can use these to secure your mail server. DSM locates the generated certificates in a folder below `/usr/syno/etc/certificate/_archive/`. -``` +Navigate to that folder and note the 6 character random folder name of the certificate you'd like to use. Then, add the following to your `docker-compose.yml` declaration file: + +```yaml volumes: - - /usr/syno/etc/certificate/_archive/YOUR_FOLDER/:/tmp/ssl -... + - /usr/syno/etc/certificate/_archive//:/tmp/ssl environment: - - SSL_TYPE=manual - - SSL_CERT_PATH=/tmp/ssl/fullchain.pem - - SSL_KEY_PATH=/tmp/ssl/privkey.pem - + - SSL_TYPE=manual + - SSL_CERT_PATH=/tmp/ssl/fullchain.pem + - SSL_KEY_PATH=/tmp/ssl/privkey.pem ``` + DSM-generated letsencrypt certificates get auto-renewed every three months. -### Caddy +## Caddy -If you are using Caddy to renew your certificates, please note that only RSA certificates work. Read [issue 1440](https://github.com/tomav/docker-mailserver/issues/1440) for details. In short for Caddy v1 the Caddyfile should look something like: +If you are using Caddy to renew your certificates, please note that only RSA certificates work. Read [#1440][github-issue-1440] for details. In short for Caddy v1 the `Caddyfile` should look something like: -``` +```caddyfile https://mail.domain.com { - tls yourcurrentemail@gmail.com { - key_type rsa2048 - } + tls yourcurrentemail@gmail.com { + key_type rsa2048 + } } ``` -For Caddy v2 you can specify the key_type in your server's global settings, which would end up looking something like this if you're using a Caddyfile: -``` -{ -debug -admin localhost:2019 -http_port 80 -https_port 443 -default_sni mywebserver.com -key_type rsa4096 +For Caddy v2 you can specify the `key_type` in your server's global settings, which would end up looking something like this if you're using a `Caddyfile`: + +```caddyfile +{ + debug + admin localhost:2019 + http_port 80 + https_port 443 + default_sni mywebserver.com + key_type rsa4096 } -```` +``` If you are instead using a json config for Caddy v2, you can set it in your site's TLS automation policies: -``` +```json { "apps": { "http": { @@ -309,8 +339,10 @@ If you are instead using a json config for Caddy v2, you can set it in your site } } ``` + The generated certificates can be mounted: -``` + +```yaml volumes: - ${CADDY_DATA_DIR}/certificates/acme-v02.api.letsencrypt.org-directory/mail.domain.com/mail.domain.com.crt:/etc/letsencrypt/live/mail.domain.com/fullchain.pem - ${CADDY_DATA_DIR}/certificates/acme-v02.api.letsencrypt.org-directory/mail.domain.com/mail.domain.com.key:/etc/letsencrypt/live/mail.domain.com/privkey.pem @@ -318,32 +350,32 @@ volumes: EC certificates fail in the TLS handshake: -``` +```log CONNECTED(00000003) 140342221178112:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:ssl/record/rec_layer_s3.c:1543:SSL alert number 40 no peer certificate available No client certificate CA names sent ``` -### Traefik +## Traefik [Traefik](https://github.com/containous/traefik) is an open-source Edge Router which handles ACME protocol using [lego](https://github.com/go-acme/lego). Traefik can request certificates for domains through the ACME protocol (see [Traefik's documentation about its ACME negotiation & storage mechanism](https://docs.traefik.io/https/acme/)). Traefik's router will take care of renewals, challenge negotiations, etc. -##### Traefik v2 +### Traefik v2 (For Traefik v1 see [next section](#traefik-v1)) Traefik's V2 storage format is natively supported if the `acme.json` store is mounted into the container at `/etc/letsencrypt/acme.json`. The file is also monitored for changes and will trigger a reload of the mail services. Lookup of the certificate domain happens in the following order: - 1. $SSL_DOMAIN - 2. $HOSTNAME - 3. $DOMAINNAME +1. `$SSL_DOMAIN` +2. `$HOSTNAME` +3. `$DOMAINNAME` -This allows for support of wild card certificates: `"SSL_DOMAIN=*.example.com"`. Here is an example setup for [docker-compose](https://docs.docker.com/compose/): +This allows for support of wild card certificates: `SSL_DOMAIN=*.example.com`. Here is an example setup for [`docker-compose`](https://docs.docker.com/compose/): -``` YAML +```yaml version: '3.8' services: mail: @@ -384,127 +416,150 @@ services: This setup only comes with one caveat: The domain has to be configured on another service for traefik to actually request it from lets-encrypt (`whoami` in this case). -##### Traefik V1 +### Traefik v1 -If you are using Traefik v1, you might want to _push_ your Traefik-managed certificates to the mailserver container, in order to reuse them. Not an easy task, but fortunately, [youtous/mailserver-traefik](https://github.com/youtous/docker-mailserver-traefik) is a certificate renewal service for docker-mailserver. +If you are using Traefik v1, you might want to _push_ your Traefik-managed certificates to the mailserver container, in order to reuse them. Not an easy task, but fortunately, [`youtous/mailserver-traefik`][youtous-mailtraefik] is a certificate renewal service for `docker-mailserver`. -Depending of your Traefik configuration, certificates may be stored using a file or a KV Store (consul, etcd...) Either way, certificates will be renewed by Traefik, then automatically pushed to the mailserver thanks to the cert-renewer service. Finally, dovecot and postfix will be restarted. +Depending of your Traefik configuration, certificates may be stored using a file or a KV Store (consul, etcd...) Either way, certificates will be renewed by Traefik, then automatically pushed to the mailserver thanks to the `cert-renewer` service. Finally, dovecot and postfix will be restarted. -Documentation: https://github.com/youtous/docker-mailserver-traefik - - -### Self-signed certificates (testing only) +## Self-Signed Certificates (Testing Only) You can easily generate a self-signed SSL certificate by using the following command: - docker run -ti --rm -v "$(pwd)"/config/ssl:/tmp/docker-mailserver/ssl -h mail.my-domain.com -t tvial/docker-mailserver generate-ssl-certificate +```sh +docker run -it --rm -v "$(pwd)"/config/ssl:/tmp/docker-mailserver/ssl -h mail.my-domain.com -t tvial/docker-mailserver generate-ssl-certificate - # Press enter - # Enter a password when needed - # Fill information like Country, Organisation name - # Fill "my-domain.com" as FQDN for CA, and "mail.my-domain.com" for the certificate. - # They HAVE to be different, otherwise you'll get a `TXT_DB error number 2` - # Don't fill extras - # Enter same password when needed - # Sign the certificate? [y/n]:y - # 1 out of 1 certificate requests certified, commit? [y/n]y +# Press enter +# Enter a password when needed +# Fill information like Country, Organisation name +# Fill "my-domain.com" as FQDN for CA, and "mail.my-domain.com" for the certificate. +# They HAVE to be different, otherwise you'll get a `TXT_DB error number 2` +# Don't fill extras +# Enter same password when needed +# Sign the certificate? [y/n]:y +# 1 out of 1 certificate requests certified, commit? [y/n]y - # will generate: - # config/ssl/mail.my-domain.com-key.pem (used in postfix) - # config/ssl/mail.my-domain.com-req.pem (only used to generate other files) - # config/ssl/mail.my-domain.com-cert.pem (used in postfix) - # config/ssl/mail.my-domain.com-combined.pem (used in courier) - # config/ssl/demoCA/cacert.pem (certificate authority) +# will generate: +# config/ssl/mail.my-domain.com-key.pem (used in postfix) +# config/ssl/mail.my-domain.com-req.pem (only used to generate other files) +# config/ssl/mail.my-domain.com-cert.pem (used in postfix) +# config/ssl/mail.my-domain.com-combined.pem (used in courier) +# config/ssl/demoCA/cacert.pem (certificate authority) +``` -Note that the certificate will be generate for the container `fqdn`, that is passed as `-h` argument. -Check the following page for more information regarding [postfix and SSL/TLS configuration](http://www.mad-hacking.net/documentation/linux/applications/mail/using-ssl-tls-postfix-courier.xml). +!!! note + The certificate will be generate for the container `fqdn`, that is passed as `-h` argument. + + Check the following page for more information regarding [postfix and SSL/TLS configuration](http://www.mad-hacking.net/documentation/linux/applications/mail/using-ssl-tls-postfix-courier.xml). To use the certificate: -* add `SSL_TYPE=self-signed` to your container environment variables -* if a matching certificate (files listed above) is found in `config/ssl`, it will be automatically setup in postfix and dovecot. You just have to place them in `config/ssl` folder. +- Add `SSL_TYPE=self-signed` to your container environment variables +- If a matching certificate (files listed above) is found in `config/ssl`, it will be automatically setup in postfix and dovecot. You just have to place them in `config/ssl` folder. -### Custom certificate files +## Custom Certificate Files You can also provide your own certificate files. Add these entries to your `docker-compose.yml`: - volumes: - - /etc/ssl:/tmp/ssl:ro - environment: - - SSL_TYPE=manual - - SSL_CERT_PATH=/tmp/ssl/cert/public.crt - - SSL_KEY_PATH=/tmp/ssl/private/private.key +```yaml +volumes: + - /etc/ssl:/tmp/ssl:ro +environment: + - SSL_TYPE=manual + - SSL_CERT_PATH=/tmp/ssl/cert/public.crt + - SSL_KEY_PATH=/tmp/ssl/private/private.key +``` This will mount the path where your ssl certificates reside as read-only under `/tmp/ssl`. Then all you have to do is to specify the location of your private key and the certificate. -Please note that you may have to restart your mailserver once the certificates change. +!!! note + You may have to restart your mailserver once the certificates change. -### Testing certificate +## Testing a Certificate is Valid -From your host: +- From your host: - docker exec mail openssl s_client -connect 0.0.0.0:25 -starttls smtp -CApath /etc/ssl/certs/ + ```sh + docker exec mail openssl s_client \ + -connect 0.0.0.0:25 \ + -starttls smtp \ + -CApath /etc/ssl/certs/ + ``` -or +- Or: - docker exec mail openssl s_client -connect 0.0.0.0:143 -starttls imap -CApath /etc/ssl/certs/ + ```sh + docker exec mail openssl s_client \ + -connect 0.0.0.0:143 \ + -starttls imap \ + -CApath /etc/ssl/certs/ + ``` - -And you should see the certificate chain, the server certificate and: - - Verify return code: 0 (ok) +And you should see the certificate chain, the server certificate and: `Verify return code: 0 (ok)` In addition, to verify certificate dates: - docker exec mail openssl s_client -connect 0.0.0.0:25 -starttls smtp -CApath /etc/ssl/certs/ 2>/dev/null | openssl x509 -noout -dates +```sh +docker exec mail openssl s_client \ + -connect 0.0.0.0:25 \ + -starttls smtp \ + -CApath /etc/ssl/certs/ \ + 2>/dev/null | openssl x509 -noout -dates +``` - -### Plain text access +## Plain-Text Access Not recommended for purposes other than testing. -Just add this to config/dovecot.cf: +Just add this to `config/dovecot.cf`: -``` +```cf ssl = yes disable_plaintext_auth=no ``` These options in conjunction mean: -``` -ssl=yes and disable_plaintext_auth=no: SSL/TLS is offered to the client, but the client isn't required to use it. The client is allowed to login with plaintext authentication even when SSL/TLS isn't enabled on the connection. This is insecure, because the plaintext password is exposed to the internet. -``` +- SSL/TLS is offered to the client, but the client isn't required to use it. +- The client is allowed to login with plaintext authentication even when SSL/TLS isn't enabled on the connection. +- **This is insecure**, because the plaintext password is exposed to the internet. -### Importing certificates obtained via another source -If you have another source for SSL/TLS certificates you can import them into the server via an external script. The external script can be found here: [external certificate import script](https://github.com/hanscees/dockerscripts/blob/master/scripts/tomav-renew-certs) +## Importing Certificates Obtained via Another Source + +If you have another source for SSL/TLS certificates you can import them into the server via an external script. The external script can be found here: [external certificate import script][hanscees-renewcerts]. The steps to follow are these: -1. Transport the new certificates to ./config/sll (/tmp/ssl in the container) -2. You should provide fullchain.key and privkey.pem -3. Place the script in ./config/ (or /tmp/docker-mailserver/ inside the container) -4. Make the script executable (chmod +x tomav-renew-certs.sh ) -5. Run the script: docker exec mail /tmp/docker-mailserver/tomav-renew-certs.sh + +1. Transport the new certificates to `./config/ssl` (`/tmp/ssl` in the container) +2. You should provide `fullchain.key` and `privkey.pem` +3. Place the script in `./config/` (or `/tmp/docker-mailserver/` inside the container) +4. Make the script executable (`chmod +x tomav-renew-certs.sh`) +5. Run the script: `docker exec mail /tmp/docker-mailserver/tomav-renew-certs.sh` If an error occurs the script will inform you. If not you will see both postfix and dovecot restart. -After the certificates have been loaded you can check the certificate: +After the certificates have been loaded you can check the certificate: -``` +```sh +openssl s_client \ + -servername mail.mydomain.net \ + -connect 192.168.0.72:465 \ + 2>/dev/null | openssl x509 -openssl s_client -servername mail.mydomain.net -connect 192.168.0.72:465 2>/dev/null | openssl x509 - -# or - -openssl s_client -servername mail.mydomain.net -connect mail.mydomain.net:465 2>/dev/null | openssl x509 +# or +openssl s_client \ + -servername mail.mydomain.net \ + -connect mail.mydomain.net:465 \ + 2>/dev/null | openssl x509 ``` Or you can check how long the new certificate is valid with commands like: -``` + +```sh export SITE_URL="mail.mydomain.net" -export SITE_IP_URL="192.168.0.72" ## can also be mail.mydomain.net -export SITE_SSL_PORT="465" ##imap port dovecot +export SITE_IP_URL="192.168.0.72" # can also be `mail.mydomain.net` +export SITE_SSL_PORT="993" # imap port dovecot ##works: check if certificate will expire in two weeks #2 weeks is 1209600 seconds @@ -513,39 +568,39 @@ export SITE_SSL_PORT="465" ##imap port dovecot #15 weeks is 9072000 certcheck_2weeks=`openssl s_client -connect ${SITE_IP_URL}:${SITE_SSL_PORT} \ - -servername ${SITE_URL} 2> /dev/null | openssl x509 -noout -checkend 1209600` + -servername ${SITE_URL} 2> /dev/null | openssl x509 -noout -checkend 1209600` #################################### -#notes: output can be +#notes: output can be #Certificate will not expire #Certificate will expire #################### - ``` What does the script that imports the certificates do: -1. Check if there are new certs in the /tmp/ssl folder -2. check with the ssl cert fingerprint if they differ from the current certificates -3. if so it will copy the certs to the right places -4. and restart postfix and dovecot -You can ofcourse run the script by cron once a week or something. In that way you could automate cert renewal. If you do so it is probably wise to run an automated check on certificate expiry as well. Such a check could look something like this: -``` +1. Check if there are new certs in the `/tmp/ssl` folder. +2. Check with the ssl cert fingerprint if they differ from the current certificates. +3. If so it will copy the certs to the right places. +4. And restart postfix and dovecot. +You can of course run the script by cron once a week or something. In that way you could automate cert renewal. If you do so it is probably wise to run an automated check on certificate expiry as well. Such a check could look something like this: + +```sh ## code below will alert if certificate expires in less than two weeks ## please adjust varables! ## make sure the mail -s command works! Test! export SITE_URL="mail.mydomain.net" -export SITE_IP_URL="192.168.2.72" ## can also be mail.mydomain.net -export SITE_SSL_PORT="465" ##imap port dovecot +export SITE_IP_URL="192.168.2.72" # can also be `mail.mydomain.net` +export SITE_SSL_PORT="993" # imap port dovecot export ALERT_EMAIL_ADDR="bill@gates321boom.com" certcheck_2weeks=`openssl s_client -connect ${SITE_IP_URL}:${SITE_SSL_PORT} \ - -servername ${SITE_URL} 2> /dev/null | openssl x509 -noout -checkend 1209600` + -servername ${SITE_URL} 2> /dev/null | openssl x509 -noout -checkend 1209600` #################################### -#notes: output can be +#notes: output can be #Certificate will not expire #Certificate will expire #################### @@ -555,27 +610,17 @@ certcheck_2weeks=`openssl s_client -connect ${SITE_IP_URL}:${SITE_SSL_PORT} \ ##automated check you might run by cron or something ## does tls/ssl certificate expire within two weeks? -if [ "$certcheck_2weeks" = "Certificate will not expire" ]; then - echo "all is wel, certwatch 2 weeks says $certcheck_2weeks" - else - echo "Cert seems to be expiring pretty soon, within two weeks: $certcheck_2weeks" - echo "we will send an alert email and log as well" - logger Certwatch: cert $SITE_URL will expire in two weeks - echo "Certwatch: cert $SITE_URL will expire in two weeks" | mail -s "cert $SITE_URL expires in two weeks " $ALERT_EMAIL_ADDR +if [ "$certcheck_2weeks" = "Certificate will not expire" ]; then + echo "all is well, certwatch 2 weeks says $certcheck_2weeks" + else + echo "Cert seems to be expiring pretty soon, within two weeks: $certcheck_2weeks" + echo "we will send an alert email and log as well" + logger Certwatch: cert $SITE_URL will expire in two weeks + echo "Certwatch: cert $SITE_URL will expire in two weeks" | mail -s "cert $SITE_URL expires in two weeks " $ALERT_EMAIL_ADDR fi - ``` - - - - - - - - - - - - - +[github-file-compose]: https://github.com/docker-mailserver/docker-mailserver/blob/master/docker-compose.yml +[github-issue-1440]: https://github.com/docker-mailserver/docker-mailserver/issues/1440 +[hanscees-renewcerts]: https://github.com/hanscees/dockerscripts/blob/master/scripts/tomav-renew-certs +[youtous-mailtraefik]: https://github.com/youtous/docker-mailserver-traefik diff --git a/docs/content/config/security/understanding-the-ports.md b/docs/content/config/security/understanding-the-ports.md index ba853e70..6e2b8bd5 100644 --- a/docs/content/config/security/understanding-the-ports.md +++ b/docs/content/config/security/understanding-the-ports.md @@ -1,8 +1,12 @@ +--- +title: 'Security | Understanding the Ports' +--- + ## Quick Reference Prefer Implicit TLS ports, they're more secure and if you use a Reverse Proxy, should be less hassle (although it's probably wiser to expose these ports directly to `docker-mailserver`). -## Overview of email ports +## Overview of Email Ports | Protocol | Explicit TLS1 | Implicit TLS | Purpose | |----------|--------------------------|-----------------|----------------------| @@ -11,56 +15,54 @@ Prefer Implicit TLS ports, they're more secure and if you use a Reverse Proxy, s | POP3 | 110 | 995 | Retrieval | | IMAP4 | 143 | 993 | Retrieval | -1. A connection *may* be secured over TLS when both ends support `STARTTLS`. On ports 110, 143 and 587, `docker-mailserver` will reject a connection that cannot be secured. Port 25 is [required](https://serverfault.com/questions/623692/is-it-still-wrong-to-require-starttls-on-incoming-smtp-messages) to support insecure connections. +1. A connection *may* be secured over TLS when both ends support `STARTTLS`. On ports 110, 143 and 587, `docker-mailserver` will reject a connection that cannot be secured. Port 25 is [required][ref-port25-mandatory] to support insecure connections. 2. Receives email, `docker-mailserver` additionally filters for spam and viruses. For submitting email to the server to be sent to third-parties, you should prefer the *submission* ports(465, 587) - which require authentication. Unless a relay host is configured(eg SendGrid), outgoing email will leave the server via port 25(thus outbound traffic must not be blocked by your provider or firewall). -3. A *submission* port since 2018 ([RFC 8314](https://tools.ietf.org/html/rfc8314)). Previously a secure variant of port 25. +3. A *submission* port since 2018 ([RFC 8314][rfc-8314]). Previously a secure variant of port 25. -### What ports should I use? (SMTP) +### What Ports Should I Use? (SMTP) -[![Best Practice - Ports (SMTP)](https://mermaid.ink/img/eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgc3ViZ3JhcGggeW91ci1zZXJ2ZXIgW1wiWW91ciBTZXJ2ZXJcIl1cbiAgICAgICAgaW5fMjUoMjUpIC0tPiBzZXJ2ZXJcbiAgICAgICAgaW5fNDY1KDQ2NSkgLS0-IHNlcnZlclxuICAgICAgICBzZXJ2ZXIoKFwiZG9ja2VyLW1haWxzZXJ2ZXI8YnIvPmhlbGxvQHdvcmxkLmNvbVwiKSlcbiAgICAgICAgc2VydmVyIC0tLSBvdXRfMjUoMjUpXG4gICAgICAgIHNlcnZlciAtLS0gb3V0XzQ2NSg0NjUpXG4gICAgZW5kXG5cbiAgICB0aGlyZC1wYXJ0eShcIlRoaXJkLXBhcnR5PGJyLz4oc2VuZGluZyB5b3UgZW1haWwpXCIpIC0tLXxcIlJlY2VpdmUgZW1haWwgZm9yPGJyLz5oZWxsb0B3b3JsZC5jb21cInwgaW5fMjVcblxuICAgIHN1YmdyYXBoIGNsaWVudHMgW1wiQ2xpZW50cyAoTVVBKVwiXVxuICAgICAgICBtdWEtY2xpZW50KFRodW5kZXJiaXJk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yZC1wYXJ0eShcIlRoaXJkLXBhcnR5PGJyLz4oc2VuZGluZyB5b3UgZW1haWwpXCIpIC0tLXxcIlJlY2VpdmUgZW1haWwgZm9yPGJyLz5oZWxsb0B3b3JsZC5jb21cInwgaW5fMjVcblxuICAgIHN1YmdyYXBoIGNsaWVudHMgW1wiQ2xpZW50cyAoTVVBKVwiXVxuICAgICAgICBtdWEtY2xpZW50KFRodW5kZXJiaXJkLDxici8-V2VibWFpbCw8YnIvPk11dHQsPGJyLz5ldGMpXG4gICAgICAgIG11YS1zZXJ2aWNlKEJhY2tlbmQgc29mdHdhcmU8YnIvPm9uIGFub3RoZXIgc2VydmVyKVxuICAgIGVuZFxuICAgIGNsaWVudHMgLS0tfFwiU2VuZCBlbWFpbCBhczxici8-aGVsbG9Ad29ybGQuY29tXCJ8IGluXzQ2NVxuXG4gICAgb3V0XzI1KDI1KSAtLT58XCJEaXJlY3Q8YnIvPkRlbGl2ZXJ5XCJ8IHRpbl8yNVxuICAgIG91dF80NjUoNDY1KSAtLT4gcmVsYXkoXCJNVEE8YnIvPlJlbGF5IFNlcnZlclwiKSAtLT4gdGluXzI1KDI1KVxuXG4gICAgc3ViZ3JhcGggdGhpcmQtcGFydHktc2VydmVyW1wiVGhpcmQtcGFydHkgU2VydmVyXCJdXG4gICAgICAgIHRoaXJkLXBhcnR5LW10YShcIk1UQTxici8-ZnJpZW5kQGV4YW1wbGUuY29tXCIpXG4gICAgICAgIHRpbl8yNSgyNSkgLS0-IHRoaXJkLXBhcnR5LW10YVxuICAgIGVuZCIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In0sInVwZGF0ZUVkaXRvciI6ZmFsc2V9) +[![Best Practice - Ports (SMTP)][asset-external-mermaid-smtp]][ref-mermaid-live-smtp] -
-Flowchart - Mermaid.js source: +??? "Flowchart - Mermaid.js source:" -View in the [Live Editor](https://mermaid-js.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAg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8-ZnJpZW5kQGV4YW1wbGUuY29tXCIpXG4gICAgICAgIHRpbl8yNSgyNSkgLS0-IHRoaXJkLXBhcnR5LW10YVxuICAgIGVuZCIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In0sInVwZGF0ZUVkaXRvciI6ZmFsc2V9). + View in the [Live Editor][ref-mermaid-live-smtp]. -``` -flowchart LR - subgraph your-server ["Your Server"] - in_25(25) --> server - in_465(465) --> server - server(("docker-mailserver
hello@world.com")) - server --- out_25(25) - server --- out_465(465) - end + ```mermaid + flowchart LR + subgraph your-server ["Your Server"] + in_25(25) --> server + in_465(465) --> server + server(("docker-mailserver
hello@world.com")) + server --- out_25(25) + server --- out_465(465) + end - third-party("Third-party
(sending you email)") ---|"Receive email for
hello@world.com"| in_25 + third-party("Third-party
(sending you email)") ---|"Receive email for
hello@world.com"| in_25 - subgraph clients ["Clients (MUA)"] - mua-client(Thunderbird,
Webmail,
Mutt,
etc) - mua-service(Backend software
on another server) - end - clients ---|"Send email as
hello@world.com"| in_465 + subgraph clients ["Clients (MUA)"] + mua-client(Thunderbird,
Webmail,
Mutt,
etc) + mua-service(Backend software
on another server) + end + clients ---|"Send email as
hello@world.com"| in_465 - out_25(25) -->|"Direct
Delivery"| tin_25 - out_465(465) --> relay("MTA
Relay Server") --> tin_25(25) + out_25(25) -->|"Direct
Delivery"| tin_25 + out_465(465) --> relay("MTA
Relay Server") --> tin_25(25) - subgraph third-party-server["Third-party Server"] - third-party-mta("MTA
friend@example.com") - tin_25(25) --> third-party-mta - end -``` + subgraph third-party-server["Third-party Server"] + third-party-mta("MTA
friend@example.com") + tin_25(25) --> third-party-mta + end + ``` --- -
+#### Inbound Traffic (On the left) - -#### Inbound Traffic (On the left): - **Port 25:** Think of this like a physical mailbox, it is open to receive email from anyone who wants to. `docker-mailserver` will actively filter email delivered on this port for spam or viruses and refuse mail from known bad sources. While you could also use this port internally to send email outbound without requiring authentication, you really should prefer the *Submission* ports(587, 465). - **Port 465(*and 587*):** This is the equivalent of a post office box where you would send email to be delivered on your behalf(`docker-mailserver` is that metaphorical post office, aka the MTA). Unlike port 25, these two ports are known as the *Submission* ports and require a valid email account on the server with a password to be able to send email to anyone outside of the server(an MTA you do not control, eg Outlook or Gmail). Prefer port 465 which provides Implicit TLS. -#### Outbound Traffic (On the Right): +#### Outbound Traffic (On the Right) + - **Port 25:** Send the email directly to the given email address MTA as possible. Like your own `docker-mailserver` port 25, this is the standard port for receiving email on, thus email will almost always arrive to the final MTA on this port. Note that, there may be additional MTAs further in the chain, but this would be the public facing one representing that email address. - **Port 465(*and 587*):** SMTP Relays are a popular choice to hand-off delivery of email through. Services like SendGrid are useful for bulk email(marketing) or when your webhost or ISP are preventing you from using standard ports like port 25 to send out email(which can be abused by spammers). @@ -70,11 +72,11 @@ flowchart LR #### Explicit TLS (aka Opportunistic TLS) - Opt-in Encryption -Communication on these ports begin in [cleartext](https://www.denimgroup.com/resources/blog/2007/10/cleartext-vs-pl/), indicating support for `STARTTLS`. If both client and server support `STARTTLS` the connection will be secured over TLS, otherwise no encryption will be used. +Communication on these ports begin in [cleartext][ref-clear-vs-plain], indicating support for `STARTTLS`. If both client and server support `STARTTLS` the connection will be secured over TLS, otherwise no encryption will be used. Support for `STARTTLS` is not always implemented correctly, which can lead to leaking credentials(client sending too early) prior to a TLS connection being established. Third-parties such as some ISPs have also been known to intercept the `STARTTLS` exchange, modifying network traffic to prevent establishing a secure connection. -Due to these security concerns, [RFC 8314 (Section 4.1)](https://tools.ietf.org/html/rfc8314#section-4.1) encourages you to **prefer Implicit TLS ports where possible**. +Due to these security concerns, [RFC 8314 (Section 4.1)][rfc-8314-s41] encourages you to **prefer Implicit TLS ports where possible**. #### Implicit TLS - Enforced Encryption @@ -86,12 +88,21 @@ Additionally, referring to port 465 as *SMTPS* would be incorrect, as it is a su ## Security -**TODO:** *This section should provide any related configuration advice, and probably expand on and link to resources about DANE, DNSSEC, MTA-STS and STARTTLS Policy list, with advice on how to configure/setup these added security layers.* +!!! todo + This section should provide any related configuration advice, and probably expand on and link to resources about DANE, DNSSEC, MTA-STS and STARTTLS Policy list, with advice on how to configure/setup these added security layers. -**TODO:** *A related section or page on ciphers used may be useful, although less important for users to be concerned about.* +!!! todo + A related section or page on ciphers used may be useful, although less important for users to be concerned about. ### TLS connections on mail servers, compared to web browsers Unlike with HTTP where a web browser client communicates directly with the server providing a website, a secure TLS connection as discussed below is not the equivalent safety that HTTPS provides when the transit of email (receiving or sending) is sent through third-parties, as the secure connection is only between two machines, any additional machines (MTAs) between the MUA and the MDA depends on them establishing secure connections between one another successfully. -Other machines that facilitate a connection that generally aren't taken into account can exist between a client and server, such as those where your connection passes through your ISP provider are capable of compromising a cleartext connection through interception. \ No newline at end of file +Other machines that facilitate a connection that generally aren't taken into account can exist between a client and server, such as those where your connection passes through your ISP provider are capable of compromising a cleartext connection through interception. + +[asset-external-mermaid-smtp]: https://mermaid.ink/img/eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgc3ViZ3JhcGggeW91ci1zZXJ2ZXIgW1wiWW91ciBTZXJ2ZXJcIl1cbiAgICAgICAgaW5fMjUoMjUpIC0tPiBzZXJ2ZXJcbiAgICAgICAgaW5fNDY1KDQ2NSkgLS0-IHNlcnZlclxuICAgICAgICBzZXJ2ZXIoKFwiZG9ja2VyLW1haWxzZXJ2ZXI8YnIvPmhlbGxvQHdvcmxkLmNvbVwiKSlcbiAgICAgICAgc2VydmVyIC0tLSBvdXRfMjUoMjUpXG4gICAgICAgIHNlcnZlciAtLS0gb3V0XzQ2NSg0NjUpXG4gICAgZW5kXG5cbiAgICB0aGlyZC1wYXJ0eShcIlRoaXJkLXBhcnR5PGJyLz4oc2VuZGluZyB5b3UgZW1haWwpXCIpIC0tLXxcIlJlY2VpdmUgZW1haWwgZm9yPGJyLz5oZWxsb0B3b3JsZC5jb21cInwgaW5fMjVcblxuICAgIHN1YmdyYXBoIGNsaWVudHMgW1wiQ2xpZW50cyAoTVVBKVwiXVxuICAgICAgICBtdWEtY2xpZW50KFRodW5kZXJiaXJkLDxici8-V2VibWFpbCw8YnIvPk11dHQsPGJyLz5ldGMpXG4gICAgICAgIG11YS1zZXJ2aWNlKEJhY2tlbmQgc29mdHdhcmU8YnIvPm9uIGFub3RoZXIgc2VydmVyKVxuICAgIGVuZFxuICAgIGNsaWVudHMgLS0tfFwiU2VuZCBlbWFpbCBhczxici8-aGVsbG9Ad29ybGQuY29tXCJ8IGluXzQ2NVxuXG4gICAgb3V0XzI1KDI1KSAtLT58XCJEaXJlY3Q8YnIvPkRlbGl2ZXJ5XCJ8IHRpbl8yNVxuICAgIG91dF80NjUoNDY1KSAtLT4gcmVsYXkoXCJNVEE8YnIvPlJlbGF5IFNlcnZlclwiKSAtLT4gdGluXzI1KDI1KVxuXG4gICAgc3ViZ3JhcGggdGhpcmQtcGFydHktc2VydmVyW1wiVGhpcmQtcGFydHkgU2VydmVyXCJdXG4gICAgICAgIHRoaXJkLXBhcnR5LW10YShcIk1UQTxici8-ZnJpZW5kQGV4YW1wbGUuY29tXCIpXG4gICAgICAgIHRpbl8yNSgyNSkgLS0-IHRoaXJkLXBhcnR5LW10YVxuICAgIGVuZCIsIm1lcm1haWQiOnsidGhlbWUiOiJkZWZhdWx0In0sInVwZGF0ZUVkaXRvciI6ZmFsc2V9 +[ref-clear-vs-plain]: https://www.denimgroup.com/resources/blog/2007/10/cleartext-vs-pl +[ref-port25-mandatory]: https://serverfault.com/questions/623692/is-it-still-wrong-to-require-starttls-on-incoming-smtp-messages +[ref-mermaid-live-smtp]: https://mermaid-js.github.io/mermaid-live-editor/#/edit/eyJjb2RlIjoiZmxvd2NoYXJ0IExSXG4gICAgc3ViZ3JhcGggeW91ci1zZXJ2ZXIgW1wiWW91ciBTZXJ2ZXJcIl1cbiAgICAgICAgaW5fMjUoMjUpIC0tPiBzZXJ2ZXJcbiAgICAgICAgaW5fNDY1KDQ2NSkgLS0-IHNlcnZlclxuICAgICAgICBzZXJ2ZXIoKFwiZG9ja2VyLW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: https://tools.ietf.org/html/rfc8314 +[rfc-8314-s41]: https://tools.ietf.org/html/rfc8314#section-4.1 diff --git a/docs/content/config/setup.sh.md b/docs/content/config/setup.sh.md index e33388c7..8b43a02c 100644 --- a/docs/content/config/setup.sh.md +++ b/docs/content/config/setup.sh.md @@ -1,8 +1,14 @@ -[`setup.sh`](https://github.com/docker-mailserver/docker-mailserver/blob/master/setup.sh) is an administration script that helps with the most common tasks, including initial configuration. It is intented to be used from the host machine, _not_ from within your running container. +--- +title: Your best friend setup.sh +hide: + - toc # Hide Table of Contents for this page +--- + +[`setup.sh`][github-file-setupsh] is an administration script that helps with the most common tasks, including initial configuration. It is intented to be used from the host machine, _not_ from within your running container. The latest version of the script is included in the `docker-mailserver` repository. You may retrieve it at any time by running this command in your console: -``` BASH +```sh wget https://raw.githubusercontent.com/docker-mailserver/docker-mailserver/master/setup.sh chmod a+x ./setup.sh ``` @@ -11,7 +17,7 @@ chmod a+x ./setup.sh Run `./setup.sh -h` and you'll get some usage information: -``` BASH +```bash setup.sh Bootstrapping Script Usage: ./setup.sh [-i IMAGE_NAME] [-c CONTAINER_NAME] [args] @@ -75,4 +81,6 @@ SUBCOMMANDS: ./setup.sh debug login help: Show this help dialogue -``` \ No newline at end of file +``` + +[github-file-setupsh]: https://github.com/docker-mailserver/docker-mailserver/blob/master/setup.sh diff --git a/docs/content/config/troubleshooting/debugging.md b/docs/content/config/troubleshooting/debugging.md index 102563ed..4d608847 100644 --- a/docs/content/config/troubleshooting/debugging.md +++ b/docs/content/config/troubleshooting/debugging.md @@ -1,54 +1,54 @@ -..todo.. - Please contribute more to help others debug this package +--- +title: 'Troubleshooting | Debugging' +--- -## Enable verbose debugging output +!!! info "Contributions Welcome!" + Please contribute your solutions to help the community :heart: -You may find it useful to enable the [DMS_DEBUG](https://github.com/tomav/docker-mailserver#dms_debug) environment variable. +## Enable Verbose Debugging Output -## Invalid username or Password +You may find it useful to enable the [`DMS_DEBUG`][github-file-env-dmsdebug] environment variable. +## Invalid Username or Password -1. Login Container +1. Shell into the container: -```bash -docker exec -it bash -``` + ```sh + docker exec -it bash + ``` -2. Check log files +2. Check log files in `/var/log/mail` could not find any mention of incorrect logins here neither in the dovecot logs. -`/var/log/mail` -could not find any mention of incorrect logins here -neither in the dovecot logs +3. Check the supervisors logs in `/var/log/supervisor`. You can find the logs for startup of fetchmail, postfix and others here - they might indicate problems during startup. -3. Check the supervisors logfiles -`/var/log/supervisor` -You can find the logs for startup of fetchmail, postfix and others here - they might indicate problems during startup - -4. Make sure you set your hostname to 'mail' or whatever you specified in your docker-compose.yml file or else your FQDN will be wrong +4. Make sure you set your hostname to `mail` or whatever you specified in your `docker-compose.yml` file or else your FQDN will be wrong. ## Installation Errors -1. During setup, if you get errors trying to edit files inside of the container, you likely need to install vi: +During setup, if you get errors trying to edit files inside of the container, you likely need to install `vi`: -``` bash +```sh sudo su -docker exec -it apt-get install -y vim +docker exec -it apt-get install -y vim ``` -## Testing Connection -I spent HOURS trying to debug "Connection Refused" and "Connection closed by foreign host" errors when trying to use telnet to troubleshoot my connection. I was also trying to connect from my email client (macOS mail) around the same time. Telnet had also worked earlier, so I was extremely confused as to why it suddenly stopped working. I stumbled upon fail2ban.log in my container. In short, when trying to get my macOS client working, I exceeded the number of failed login attempts and fail2ban put dovecot and postfix in jail! I got around it by whitelisting my ipaddresses (my ec2 instance and my local computer) -```bash +## Testing Connection + +I spent HOURS trying to debug "Connection Refused" and "Connection closed by foreign host" errors when trying to use telnet to troubleshoot my connection. I was also trying to connect from my email client (macOS mail) around the same time. Telnet had also worked earlier, so I was extremely confused as to why it suddenly stopped working. I stumbled upon `fail2ban.log` in my container. In short, when trying to get my macOS client working, I exceeded the number of failed login attempts and fail2ban put dovecot and postfix in jail! I got around it by whitelisting my ipaddresses (my ec2 instance and my local computer) + +```sh sudo su docker exec -ti mail bash cd /var/log cat fail2ban.log | grep dovecot -# Whitelist ip addresses: +# Whitelist IP addresses: fail2ban-client set dovecot addignoreip # Server fail2ban-client set postfix addignoreip fail2ban-client set dovecot addignoreip # Client fail2ban-client set postfix addignoreip -# this will delete the jails entirely - nuclear option +# This will delete the jails entirely - nuclear option fail2ban-client stop dovecot fail2ban-client stop postfix ``` @@ -59,4 +59,6 @@ Some hosting provides have a stealth block on port 25. Make sure to check with y Common hosting providers known to have this issue: - [Azure](https://docs.microsoft.com/en-us/azure/virtual-network/troubleshoot-outbound-smtp-connectivity) -- [AWS EC2](https://aws.amazon.com/premiumsupport/knowledge-center/ec2-port-25-throttle/) \ No newline at end of file +- [AWS EC2](https://aws.amazon.com/premiumsupport/knowledge-center/ec2-port-25-throttle/) + +[github-file-env-dmsdebug]: https://github.com/docker-mailserver/docker-mailserver/blob/master/ENVIRONMENT.md#dms_debug diff --git a/docs/content/config/troubleshooting/faq.md b/docs/content/config/troubleshooting/faq.md index 9ed73b52..f262f7a6 100644 --- a/docs/content/config/troubleshooting/faq.md +++ b/docs/content/config/troubleshooting/faq.md @@ -1,3 +1,7 @@ +--- +title: 'Troubleshooting | FAQ' +--- + ### What kind of database are you using? None! No database is required. Filesystem is the database. @@ -5,77 +9,91 @@ This image is based on config files that can be persisted using Docker volumes, ### Where are emails stored? -Mails are stored in `/var/mail/${domain}/${username}`. -You should use a [data volume container](https://medium.com/@ramangupta/why-docker-data-containers-are-good-589b3c6c749e#.uxyrp7xpu) for `/var/mail` to persist data. Otherwise, your data may be lost. +Mails are stored in `/var/mail/${domain}/${username}`. + +You should use a [data volume container](https://medium.com/@ramangupta/why-docker-data-containers-are-good-589b3c6c749e#.uxyrp7xpu) for `/var/mail` to persist data. + +Otherwise, your data may be lost. ### How to alter the running mailserver instance _without_ relaunching the container? -docker-mailserver aggregates multiple "sub-services", such as Postfix, Dovecot, Fail2ban, SpamAssasin, etc. In many cases, on may edit a sub-service's config and reload that very sub-service, without stopping and relaunching the whole mail server. +`docker-mailserver` aggregates multiple "sub-services", such as Postfix, Dovecot, Fail2ban, SpamAssasin, etc. In many cases, one may edit a sub-service's config and reload that very sub-service, without stopping and relaunching the whole mail server. In order to do so, you'll probably want to push your config updates to your server through a Docker volume, then restart the sub-service to apply your changes, using `supervisorctl`. For instance, after editing fail2ban's config: `supervisorctl restart fail2ban`. See [supervisorctl's documentation](http://supervisord.org/running.html#running-supervisorctl). -Tips: to add/update/delete an email account, there is no need to restart postfix/dovecot service inside the container after using setup.sh script. -For more information, see [issues/1639](https://github.com/tomav/docker-mailserver/issues/1639) +!!! tip + To add, update or delete an email account; there is no need to restart postfix / dovecot service inside the container after using `setup.sh` script. + + For more information, see [#1639][github-issue-1639]. ### How can I sync container with host date/time? Timezone? -Share the host's [`/etc/localtime`](https://www.freedesktop.org/software/systemd/man/localtime.html) with the docker-mailserver container, using a Docker volume: +Share the host's [`/etc/localtime`](https://www.freedesktop.org/software/systemd/man/localtime.html) with the `docker-mailserver` container, using a Docker volume: -``` +```yaml volumes: - /etc/localtime:/etc/localtime:ro ``` -(optional) Add one line to `.env` or `env-mailserver` to set timetzone for container, for example: -``` -TZ=Europe/Berlin -``` -check here for [`tz name list`](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) +!!! help "Optional" + Add one line to `.env` or `env-mailserver` to set timetzone for container, for example: + + ```env + TZ=Europe/Berlin + ``` + + Check here for the [`tz name list`](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) ### What is the file format? All files are using the Unix format with `LF` line endings. + Please do not use `CRLF`. ### What about backups? Assuming that you use `docker-compose` and a data volumes, you can backup your user mails like this: -``` +```sh docker run --rm -ti \ -v maildata:/var/mail \ -v mailstate:/var/mail-state \ -v /backup/mail:/backup \ alpine:3.2 \ - tar czf /backup/mail-`date +%y%m%d-%H%M%S`.tgz /var/mail /var/mail-state + tar czf "/backup/mail-$(date +%y%m%d-%H%M%S).tgz" /var/mail /var/mail-state find /backup/mail -type f -mtime +30 -exec rm -f {} \; ``` ### What about `mail-state` folder? + This folder consolidates all data generated by the server itself to persist when you upgrade. Example of data folder persisted: lib-amavis, lib-clamav, lib-fail2ban, lib-postfix, lib-postgrey, lib-spamassasin, lib-spamassassin, spool-postfix, ... ### How can I configure my email client? -Login are full email address (`user@domain.com`). - # imap - username: - password: - server: - imap port: 143 or 993 with ssl (recommended) - imap path prefix: INBOX +Login are full email address (`user@domain.com`). - # smtp - smtp port: 25 or 587 with ssl (recommended) - username: - password: +```properties +# imap +username: +password: +server: +imap port: 143 or 993 with ssl (recommended) +imap path prefix: INBOX + +# smtp +smtp port: 25 or 587 with ssl (recommended) +username: +password: +``` Please use `STARTTLS`. ### How can I manage my custom Spamassassin rules? + Antispam rules are managed in `config/spamassassin-rules.cf`. ### What are acceptable `SA_SPAM_SUBJECT` values? @@ -84,37 +102,40 @@ For no subject set `SA_SPAM_SUBJECT=undef`. For a trailing white-space subject one can define the whole variable with quotes in `docker-compose.yml`: -```docker-compose - environment: - - "SA_SPAM_SUBJECT=[SPAM] " +```yaml +environment: + - "SA_SPAM_SUBJECT=[SPAM] " ``` ### Can I use naked/bare domains (no host name)? -Yes, but not without some configuration changes. Normally it is assumed that docker-mailserver runs on a host with a name, so the fully qualified host name might be `mail.example.com` with the domain `example.com`. The MX records point to `mail.example.com`. To use a bare domain where the host name is `example.com` and the domain is also `example.com`, change mydestination from: +Yes, but not without some configuration changes. Normally it is assumed that `docker-mailserver` runs on a host with a name, so the fully qualified host name might be `mail.example.com` with the domain `example.com`. The MX records point to `mail.example.com`. -`mydestination = $myhostname, localhost.$mydomain, localhost` +To use a bare domain where the host name is `example.com` and the domain is also `example.com`, change `mydestination`: -To: +- From: `mydestination = $myhostname, localhost.$mydomain, localhost` +- To: `mydestination = localhost.$mydomain, localhost` -`mydestination = localhost.$mydomain, localhost` +Add the latter line to `config/postfix-main.cf`. That should work. Without that change there will be warnings in the logs like: -Add the latter line to config/postfix-main.cf. That should work. Without that change there will be warnings in the logs like: - -`warning: do not list domain example.com in BOTH mydestination and virtual_mailbox_domains` +```log +warning: do not list domain example.com in BOTH mydestination and virtual_mailbox_domains +``` Plus of course mail delivery fails. -### Why are Spamassassin x-headers not inserted into my sample.domain.com subdomain emails? +### Why are Spamassassin `x-headers` not inserted into my `sample.domain.com` subdomain emails? -In the default setup, amavis only applies Spamassassin x-headers into domains matching the template listed in the config file 05-domain_id (in the amavis defaults). The default setup @local_domains_acl = ( ".$mydomain" ); does not match subdomains. To match subdomains, you can override the @local_domains_acl directive in the amavis user config file 50-user with @local_domains_maps = ("."); to match any sort of domain template. +In the default setup, amavis only applies Spamassassin x-headers into domains matching the template listed in the config file (`05-domain_id` in the amavis defaults). -### How can I make SpamAssassin learn spam? +The default setup `@local_domains_acl = ( ".$mydomain" );` does not match subdomains. To match subdomains, you can override the `@local_domains_acl` directive in the amavis user config file `50-user` with `@local_domains_maps = (".");` to match any sort of domain template. + +### How can I make SpamAssassin better recognize spam? Put received spams in `.Junk/` imap folder using `SPAMASSASSIN_SPAM_TO_INBOX=1` and `MOVE_SPAM_TO_JUNK=1` and add a _user_ cron like the following: -``` -# This assumes you're having `environment: ONE_DIR=1` in the env-mailserver, +```conf +# This assumes you're having `environment: ONE_DIR=1` in the `mailserver.env`, # with a consolidated config in `/var/mail-state` # # m h dom mon dow command @@ -122,11 +143,12 @@ Put received spams in `.Junk/` imap folder using `SPAMASSASSIN_SPAM_TO_INBOX=1` 0 2 * * * docker exec mail sa-learn --spam /var/mail/domain.com/username/.Junk --dbpath /var/mail-state/lib-amavis/.spamassassin ``` -If you run the server with docker-compose, you can leverage on docker configs and the mailserver's own cron. This is less problematic than the simple solution shown above, because it decouples the learning from the host on which the mailserver is running and avoids errors if the server is not running. +If you run the server with `docker-compose`, you can leverage on docker configs and the mailserver's own cron. This is less problematic than the simple solution shown above, because it decouples the learning from the host on which the mailserver is running and avoids errors if the server is not running. The following configuration works nicely: -create a _system_ cron file: +Create a _system_ cron file: + ```sh # in the docker-compose.yml root directory mkdir cron @@ -135,8 +157,9 @@ chown root:root cron/sa-learn chmod 0644 cron/sa-learn ``` -edit the system cron file `nano cron/sa-learn`, and set an appropriate configuration: -``` +Edit the system cron file `nano cron/sa-learn`, and set an appropriate configuration: + +```conf # This assumes you're having `environment: ONE_DIR=1` in the env-mailserver, # with a consolidated config in `/var/mail-state` # @@ -159,20 +182,19 @@ edit the system cron file `nano cron/sa-learn`, and set an appropriate configura 30 3 * * * root sa-learn --ham /var/mail/otherdomain.com/*/cur* --dbpath /var/mail-state/lib-amavis/.spamassassin ``` -with plain docker-compose: -```docker-compose -version: "2" +Then with plain `docker-compose`: +```yaml services: mail: image: tvial/docker-mailserver:latest - # ... volumes: - ./cron/sa-learn:/etc/cron.d/sa-learn ``` -with [docker swarm](https://docs.docker.com/engine/swarm/configs/): -```docker-compose +Or with [docker swarm](https://docs.docker.com/engine/swarm/configs/): + +```yaml version: "3.3" services: @@ -191,19 +213,25 @@ configs: With the default settings, Spamassassin will require 200 mails trained for spam (for example with the method explained above) and 200 mails trained for ham (using the same command as above but using `--ham` and providing it with some ham mails). Until you provided these 200+200 mails, Spamassasin will not take the learned mails into account. For further reference, see the [Spamassassin Wiki](https://wiki.apache.org/spamassassin/BayesNotWorking). ### How can I configure a catch-all? + Considering you want to redirect all incoming e-mails for the domain `domain.tld` to `user1@domain.tld`, add the following line to `config/postfix-virtual.cf`: -``` + +```cf @domain.tld user1@domain.tld ``` -### How can I delete all the e-mails for a specific user? +### How can I delete all the emails for a specific user? + First of all, create a special alias named `devnull` by editing `config/postfix-aliases.cf`: + +```cf +devnull: /dev/null ``` -devnull: /dev/null -``` + Considering you want to delete all the e-mails received for `baduser@domain.tld`, add the following line to `config/postfix-virtual.cf`: -``` -baduser@domain.tld devnull + +```cf +baduser@domain.tld devnull ``` ### How do I have more control about what SPAMASSASIN is filtering? @@ -211,24 +239,26 @@ baduser@domain.tld devnull By default, SPAM and INFECTED emails are put to a quarantine which is not very straight forward to access. Several config settings are affecting this behavior: First, make sure you have the proper thresholds set: -``` + +```conf SA_TAG=-100000.0 SA_TAG2=3.75 SA_KILL=100000.0 -``` - -The very negative vaue in `SA_TAG` makes sure, that all emails have the Spamassasin headers included. -`SA_TAG2` is the actual threshold to set the YES/NO flag for spam detection. -`SA_KILL` needs to be very high, to make sure nothing is bounced at all (`SA_KILL` superseeds `SPAMASSASSIN_SPAM_TO_INBOX`) - -Make sure everything (including SPAM) is delivered to the inbox and not quarantined. ``` + +- The very negative vaue in `SA_TAG` makes sure, that all emails have the Spamassasin headers included. +- `SA_TAG2` is the actual threshold to set the YES/NO flag for spam detection. +- `SA_KILL` needs to be very high, to make sure nothing is bounced at all (`SA_KILL` superseeds `SPAMASSASSIN_SPAM_TO_INBOX`) + +Make sure everything (including SPAM) is delivered to the inbox and not quarantined: + +```conf SPAMASSASSIN_SPAM_TO_INBOX=1 ``` -Use `MOVE_SPAM_TO_JUNK=1` or create a sieve script which puts spam to the Junk folder. +Use `MOVE_SPAM_TO_JUNK=1` or create a sieve script which puts spam to the Junk folder: -``` +```sieve require ["comparator-i;ascii-numeric","relational","fileinto"]; if header :contains "X-Spam-Flag" "YES" { @@ -241,49 +271,59 @@ if header :contains "X-Spam-Flag" "YES" { ``` Create a dedicated mailbox for emails which are infected/bad header and everything amavis is blocking by default and put its address into `config/amavis.cf` -``` + +```cf $clean_quarantine_to = "amavis\@domain.com"; $virus_quarantine_to = "amavis\@domain.com"; $banned_quarantine_to = "amavis\@domain.com"; $bad_header_quarantine_to = "amavis\@domain.com"; $spam_quarantine_to = "amavis\@domain.com"; - ``` ### What kind of SSL certificates can I use? -You can use the same certificates you use with another mail server. + +You can use the same certificates you use with another mail server. + The only thing is that we provide a `self-signed` certificate tool and a `letsencrypt` certificate loader. -### I just moved from my old mail server but "it doesn't work". +### I just moved from my old mail server, but "it doesn't work"? + If this migration implies a DNS modification, be sure to wait for DNS propagation before opening an issue. -Few examples of symptoms can be found [here](https://github.com/tomav/docker-mailserver/issues/95) or [here](https://github.com/tomav/docker-mailserver/issues/97). -This could be related to a modification of your `MX` record, or the IP mapped to `mail.my-domain.tld`. Additionally, [validate your DNS configuration](https://intodns.com/). +Few examples of symptoms can be found [here][github-issue-95] or [here][github-issue-97]. + +This could be related to a modification of your `MX` record, or the IP mapped to `mail.my-domain.tld`. Additionally, [validate your DNS configuration](https://intodns.com/). If everything is OK regarding DNS, please provide [formatted logs](https://guides.github.com/features/mastering-markdown/) and config files. This will allow us to help you. If we're blind, we won't be able to do anything. -### Which system requirements needs my container to run `docker-mailserver` effectively? +### What system requirements are required to run `docker-mailserver` effectively? + 1 core and 1GB of RAM + swap partition is recommended to run `docker-mailserver` with clamav. Otherwise, it could work with 512M of RAM. -Please note that clamav can consume a lot of memory, as it reads the entire signature database into RAM. Current figure is about 850M and growing. If you get errors about clamav or amavis failing to allocate memory you need more RAM or more swap and of course docker must be allowed to use swap (not always the case). If you can't use swap at all you may need 3G RAM. +!!! note + Clamav can consume a lot of memory, as it reads the entire signature database into RAM. -### Is `docker-mailserver` running in a [rancher environment](http://rancher.com/rancher/)? + Current figure is about 850M and growing. If you get errors about clamav or amavis failing to allocate memory you need more RAM or more swap and of course docker must be allowed to use swap (not always the case). If you can't use swap at all you may need 3G RAM. -Yes, by Adding the Environment Variable `PERMIT_DOCKER: network`. +### Can `docker-mailserver` run in a [Rancher Environment](http://rancher.com/rancher/)? -**WARNING**: Adding the docker network's gateway to the list of trusted hosts, e.g. using the `network` or `connected-networks` option, can create an [**open relay**](https://en.wikipedia.org/wiki/Open_mail_relay), [for instance](https://github.com/tomav/docker-mailserver/issues/1405#issuecomment-590106498) if IPv6 is enabled on the host machine but not in Docker. ([#1405](https://github.com/tomav/docker-mailserver/issues/1405)) +Yes, by adding the environment variable `PERMIT_DOCKER: network`. -### How can I authenticate users with SMTP_ONLY? +!!! warning + Adding the docker network's gateway to the list of trusted hosts, e.g. using the `network` or `connected-networks` option, can create an [**open relay**](https://en.wikipedia.org/wiki/Open_mail_relay), for instance [if IPv6 is enabled on the host machine but not in Docker][github-issue-1405-comment]. -See https://github.com/tomav/docker-mailserver/issues/1247 for an example. +### How can I Authenticate Users with `SMTP_ONLY`? -*ToDo: Write a HowTo/UseCase/Tutorial about authentication with SMTP_ONLY.* +See [#1247][github-issue-1247] for an example. -### Common errors +!!! todo + Write a How-to / Use-Case / Tutorial about authentication with `SMTP_ONLY`. -``` +### Common Errors + +```log warning: connect to Milter service inet:localhost:8893: Connection refused # DMARC not running # => /etc/init.d/opendmarc restart @@ -299,66 +339,72 @@ mail amavis[1459]: (01459-01) (!!)AV: ALL VIRUS SCANNERS FAILED # Clamav is not running (not started or because you don't have enough memory) # => check requirements and/or start Clamav ``` -### Using behind proxy + +### How to use when behind a Proxy + Add to `/etc/postfix/main.cf` : -``` - -proxy_interfaces = X.X.X.X (your public IP) +```cf +proxy_interfaces = X.X.X.X (your public IP) ``` -### What about updates +### What About Updates You can of course use a own script or every now and then pull && stop && rm && start the images but there are tools available for this. -There is a page in the [Update and cleanup](Update-and-cleanup) wiki page that explains how to use it the docker way. +There is a page in the [Update and Cleanup][docs-maintenance] wiki page that explains how to use it the docker way. +### How to adjust settings with the `user-patches.sh` script -### Howto adjust settings with the user-patches.sh script Suppose you want to change a number of settings that are not listed as variables or add things to the server that are not included? This docker-container has a built-in way to do post-install processes. If you place a script called **user-patches.sh** in the config directory it will be run after all configuration files are set up, but before the postfix, amavis and other daemons are started. -The config file I am talking about is this volume in the yml file: - -`- ./config/:/tmp/docker-mailserver/` +The config file I am talking about is this volume in the yml file: `./config/:/tmp/docker-mailserver/` To place such a script you can just make it in the config dir, for instance like this: -`cd ./config` +```sh +cd ./config +touch user-patches.sh +chmod +x user-patches.sh +``` -`touch user-patches.sh` - -`chmod +x user-patches.sh` - -and then fill it with suitable code. +Then fill `user-patches.sh` with suitable code. If you want to test it you can move into the running container, run it and see if it does what you want. For instance: -`./setup.sh debug login # start shell in container` +```sh +# start shell in container +./setup.sh debug login -`cat /tmp/docker-mailserver/user-patches.sh #check the file` +# check the file +cat /tmp/docker-mailserver/user-patches.sh -`/tmp/docker-mailserver/user-patches.sh ## run the script` +# run the script +/tmp/docker-mailserver/user-patches.sh -`exit` +# exit the container shell back to the host shell +exit +``` -You can do a lot of things with such a script. You can find an example user-patches.sh script here: [example user-patches.sh script](https://github.com/hanscees/dockerscripts/blob/master/scripts/tomav-user-patches.sh) +You can do a lot of things with such a script. You can find an example `user-patches.sh` script here: [example `user-patches.sh` script][hanscees-userpatches] + +#### Special use-case - Patching the `supervisord` config -#### Special case patching supervisord config It seems worth noting, that the `user-patches.sh` gets executed trough supervisord. If you need to patch some supervisord config (e.g. `/etc/supervisor/conf.d/saslauth.conf`), the patching happens too late. + An easy workaround is to make the `user-patches.sh` reload the supervisord config after patching it: + ```bash #!/bin/bash sed -i 's/rimap -r/rimap/' /etc/supervisor/conf.d/saslauth.conf supervisorctl update ``` - - - - - - - - - +[docs-maintenance]: ../../advanced/maintenance/update-and-cleanup.md +[github-issue-95]: https://github.com/docker-mailserver/docker-mailserver/issues/95 +[github-issue-97]: https://github.com/docker-mailserver/docker-mailserver/issues/97 +[github-issue-1247]: https://github.com/docker-mailserver/docker-mailserver/issues/1247 +[github-issue-1405-comment]: https://github.com/docker-mailserver/docker-mailserver/issues/1405#issuecomment-590106498 +[github-issue-1639]: https://github.com/docker-mailserver/docker-mailserver/issues/1639 +[hanscees-userpatches]: https://github.com/hanscees/dockerscripts/blob/master/scripts/tomav-user-patches.sh diff --git a/docs/content/config/user-management/accounts.md b/docs/content/config/user-management/accounts.md index f69ad5a7..3bbda0ce 100644 --- a/docs/content/config/user-management/accounts.md +++ b/docs/content/config/user-management/accounts.md @@ -1,25 +1,37 @@ -## Adding a new account +--- +title: 'User Management | Accounts' +hide: + - toc # Hide Table of Contents for this page +--- -Users (email accounts) are managed in `/tmp/docker-mailserver/postfix-accounts.cf`. **_The best way to manage accounts is to use the reliable [setup.sh](https://github.com/docker-mailserver/docker-mailserver/wiki/Setup-docker-mailserver-using-the-script-setup.sh) script_**. Or you may directly add the _full_ email address and its encrypted password, separated by a pipe: +## Adding a New Account -``` INI +Users (email accounts) are managed in `/tmp/docker-mailserver/postfix-accounts.cf`. **_The best way to manage accounts is to use the reliable [`setup.sh`][docs-setupsh] script_**. Or you may directly add the _full_ email address and its encrypted password, separated by a pipe: + +```cf user1@domain.tld|{SHA512-CRYPT}$6$2YpW1nYtPBs2yLYS$z.5PGH1OEzsHHNhl3gJrc3D.YMZkvKw/vp.r5WIiwya6z7P/CQ9GDEJDr2G2V0cAfjDFeAQPUoopsuWPXLk3u1 user2@otherdomain.tld|{SHA512-CRYPT}$6$2YpW1nYtPBs2yLYS$z.5PGH1OEzsHHNhl3gJrc3D.YMZkvKw/vp.r5WIiwya6z7P/CQ9GDEJDr2G2V0cAfjDFeAQPUoopsuWPXLk3u1 -```` +``` In the example above, we've added 2 mail accounts for 2 different domains. Consequently, the mail server will automatically be configured for multi-domains. Therefore, to generate a new mail account data, directly from your docker host, you could for example run the following: -``` BASH +```sh docker run --rm \ -e MAIL_USER=user1@domain.tld \ -e MAIL_PASS=mypassword \ - -ti mailserver/docker-mailserver:latest \ + -it mailserver/docker-mailserver:latest \ /bin/sh -c 'echo "$MAIL_USER|$(doveadm pw -s SHA512-CRYPT -u $MAIL_USER -p $MAIL_PASS)"' >> config/postfix-accounts.cf ``` -You will then be asked for a password, and be given back the data for a new account entry, as text. To actually _add_ this new account, just copy all the output text in `config/postfix-accounts.cf` file of your running container. Please note the `doveadm pw` command lets you choose between several encryption schemes for the password. Use doveadm pw -l to get a list of the currently supported encryption schemes. +You will then be asked for a password, and be given back the data for a new account entry, as text. To actually _add_ this new account, just copy all the output text in `config/postfix-accounts.cf` file of your running container. -**Note**: Changes to the accounts list require a restart of the container, using `supervisord`. See [#552](https://github.com/docker-mailserver/docker-mailserver/issues/552). +!!! note + `doveadm pw` command lets you choose between several encryption schemes for the password. + + Use `doveadm pw -l` to get a list of the currently supported encryption schemes. + +!!! note + Changes to the accounts list require a restart of the container, using `supervisord`. See [#552][github-issue-552]. --- @@ -27,4 +39,7 @@ You will then be asked for a password, and be given back the data for a new acco - `imap-quota` is enabled and allow clients to query their mailbox usage. - When the mailbox is deleted, the quota directive is deleted as well. -- Dovecot quotas support LDAP, **but it's not implemented** (_PR are welcome!_). \ No newline at end of file +- Dovecot quotas support LDAP, **but it's not implemented** (_PR are welcome!_). + +[docs-setupsh]: ../setup.sh.md +[github-issue-552]: https://github.com/docker-mailserver/docker-mailserver/issues/552 diff --git a/docs/content/config/user-management/aliases.md b/docs/content/config/user-management/aliases.md index 95f4c81d..2393eea2 100644 --- a/docs/content/config/user-management/aliases.md +++ b/docs/content/config/user-management/aliases.md @@ -1,13 +1,17 @@ +--- +title: 'User Management | Aliases' +--- + Please read the [Postfix documentation on virtual aliases](http://www.postfix.org/VIRTUAL_README.html#virtual_alias) first. -You can use [setup.sh](https://github.com/docker-mailserver/docker-mailserver/wiki/Setup-docker-mailserver-using-the-script-setup.sh#alias) instead of creating and editing files manually. Aliases are managed in `/tmp/docker-mailserver/postfix-virtual.cf`. An alias is a _full_ email address that will either be: +You can use [`setup.sh`][docs-setupsh] instead of creating and editing files manually. Aliases are managed in `/tmp/docker-mailserver/postfix-virtual.cf`. An alias is a _full_ email address that will either be: * delivered to an existing account registered in `/tmp/docker-mailserver/postfix-accounts.cf` * redirected to one or more other email addresses Alias and target are space separated. An example on a server with domain.tld as its domain: -``` INI +```cf # Alias delivered to an existing account alias1@domain.tld user1@domain.tld @@ -15,20 +19,23 @@ alias1@domain.tld user1@domain.tld alias2@domain.tld external@gmail.com ``` -### Configuring regexp aliases +## Configuring RegExp Aliases -Additional regexp aliases can be configured by placing them into `config/postfix-regexp.cf`. The regexp aliases get evaluated after the virtual aliases (`/tmp/docker-mailserver/postfix-virtual.cf`). For example, the following `config/postfix-regexp.cf` causes all email to "test" users to be delivered to qa@example.com: +Additional regexp aliases can be configured by placing them into `config/postfix-regexp.cf`. The regexp aliases get evaluated after the virtual aliases (`/tmp/docker-mailserver/postfix-virtual.cf`). For example, the following `config/postfix-regexp.cf` causes all email to "test" users to be delivered to `qa@example.com`: -``` INI +```cf /^test[0-9][0-9]*@example.com/ qa@example.com ``` -### Address tags (extension delimiters) as an alternative to aliases +## Address Tags (Extension Delimiters) an Alternative to Aliases -Postfix supports so-called address tags, in the form of plus (+) tags - i.e. address+tag@example.com will end up at address@example.com. This is configured by default and the (configurable !) separator is set to `+`. For more info, see [How to use Address Tagging (user+tag@example.com) with Postfix](https://www.stevejenkins.com/blog/2011/03/how-to-use-address-tagging-usertagexample-com-with-postfix/) and the [official documentation](http://www.postfix.org/postconf.5.html#recipient_delimiter). +Postfix supports so-called address tags, in the form of plus (+) tags - i.e. address+tag@example.com will end up at address@example.com. This is configured by default and the (configurable !) separator is set to `+`. For more info, see [How to use Address Tagging (`user+tag@example.com`) with Postfix](https://www.stevejenkins.com/blog/2011/03/how-to-use-address-tagging-usertagexample-com-with-postfix/) and the [official documentation](http://www.postfix.org/postconf.5.html#recipient_delimiter). -Note that if you do decide to change the configurable separator, you must add the same line to *both* `config/postfix-main.cf` and `config/dovecot.cf`, because Dovecot is acting as the delivery agent. For example, to switch to `-`, add: +!!! note + If you do decide to change the configurable separator, you must add the same line to *both* `config/postfix-main.cf` and `config/dovecot.cf`, because Dovecot is acting as the delivery agent. For example, to switch to `-`, add: -``` INI +```cf recipient_delimiter = - ``` + +[docs-setupsh]: ../setup.sh.md diff --git a/docs/content/index.md b/docs/content/index.md index ef77024d..942be6f8 100644 --- a/docs/content/index.md +++ b/docs/content/index.md @@ -1,11 +1,26 @@ -### Welcome to the extended documentation for docker-mailserver! +--- +title: Home +--- -Please first have a look at the [`README.md`](https://github.com/docker-mailserver/docker-mailserver/blob/master/README.md) to setup and configure this server. This wiki provides you with advanced configuration, detailed examples, hints - see navigation on the right side. +# Welcome to the Extended Documentation for `docker-mailserver`! -#### To get you started +Please first have a look at the [`README.md`][github-file-readme] to setup and configure this server. -1. The script `setup.sh` is supplied with this project. It supports you in **configuring and administrating** your server. Information on how to get it and how to use it is available [on a dedicated page](https://github.com/docker-mailserver/docker-mailserver/wiki/setup.sh). +This wiki provides you with advanced configuration, detailed examples, and hints. + +## Getting Started + +1. The script [`setup.sh`][github-file-setupsh] is supplied with this project. It supports you in **configuring and administrating** your server. Information on how to get it and how to use it is available [on a dedicated page][docs-setupsh]. 2. Be aware that advanced tasks may still require tweaking environment variables, reading through documentation and sometimes inspecting your running container for debugging purposes. After all, a mail server is a complex arrangement of various programs. -3. A list of all configuration options is provided in [`ENVIRONMENT.md`](https://github.com/docker-mailserver/docker-mailserver/blob/master/ENVIRONMENT.md). The [`README.md`](https://github.com/docker-mailserver/docker-mailserver/blob/master/REEADME.md) is a good starting point to understand what this image is capable of. -4. A list of all optional and automatically created configuration files and directories is available [on the dedicated page](https://github.com/docker-mailserver/docker-mailserver/wiki/List-of-optional-config-files-&-directories). -5. See the [FAQ](https://github.com/docker-mailserver/docker-mailserver/wiki/FAQ-and-Tips) for some more tips! +3. A list of all configuration options is provided in [`ENVIRONMENT.md`][github-file-env]. The [`README.md`][github-file-readme] is a good starting point to understand what this image is capable of. +4. A list of all optional and automatically created configuration files and directories is available [on the dedicated page][docs-optionalconfig]. + +!!! tip + See the [FAQ][docs-faq] for some more tips! + +[docs-faq]: ./config/troubleshooting/faq.md +[docs-optionalconfig]: ./advanced/optional-config.md +[docs-setupsh]: ./config/setup.sh.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 diff --git a/docs/content/introduction.md b/docs/content/introduction.md index feadc837..66d58f14 100644 --- a/docs/content/introduction.md +++ b/docs/content/introduction.md @@ -1,11 +1,18 @@ -What is a mail server and how does it perform its duty? +--- +title: An Introduction to Mail Servers +--- + +# An Introduction to Mail Servers + +What is a mail server and how does it perform its duty? + Here's an introduction to the field that covers everything you need to know to get started with `docker-mailserver`. -## Anatomy of a mail server +## Anatomy of a Mail Server -A mail server is only a part of a [client-server relationship](https://en.wikipedia.org/wiki/Client%E2%80%93server_model) aimed at exchanging information in the form of [emails](https://en.wikipedia.org/wiki/Email). Exchanging emails requires using specific means (programs and protocols). +A mail server is only a part of a [client-server relationship][wikipedia-clientserver] aimed at exchanging information in the form of [emails][wikipedia-email]. Exchanging emails requires using specific means (programs and protocols). -`docker-mailserver` provides you with the server portion, whereas the client can be anything from a terminal via text-based software (eg. [Mutt](https://en.wikipedia.org/wiki/Mutt_(email_client))) to a fully-fledged desktop application (eg. [Mozilla Thunderbird](https://en.wikipedia.org/wiki/Mozilla_Thunderbird), [Microsoft Outlook](https://en.wikipedia.org/wiki/Microsoft_Outlook)…), to a web interface, etc. +`docker-mailserver` provides you with the server portion, whereas the client can be anything from a terminal via text-based software (eg. [Mutt][software-mutt]) to a fully-fledged desktop application (eg. [Mozilla Thunderbird][software-thunderbird], [Microsoft Outlook][software-outlook]…), to a web interface, etc. Unlike the client-side where usually a single program is used to perform retrieval and viewing of emails, the server-side is composed of many specialized components. The mail server is capable of accepting, forwarding, delivering, storing and overall exchanging messages, but each one of those tasks is actually handled by a specific piece of software. All of these "agents" must be integrated with one another for the exchange to take place. @@ -13,11 +20,11 @@ Unlike the client-side where usually a single program is used to perform retriev ## Components -The following components are required to create a [complete delivery chain](https://en.wikipedia.org/wiki/Email_agent_(infrastructure)): +The following components are required to create a [complete delivery chain][wikipedia-emailagent]: -- MUA: a [Mail User Agent](https://en.wikipedia.org/wiki/Email_client) is basically any client/program capable of sending emails to arbitrary mail servers; while also capable of fetching emails from mail servers for presenting them to the end users. -- MTA: a [Mail Transfer Agent](https://en.wikipedia.org/wiki/Message_transfer_agent) is the so-called "mail server" as seen from the MUA's perspective. It's a piece of software dedicated to accepting submitted emails, then forwarding them-where exactly will depend on an email's final destination. If the receiving MTA is responsible for the hostname the email is sent to, then an MTA is to forward that email to an MDA (see below). Otherwise, it is to transfer (ie. forward, relay) to another MTA, "closer" to the email's final destination. -- MDA: a [Mail Delivery Agent](https://en.wikipedia.org/wiki/Mail_delivery_agent) is responsible for accepting emails from an MTA and dropping them into their recipients' mailboxes, whichever the form. +- MUA: a [Mail User Agent][wikipedia-mua] is basically any client/program capable of sending emails to arbitrary mail servers; while also capable of fetching emails from mail servers for presenting them to the end users. +- MTA: a [Mail Transfer Agent][wikipedia-mta] is the so-called "mail server" as seen from the MUA's perspective. It's a piece of software dedicated to accepting submitted emails, then forwarding them-where exactly will depend on an email's final destination. If the receiving MTA is responsible for the hostname the email is sent to, then an MTA is to forward that email to an MDA (see below). Otherwise, it is to transfer (ie. forward, relay) to another MTA, "closer" to the email's final destination. +- MDA: a [Mail Delivery Agent][wikipedia-mda] is responsible for accepting emails from an MTA and dropping them into their recipients' mailboxes, whichever the form. Here's a schematic view of mail delivery: @@ -60,7 +67,7 @@ For instance, Postfix is both an SMTP server (accepting emails) and a relaying M The exact relationship between all the components and their respective (sometimes shared) responsibilities is beyond the scope of this document. Please explore this wiki & the web to get more insights about `docker-mailserver`'s toolchain. -## About security & ports +## About Security & Ports In the previous section, different components were outlined. Each one of those is responsible for a specific task, it has a specific purpose. @@ -70,7 +77,7 @@ Three main purposes exist when it comes to exchanging emails: - _Transfer_ (aka. _Relay_): for an MTA, the act of sending actual email data over the network, toward another MTA (server) closer to the final destination (where an MTA will forward data to an MDA). - _Retrieval_: for a MUA (client), the act of fetching actual email data over the network, from an MDA. -Postfix handles Submission (and might handle Relay), whereas Dovecot handles Retrieval. They both need to be accessible by MUAs in order to act as servers, therefore they expose public endpoints on specific TCP ports (see. [_Understanding the ports_](https://github.com/tomav/docker-mailserver/wiki/Understanding-the-ports) for more details). Those endpoints _may_ be secured, using an encryption scheme and TLS certificates. +Postfix handles Submission (and might handle Relay), whereas Dovecot handles Retrieval. They both need to be accessible by MUAs in order to act as servers, therefore they expose public endpoints on specific TCP ports (see. [_Understanding the ports_][docs-understandports] for more details). Those endpoints _may_ be secured, using an encryption scheme and TLS certificates. When it comes to the specifics of email exchange, we have to look at protocols and ports enabled to support all the identified purposes. There are several valid options and they've been evolving overtime. @@ -100,9 +107,9 @@ Read on to expand your understanding and learn about `docker-mailserver`'s confi ### Submission - SMTP -For a MUA to send an email to an MTA, it needs to establish a connection with that server, then push data packets over a network that both the MUA (client) and the MTA (server) are connected to. The server implements the [SMTP](https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol) protocol, which makes it capable of handling _Submission_. +For a MUA to send an email to an MTA, it needs to establish a connection with that server, then push data packets over a network that both the MUA (client) and the MTA (server) are connected to. The server implements the [SMTP][wikipedia-smtp] protocol, which makes it capable of handling _Submission_. -In the case of `docker-mailserver`, the MTA (SMTP server) is Postfix. The MUA (client) may vary, yet its Submission request is performed as [TCP](https://en.wikipedia.org/wiki/Transmission_Control_Protocol) packets sent over the _public_ internet. This exchange of information may be secured in order to counter eavesdropping. +In the case of `docker-mailserver`, the MTA (SMTP server) is Postfix. The MUA (client) may vary, yet its Submission request is performed as [TCP][wikipedia-tcp] packets sent over the _public_ internet. This exchange of information may be secured in order to counter eavesdropping. #### Two kinds of Submission @@ -132,23 +139,24 @@ Me ---------------> ┤ ├ -----------------> ┊ ##### Outward Submission -The best practice as of 2020 when it comes to securing Outward Submission is to use _Implicit TLS connection via ESMTP on port 465_ (see [RFC 8314](https://tools.ietf.org/html/rfc8314)). Let's break it down. +The best practice as of 2020 when it comes to securing Outward Submission is to use _Implicit TLS connection via ESMTP on port 465_ (see [RFC 8314][rfc-8314]). Let's break it down. -- Implicit TLS means the server _enforces_ the client into using an encrypted TCP connection, using [TLS](https://en.wikipedia.org/wiki/Transport_Layer_Security). With this kind of connection, the MUA _has_ to establish a TLS-encrypted connection from the get go (TLS is implied, hence the name "Implicit"). Any client attempting to either submit email in cleartext (unencrypted, not secure), or requesting a cleartext connection to be upgraded to a TLS-encrypted one using `STARTTLS`, is to be denied. Implicit TLS is sometimes called Enforced TLS for that reason. -- [ESMTP](https://en.wikipedia.org/wiki/ESMTP) is [SMTP](https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol) + extensions. It's the version of the SMTP protocol that most mail servers speak nowadays. For the purpose of this documentation, ESMTP and SMTP are synonymous. +- Implicit TLS means the server _enforces_ the client into using an encrypted TCP connection, using [TLS][wikipedia-tls]. With this kind of connection, the MUA _has_ to establish a TLS-encrypted connection from the get go (TLS is implied, hence the name "Implicit"). Any client attempting to either submit email in cleartext (unencrypted, not secure), or requesting a cleartext connection to be upgraded to a TLS-encrypted one using `STARTTLS`, is to be denied. Implicit TLS is sometimes called Enforced TLS for that reason. +- [ESMTP][wikipedia-esmtp] is [SMTP][wikipedia-smtp] + extensions. It's the version of the SMTP protocol that most mail servers speak nowadays. For the purpose of this documentation, ESMTP and SMTP are synonymous. - Port 465 is the reserved TCP port for Implicit TLS Submission (since 2018). There is actually a boisterous history to that ports usage, but let's keep it simple. -> Note: This Submission setup is sometimes refered to as [SMTPS](https://en.wikipedia.org/wiki/SMTPS). Long story short: this is incorrect and should be avoided. +!!! note + This Submission setup is sometimes refered to as [SMTPS][wikipedia-smtps]. Long story short: this is incorrect and should be avoided. -Although a very satisfactory setup, Implicit TLS on port 465 is somewhat "cutting edge". There exists another well established mail Submission setup that must be supported as well, SMTP+STARTTLS on port 587. It uses Explicit TLS: the client starts with a cleartext connection, then the server informs a TLS-encrypted "upgraded" connection may be established, and the client _may_ eventually decide to establish it prior to the Submission. Basically it's an opportunistic, opt-in TLS upgrade of the connection between the client and the server, at the client's discretion, using a mechanism known as [STARTTLS](https://en.wikipedia.org/wiki/Opportunistic_TLS) that both ends need to implement. +Although a very satisfactory setup, Implicit TLS on port 465 is somewhat "cutting edge". There exists another well established mail Submission setup that must be supported as well, SMTP+STARTTLS on port 587. It uses Explicit TLS: the client starts with a cleartext connection, then the server informs a TLS-encrypted "upgraded" connection may be established, and the client _may_ eventually decide to establish it prior to the Submission. Basically it's an opportunistic, opt-in TLS upgrade of the connection between the client and the server, at the client's discretion, using a mechanism known as [STARTTLS][wikipedia-starttls] that both ends need to implement. -In many implementations, the mail server doesn't enforce TLS encryption, for backwards compatibility. Clients are thus free to deny the TLS-upgrade proposal (or [misled by a hacker](https://security.stackexchange.com/questions/168998/what-happens-if-starttls-dropped-in-smtp) about STARTTLS not being available), and the server accepts unencrypted (cleartext) mail exchange, which poses a confidentiality threat and, to some extent, spam issues. [RFC 8314 (section 3.3)](https://tools.ietf.org/html/rfc8314) recommends for mail servers to support both Implicit and Explicit TLS for Submission, _and_ to enforce TLS-encryption on ports 587 (Explicit TLS) and 465 (Implicit TLS). That's exactly `docker-mailserver`'s default configuration: abiding by RFC 8314, it [enforces a strict (`encrypt`) STARTTLS policy](http://www.postfix.org/postconf.5.html#smtpd_tls_security_level), where a denied TLS upgrade terminates the connection thus (hopefully but at the client's discretion) preventing unencrypted (cleartext) Submission. +In many implementations, the mail server doesn't enforce TLS encryption, for backwards compatibility. Clients are thus free to deny the TLS-upgrade proposal (or [misled by a hacker](https://security.stackexchange.com/questions/168998/what-happens-if-starttls-dropped-in-smtp) about STARTTLS not being available), and the server accepts unencrypted (cleartext) mail exchange, which poses a confidentiality threat and, to some extent, spam issues. [RFC 8314 (section 3.3)][rfc-8314-s33] recommends for mail servers to support both Implicit and Explicit TLS for Submission, _and_ to enforce TLS-encryption on ports 587 (Explicit TLS) and 465 (Implicit TLS). That's exactly `docker-mailserver`'s default configuration: abiding by RFC 8314, it [enforces a strict (`encrypt`) STARTTLS policy](http://www.postfix.org/postconf.5.html#smtpd_tls_security_level), where a denied TLS upgrade terminates the connection thus (hopefully but at the client's discretion) preventing unencrypted (cleartext) Submission. - **`docker-mailserver`'s default configuration enables and _requires_ Explicit TLS (STARTTLS) on port 587 for Outward Submission.** - It does not enable Implicit TLS Outward Submission on port 465 by default. One may enable it through simple custom configuration, either as a replacement or (better!) supplementary mean of secure Submission. - It does not support old MUAs (clients) not supporting TLS encryption on ports 587/465 (those should perform Submission on port 25, more details below). One may relax that constraint through advanced custom configuration, for backwards compatibility. -A final Outward Submission setup exists and is akin SMTP+STARTTLS on port 587, but on port 25. That port has historically been reserved specifically for unencrypted (cleartext) mail exchange though, making STARTTLS a bit wrong to use. As is expected by [RFC 5321](https://tools.ietf.org/html/rfc5321), `docker-mailserver` uses port 25 for unencrypted Submission in order to support older clients, but most importantly for unencrypted Transfer/Relay between MTAs. +A final Outward Submission setup exists and is akin SMTP+STARTTLS on port 587, but on port 25. That port has historically been reserved specifically for unencrypted (cleartext) mail exchange though, making STARTTLS a bit wrong to use. As is expected by [RFC 5321][rfc-5321], `docker-mailserver` uses port 25 for unencrypted Submission in order to support older clients, but most importantly for unencrypted Transfer/Relay between MTAs. - **`docker-mailserver`'s default configuration also enables unencrypted (cleartext) on port 25 for Outward Submission.** - It does not enable Explicit TLS (STARTTLS) on port 25 by default. One may enable it through advanced custom configuration, either as a replacement (bad!) or as a supplementary mean of secure Outward Submission. @@ -176,13 +184,13 @@ Me -- STARTTLS ---> ┤(587) My MTA │ ┊ Third-part ### Retrieval - IMAP -A MUA willing to fetch an email from a mail server will most likely communicate with its [IMAP](https://en.wikipedia.org/wiki/IMAP) server. As with SMTP described earlier, communication will take place in the form of data packets exchanged over a network that both the client and the server are connected to. The IMAP protocol makes the server capable of handling _Retrieval_. +A MUA willing to fetch an email from a mail server will most likely communicate with its [IMAP][wikipedia-imap] server. As with SMTP described earlier, communication will take place in the form of data packets exchanged over a network that both the client and the server are connected to. The IMAP protocol makes the server capable of handling _Retrieval_. -In the case of `docker-mailserver`, the IMAP server is Dovecot. The MUA (client) may vary, yet its Retrieval request is performed as [TCP](https://en.wikipedia.org/wiki/Transmission_Control_Protocol) packets sent over the _public_ internet. This exchange of information may be secured in order to counter eavesdropping. +In the case of `docker-mailserver`, the IMAP server is Dovecot. The MUA (client) may vary, yet its Retrieval request is performed as [TCP][wikipedia-tcp] packets sent over the _public_ internet. This exchange of information may be secured in order to counter eavesdropping. -Again, as with SMTP described earlier, the IMAP protocol may be secured with either Implicit TLS (aka. [IMAPS](https://en.wikipedia.org/wiki/IMAPS)/IMAP4S) or Explicit TLS (using STARTTLS). +Again, as with SMTP described earlier, the IMAP protocol may be secured with either Implicit TLS (aka. [IMAPS][wikipedia-imaps] / IMAP4S) or Explicit TLS (using STARTTLS). -The best practice as of 2020 is to enforce IMAPS on port 993, rather than IMAP+STARTTLS on port 143 (see [RFC 8314](https://tools.ietf.org/html/rfc8314)); yet the latter is usually provided for backwards compatibility. +The best practice as of 2020 is to enforce IMAPS on port 993, rather than IMAP+STARTTLS on port 143 (see [RFC 8314][rfc-8314]); yet the latter is usually provided for backwards compatibility. **`docker-mailserver`'s default configuration enables both Implicit and Explicit TLS for Retrievial, on ports 993 and 143 respectively.** @@ -190,7 +198,7 @@ The best practice as of 2020 is to enforce IMAPS on port 993, rather than IMAP+S Similarly to IMAP, the older POP3 protocol may be secured with either Implicit or Explicit TLS. -The best practice as of 2020 would be [POP3S](https://en.wikipedia.org/wiki/POP3S) on port 995, rather than [POP3](https://en.wikipedia.org/wiki/POP3)+STARTTLS on port 110 (see [RFC 8314](https://tools.ietf.org/html/rfc8314)). +The best practice as of 2020 would be [POP3S][wikipedia-pop3s] on port 995, rather than [POP3][wikipedia-pop3]+STARTTLS on port 110 (see [RFC 8314][rfc-8314]). **`docker-mailserver`'s default configuration disables POP3 altogether.** One should expect MUAs to use TLS-encrypted IMAP for Retrieval. @@ -199,16 +207,46 @@ The best practice as of 2020 would be [POP3S](https://en.wikipedia.org/wiki/POP3 As a _batteries included_ Docker image, `docker-mailserver` provides you with all the required components and a default configuration, to run a decent and secure mail server. One may then customize all aspects of its internal components. -- Simple customization is supported through [docker-compose configuration](https://github.com/tomav/docker-mailserver/blob/master/docker-compose.yml.dist) and the [env-mailserver](https://github.com/tomav/docker-mailserver/blob/master/env-mailserver.dist) configuration file. -- Advanced customization is supported through providing "monkey-patching" configuration files and/or [deriving your own image](https://github.com/tomav/docker-mailserver/blob/master/Dockerfile) from `docker-mailserver`'s upstream, for a complete control over how things run. + +- Simple customization is supported through [docker-compose configuration][github-file-compose] and the [env-mailserver][github-file-envmailserver] configuration file. +- Advanced customization is supported through providing "monkey-patching" configuration files and/or [deriving your own image][github-file-dockerfile] from `docker-mailserver`'s upstream, for a complete control over how things run. On the subject of security, one might consider `docker-mailserver`'s **default** configuration to _not_ be 100% secure: - it enables unencrypted traffic on port 25 - it enables Explicit TLS (STARTTLS) on port 587, instead of Implicit TLS on port 465 -We believe `docker-mailserver`'s default configuration to be a good middle ground: it goes slightly beyond "old" (1999) [RFC 2487](https://tools.ietf.org/html/rfc2487); and with developer friendly configuration settings, it makes it pretty easy to abide by the "newest" (2018) [RFC 8314](https://tools.ietf.org/html/rfc8314). +We believe `docker-mailserver`'s default configuration to be a good middle ground: it goes slightly beyond "old" (1999) [RFC 2487][rfc-2487]; and with developer friendly configuration settings, it makes it pretty easy to abide by the "newest" (2018) [RFC 8314][rfc-8314]. Eventually, it is up to _you_ deciding exactly what kind of transportation/encryption to use and/or enforce, and to customize your instance accordingly (with looser or stricter security). Be also aware that protocols and ports on your server can only go so far with security; third-party MTAs might relay your emails on insecure connections, man-in-the-middle attacks might still prove effective, etc. Advanced counter-measure such as DANE, MTA-STS and/or full body encryption (eg. PGP) should be considered as well for increased confidentiality, but ideally without compromising backwards compatibility so as to not block emails. -The [README](https://github.com/tomav/docker-mailserver) is the best starting point in configuring and running your mail server. You may then explore this wiki to cover additional topics, including but not limited to, security. \ No newline at end of file +The [README][github-file-readme] is the best starting point in configuring and running your mail server. You may then explore this wiki to cover additional topics, including but not limited to, security. + +[docs-understandports]: ./config/security/understanding-the-ports.md +[github-file-compose]: https://github.com/docker-mailserver/docker-mailserver/blob/master/docker-compose.yml +[github-file-envmailserver]: https://github.com/docker-mailserver/docker-mailserver/blob/master/mailserver.env +[github-file-dockerfile]: https://github.com/docker-mailserver/docker-mailserver/blob/master/Dockerfile +[github-file-readme]: https://github.com/docker-mailserver/docker-mailserver/blob/master/README.md +[rfc-2487]: https://tools.ietf.org/html/rfc2487 +[rfc-5321]: https://tools.ietf.org/html/rfc5321 +[rfc-8314]: https://tools.ietf.org/html/rfc8314 +[rfc-8314-s33]: https://tools.ietf.org/html/rfc8314#section-3.3 +[software-mutt]: https://en.wikipedia.org/wiki/Mutt_(email_client) +[software-outlook]: https://en.wikipedia.org/wiki/Microsoft_Outlook +[software-thunderbird]: https://en.wikipedia.org/wiki/Mozilla_Thunderbird +[wikipedia-clientserver]: https://en.wikipedia.org/wiki/Client%E2%80%93server_model +[wikipedia-email]: https://en.wikipedia.org/wiki/Email +[wikipedia-emailagent]: https://en.wikipedia.org/wiki/Email_agent_(infrastructure) +[wikipedia-esmtp]: https://en.wikipedia.org/wiki/ESMTP +[wikipedia-imap]: https://en.wikipedia.org/wiki/IMAP +[wikipedia-imaps]: https://en.wikipedia.org/wiki/IMAPS +[wikipedia-mda]: https://en.wikipedia.org/wiki/Mail_delivery_agent +[wikipedia-mta]: https://en.wikipedia.org/wiki/Message_transfer_agent +[wikipedia-mua]: https://en.wikipedia.org/wiki/Email_client +[wikipedia-pop3]: https://en.wikipedia.org/wiki/POP3 +[wikipedia-pop3s]: https://en.wikipedia.org/wiki/POP3S +[wikipedia-smtp]: https://en.wikipedia.org/wiki/Simple_Mail_Transfer_Protocol +[wikipedia-smtps]: https://en.wikipedia.org/wiki/SMTPS +[wikipedia-starttls]: https://en.wikipedia.org/wiki/Opportunistic_TLS +[wikipedia-tcp]: https://en.wikipedia.org/wiki/Transmission_Control_Protocol +[wikipedia-tls]: https://en.wikipedia.org/wiki/Transport_Layer_Security diff --git a/docs/content/tutorials/installation-examples.md b/docs/content/tutorials/installation-examples.md index 9ca64f1c..cf8ecb08 100644 --- a/docs/content/tutorials/installation-examples.md +++ b/docs/content/tutorials/installation-examples.md @@ -1,261 +1,268 @@ -## Building a simple mailserver +--- +title: 'Tutorials | Installation Examples' +--- -**WARNING**: Adding the docker network's gateway to the list of trusted hosts, e.g. using the `network` or `connected-networks` option, can create an [**open relay**](https://en.wikipedia.org/wiki/Open_mail_relay), [for instance](https://github.com/tomav/docker-mailserver/issues/1405#issuecomment-590106498) if IPv6 is enabled on the host machine but not in Docker. ([#1405](https://github.com/tomav/docker-mailserver/issues/1405)) +## Building a Simple Mailserver + +!!! warning + Adding the docker network's gateway to the list of trusted hosts, e.g. using the `network` or `connected-networks` option, can create an [**open relay**](https://en.wikipedia.org/wiki/Open_mail_relay), for instance [if IPv6 is enabled on the host machine but not in Docker][github-issue-1405-comment]. We are going to use this docker based mailserver: - First create a directory for the mailserver and get the setup script: - ``` - mkdir -p /var/ds/mail.example.org - cd /var/ds/mail.example.org/ - curl -o setup.sh \ - https://raw.githubusercontent.com/tomav/docker-mailserver/master/setup.sh - chmod a+x ./setup.sh - ``` + ```sh + mkdir -p /var/ds/mail.example.org + cd /var/ds/mail.example.org/ + + curl -o setup.sh \ + https://raw.githubusercontent.com/docker-mailserver/docker-mailserver/master/setup.sh + chmod a+x ./setup.sh + ``` - Create the file `docker-compose.yml` with a content like this: - ``` - version: '2' - services: - mail: - image: tvial/docker-mailserver:latest - hostname: mail - domainname: example.org - container_name: mail - ports: - - "25:25" - - "587:587" - - "465:465" - volumes: - - ./data/:/var/mail/ - - ./state/:/var/mail-state/ - - ./config/:/tmp/docker-mailserver/ - - /var/ds/wsproxy/letsencrypt/:/etc/letsencrypt/ - environment: - - PERMIT_DOCKER=network - - SSL_TYPE=letsencrypt - - ONE_DIR=1 - - DMS_DEBUG=1 - - SPOOF_PROTECTION=0 - - REPORT_RECIPIENT=1 - - ENABLE_SPAMASSASSIN=0 - - ENABLE_CLAMAV=0 - - ENABLE_FAIL2BAN=1 - - ENABLE_POSTGREY=0 - cap_add: - - NET_ADMIN - - SYS_PTRACE - ``` - - For more details about the environment variables that can be used, - and their meaning and possible values, check also these: - - https://github.com/tomav/docker-mailserver#environment-variables - - https://github.com/tomav/docker-mailserver/blob/master/.env.dist - - Make sure to set the proper `domainname` that you will use for the - emails. We forward only SMTP ports (not POP3 and IMAP) because we - are not interested in accessing the mailserver directly (from a - client). We also use these settings: - - `PERMIT_DOCKER=network` because we want to send emails from other - docker containers. - - `SSL_TYPE=letsencrypt` because we will manage SSL certificates - with letsencrypt. + ```yaml + version: '2' -- We need to open these ports on the firewall: `25`, `587`, `465` - ``` - ufw allow 25 - ufw allow 587 - ufw allow 465 - ``` - On your server you may have to do it differently. + services: + mail: + image: tvial/docker-mailserver:latest + hostname: mail + domainname: example.org + container_name: mail + ports: + - "25:25" + - "587:587" + - "465:465" + volumes: + - ./data/:/var/mail/ + - ./state/:/var/mail-state/ + - ./config/:/tmp/docker-mailserver/ + - /var/ds/wsproxy/letsencrypt/:/etc/letsencrypt/ + environment: + - PERMIT_DOCKER=network + - SSL_TYPE=letsencrypt + - ONE_DIR=1 + - DMS_DEBUG=1 + - SPOOF_PROTECTION=0 + - REPORT_RECIPIENT=1 + - ENABLE_SPAMASSASSIN=0 + - ENABLE_CLAMAV=0 + - ENABLE_FAIL2BAN=1 + - ENABLE_POSTGREY=0 + cap_add: + - NET_ADMIN + - SYS_PTRACE + ``` -- Pull the docker image: - ``` - docker pull tvial/docker-mailserver:latest - ``` + For more details about the environment variables that can be used, and their meaning and possible values, check also these: -- Now generate the DKIM keys with `./setup.sh config dkim` and copy - the content of the file `config/opendkim/keys/domain.tld/mail.txt` - on the domain zone configuration at the DNS server. I use - [bind9](https://github.com/docker-scripts/bind9) for managing my - domains, so I just paste it on `example.org.db`: - ``` - mail._domainkey IN TXT ( "v=DKIM1; h=sha256; k=rsa; " - "p=MIIBIjANBgkqhkiG9w0BAQEFACAQ8AMIIBCgKCAQEAaH5KuPYPSF3Ppkt466BDMAFGOA4mgqn4oPjZ5BbFlYA9l5jU3bgzRj3l6/Q1n5a9lQs5fNZ7A/HtY0aMvs3nGE4oi+LTejt1jblMhV/OfJyRCunQBIGp0s8G9kIUBzyKJpDayk2+KJSJt/lxL9Iiy0DE5hIv62ZPP6AaTdHBAsJosLFeAzuLFHQ6USyQRojefqFQtgYqWQ2JiZQ3" - "iqq3bD/BVlwKRp5gH6TEYEmx8EBJUuDxrJhkWRUk2VDl1fqhVBy8A9O7Ah+85nMrlOHIFsTaYo9o6+cDJ6t1i6G1gu+bZD0d3/3bqGLPBQV9LyEL1Rona5V7TJBGg099NQkTz1IwIDAQAB" ) ; ----- DKIM key mail for example.org + - [Environtment Variables][github-file-env] + - [`mailserver.env` file][github-file-dotenv] - ``` + Make sure to set the proper `domainname` that you will use for the emails. We forward only SMTP ports (not POP3 and IMAP) because we are not interested in accessing the mailserver directly (from a client). We also use these settings: + + - `PERMIT_DOCKER=network` because we want to send emails from other docker containers. + - `SSL_TYPE=letsencrypt` because we will manage SSL certificates with letsencrypt. + +- We need to open ports `25`, `587` and `465` on the firewall: + + ```sh + ufw allow 25 + ufw allow 587 + ufw allow 465 + ``` + + On your server you may have to do it differently. + +- Pull the docker image: `docker pull tvial/docker-mailserver:latest` + +- Now generate the DKIM keys with `./setup.sh config dkim` and copy the content of the file `config/opendkim/keys/domain.tld/mail.txt` on the domain zone configuration at the DNS server. I use [bind9](https://github.com/docker-scripts/bind9) for managing my domains, so I just paste it on `example.org.db`: + + ```txt + mail._domainkey IN TXT ( "v=DKIM1; h=sha256; k=rsa; " + "p=MIIBIjANBgkqhkiG9w0BAQEFACAQ8AMIIBCgKCAQEAaH5KuPYPSF3Ppkt466BDMAFGOA4mgqn4oPjZ5BbFlYA9l5jU3bgzRj3l6/Q1n5a9lQs5fNZ7A/HtY0aMvs3nGE4oi+LTejt1jblMhV/OfJyRCunQBIGp0s8G9kIUBzyKJpDayk2+KJSJt/lxL9Iiy0DE5hIv62ZPP6AaTdHBAsJosLFeAzuLFHQ6USyQRojefqFQtgYqWQ2JiZQ3" + "iqq3bD/BVlwKRp5gH6TEYEmx8EBJUuDxrJhkWRUk2VDl1fqhVBy8A9O7Ah+85nMrlOHIFsTaYo9o6+cDJ6t1i6G1gu+bZD0d3/3bqGLPBQV9LyEL1Rona5V7TJBGg099NQkTz1IwIDAQAB" ) ; ----- DKIM key mail for example.org + ``` - Add these configurations as well on the same file on the DNS server: - ``` - mail IN A 10.11.12.13 - - ; mailservers for example.org - 3600 IN MX 1 mail.example.org. - - ; Add SPF record - IN TXT "v=spf1 mx ~all" - ``` - Then don't forget to change the serial number and to restart the service. -- Get an SSL certificate from letsencrypt. I use - [wsproxy](https://github.com/docker-scripts/wsproxy) for managing - SSL letsencrypt certificates of my domains: - ``` - cd /var/ds/wsproxy - ds domains-add mail mail.example.org - ds get-ssl-cert myemail@gmail.com mail.example.org --test - ds get-ssl-cert myemail@gmail.com mail.example.org - ``` - Now the certificates will be available on - `/var/ds/wsproxy/letsencrypt/live/mail.example.org`. + ```txt + mail IN A 10.11.12.13 + + ; mailservers for example.org + 3600 IN MX 1 mail.example.org. + + ; Add SPF record + IN TXT "v=spf1 mx ~all" + ``` + + Then don't forget to change the serial number and to restart the service. + +- Get an SSL certificate from letsencrypt. I use [wsproxy](https://github.com/docker-scripts/wsproxy) for managing SSL letsencrypt certificates of my domains: + + ```sh + cd /var/ds/wsproxy + ds domains-add mail mail.example.org + ds get-ssl-cert myemail@gmail.com mail.example.org --test + ds get-ssl-cert myemail@gmail.com mail.example.org + ``` + + Now the certificates will be available on `/var/ds/wsproxy/letsencrypt/live/mail.example.org`. - Start the mailserver and check for any errors: - ``` - apt install docker-compose - docker-compose up mail - ``` + + ```sh + apt install docker-compose + docker-compose up mail + ``` - Create email accounts and aliases with `SPOOF_PROTECTION=0`: - ``` - ./setup.sh email add admin@example.org passwd123 - ./setup.sh email add info@example.org passwd123 - ./setup.sh alias add admin@example.org myemail@gmail.com - ./setup.sh alias add info@example.org myemail@gmail.com - ./setup.sh email list - ./setup.sh alias list - ``` - Aliases make sure that any email that comes to these accounts is - forwarded to my real email address, so that I don't need to use - POP3/IMAP in order to get these messages. Also no anti-spam and - anti-virus software is needed, making the mailserver lighter. + + ```sh + ./setup.sh email add admin@example.org passwd123 + ./setup.sh email add info@example.org passwd123 + ./setup.sh alias add admin@example.org myemail@gmail.com + ./setup.sh alias add info@example.org myemail@gmail.com + ./setup.sh email list + ./setup.sh alias list + ``` + + Aliases make sure that any email that comes to these accounts is forwarded to my real email address, so that I don't need to use POP3/IMAP in order to get these messages. Also no anti-spam and anti-virus software is needed, making the mailserver lighter. - Or create email accounts and aliases with `SPOOF_PROTECTION=1`: - ``` - ./setup.sh email add admin.gmail@example.org passwd123 - ./setup.sh email add info.gmail@example.org passwd123 - ./setup.sh alias add admin@example.org admin.gmail@example.org - ./setup.sh alias add info@example.org info.gmail@example.org - ./setup.sh alias add admin.gmail@example.org myemail@gmail.com - ./setup.sh alias add info.gmail@example.org myemail@gmail.com - ./setup.sh email list - ./setup.sh alias list - ``` - This extra step is required to avoid the `553 5.7.1 Sender address rejected: not owned by user` error (the account used for setting up gmail is `admin.gmail@example.org` and `info.gmail@example.org` ) - -- Send some test emails to these addresses and make other tests. Then - stop the container with `Ctrl+c` and start it again as a daemon: - `docker-compose up -d mail`. -- Now save on Moodle configuration the SMTP settings and test by - trying to send some messages to other users: - - **SMTP hosts**: `mail.example.org:465` - - **SMTP security**: `SSL` - - **SMTP username**: `info@example.org` - - **SMTP password**: `passwd123` + ```sh + ./setup.sh email add admin.gmail@example.org passwd123 + ./setup.sh email add info.gmail@example.org passwd123 + ./setup.sh alias add admin@example.org admin.gmail@example.org + ./setup.sh alias add info@example.org info.gmail@example.org + ./setup.sh alias add admin.gmail@example.org myemail@gmail.com + ./setup.sh alias add info.gmail@example.org myemail@gmail.com + ./setup.sh email list + ./setup.sh alias list + ``` + + This extra step is required to avoid the `553 5.7.1 Sender address rejected: not owned by user` error (the account used for setting up gmail is `admin.gmail@example.org` and `info.gmail@example.org` ) + +- Send some test emails to these addresses and make other tests. Then stop the container with `ctrl+c` and start it again as a daemon: `docker-compose up -d mail`. + +- Now save on Moodle configuration the SMTP settings and test by trying to send some messages to other users: + + - **SMTP hosts**: `mail.example.org:465` + - **SMTP security**: `SSL` + - **SMTP username**: `info@example.org` + - **SMTP password**: `passwd123` + +## Using `docker-mailserver` behind a Proxy -## Using docker-mailserver behind proxy ### Information + If you are hiding your container behind a proxy service you might have discovered that the proxied requests from now on contain the proxy IP as the request origin. Whilst this behavior is technical correct it produces certain problems on the containers behind the proxy as they cannot distinguish the real origin of the requests anymore. To solve this problem on TCP connections we can make use of the [proxy protocol](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt). Compared to other workarounds that exist (`X-Forwarded-For` which only works for HTTP requests or `Tproxy` that requires you to recompile your kernel) the proxy protocol: -- it is protocol agnostic (can work with any layer 7 protocols, even when encrypted). -- it does not require any infrastructure changes -- nat-ing firewalls have no impact it -- it is scalable -The is only one condition: **both endpoints** of the connection MUST be compatible with proxy protocol. -Luckily `dovecot` and `postfix` are both Proxy-Protocol ready softwares so it depends only on your used reverse-proxy/loadbalancer. +- It is protocol agnostic (can work with any layer 7 protocols, even when encrypted). +- It does not require any infrastructure changes. +- NAT-ing firewalls have no impact it. +- It is scalable. -### Configuration of the used proxy software +There is only one condition: **both endpoints** of the connection MUST be compatible with proxy protocol. -The configuration depends on the used proxy system. I will provide the configuration examples of [traefik v2](https://traefik.io/) using IMAP and SMTP with implicit TLS. Feel free to add your configuration if you achived the same goal using different proxy software below: +Luckily `dovecot` and `postfix` are both Proxy-Protocol ready softwares so it depends only on your used reverse-proxy / loadbalancer. -
- traefik v2 +### Configuration of the used Proxy Software - Truncated configuration of traefik itself: -``` -version: '3.7' -services: - reverse-proxy: - image: traefik:v2.4 - container_name: docker-traefik - restart: always - command: - - "--providers.docker" - - "--providers.docker.exposedbydefault=false" - - "--providers.docker.network=proxy" - - "--entrypoints.web.address=:80" - - "--entryPoints.websecure.address=:443" - - "--entryPoints.smtp.address=:25" - - "--entryPoints.smtp-ssl.address=:465" - - "--entryPoints.imap-ssl.address=:993" - - "--entryPoints.sieve.address=:4190" - ports: - - "25:25" - - "465:465" - - "993:993" - - "4190:4190" -[...] -``` +The configuration depends on the used proxy system. I will provide the configuration examples of [traefik v2](https://traefik.io/) using IMAP and SMTP with implicit TLS. -Truncated list of neccessary labels on the mailserver container: +Feel free to add your configuration if you achived the same goal using different proxy software below: -``` -version: '2' -services: - mail: - image: tvial/docker-mailserver:release-v7.2.0 - restart: always - networks: - - proxy - labels: - - "traefik.enable=true" - - "traefik.tcp.routers.smtp.rule=HostSNI(`*`)" - - "traefik.tcp.routers.smtp.entrypoints=smtp" - - "traefik.tcp.routers.smtp.service=smtp" - - "traefik.tcp.services.smtp.loadbalancer.server.port=25" - - "traefik.tcp.services.smtp.loadbalancer.proxyProtocol.version=1" - - "traefik.tcp.routers.smtp-ssl.rule=HostSNI(`*`)" - - "traefik.tcp.routers.smtp-ssl.entrypoints=smtp-ssl" - - "traefik.tcp.routers.smtp-ssl.service=smtp-ssl" - - "traefik.tcp.services.smtp-ssl.loadbalancer.server.port=465" - - "traefik.tcp.services.smtp-ssl.loadbalancer.proxyProtocol.version=1" - - "traefik.tcp.routers.imap-ssl.rule=HostSNI(`*`)" - - "traefik.tcp.routers.imap-ssl.entrypoints=imap-ssl" - - "traefik.tcp.routers.imap-ssl.service=imap-ssl" - - "traefik.tcp.services.imap-ssl.loadbalancer.server.port=10993" - - "traefik.tcp.services.imap-ssl.loadbalancer.proxyProtocol.version=2" - - "traefik.tcp.routers.sieve.rule=HostSNI(`*`)" - - "traefik.tcp.routers.sieve.entrypoints=sieve" - - "traefik.tcp.routers.sieve.service=sieve" - - "traefik.tcp.services.sieve.loadbalancer.server.port=4190" -[...] -``` -Keep in mind that it is neccessary to use port `10993` here. More information below at `dovecot` configuration. +??? "Traefik v2" -
+ Truncated configuration of traefik itself: -### Configuration of the backend (`dovecot` and `postfix`) + ```yaml + version: '3.7' + services: + reverse-proxy: + image: traefik:v2.4 + container_name: docker-traefik + restart: always + command: + - "--providers.docker" + - "--providers.docker.exposedbydefault=false" + - "--providers.docker.network=proxy" + - "--entrypoints.web.address=:80" + - "--entryPoints.websecure.address=:443" + - "--entryPoints.smtp.address=:25" + - "--entryPoints.smtp-ssl.address=:465" + - "--entryPoints.imap-ssl.address=:993" + - "--entryPoints.sieve.address=:4190" + ports: + - "25:25" + - "465:465" + - "993:993" + - "4190:4190" + [...] + ``` -The following changes can be achived completely by adding the content to the appropriate files by using the projects [function to overwrite config files](https://github.com/docker-mailserver/docker-mailserver/wiki/List-of-optional-config-files-&-directories). + Truncated list of neccessary labels on the mailserver container: + + ```yaml + version: '2' + services: + mail: + image: tvial/docker-mailserver:release-v7.2.0 + restart: always + networks: + - proxy + labels: + - "traefik.enable=true" + - "traefik.tcp.routers.smtp.rule=HostSNI(`*`)" + - "traefik.tcp.routers.smtp.entrypoints=smtp" + - "traefik.tcp.routers.smtp.service=smtp" + - "traefik.tcp.services.smtp.loadbalancer.server.port=25" + - "traefik.tcp.services.smtp.loadbalancer.proxyProtocol.version=1" + - "traefik.tcp.routers.smtp-ssl.rule=HostSNI(`*`)" + - "traefik.tcp.routers.smtp-ssl.entrypoints=smtp-ssl" + - "traefik.tcp.routers.smtp-ssl.service=smtp-ssl" + - "traefik.tcp.services.smtp-ssl.loadbalancer.server.port=465" + - "traefik.tcp.services.smtp-ssl.loadbalancer.proxyProtocol.version=1" + - "traefik.tcp.routers.imap-ssl.rule=HostSNI(`*`)" + - "traefik.tcp.routers.imap-ssl.entrypoints=imap-ssl" + - "traefik.tcp.routers.imap-ssl.service=imap-ssl" + - "traefik.tcp.services.imap-ssl.loadbalancer.server.port=10993" + - "traefik.tcp.services.imap-ssl.loadbalancer.proxyProtocol.version=2" + - "traefik.tcp.routers.sieve.rule=HostSNI(`*`)" + - "traefik.tcp.routers.sieve.entrypoints=sieve" + - "traefik.tcp.routers.sieve.service=sieve" + - "traefik.tcp.services.sieve.loadbalancer.server.port=4190" + [...] + ``` + + Keep in mind that it is neccessary to use port `10993` here. More information below at `dovecot` configuration. + +### Configuration of the Backend (`dovecot` and `postfix`) + +The following changes can be achived completely by adding the content to the appropriate files by using the projects [function to overwrite config files][docs-optionalconfig]. Changes for `postfix` can be applied by adding the following content to `config/postfix-main.cf`: -``` + +```cf postscreen_upstream_proxy_protocol = haproxy ``` -and to `config/postfix-master.cd`: -``` +and to `config/postfix-master.cf`: + +```cf submission/inet/smtpd_upstream_proxy_protocol=haproxy smtps/inet/smtpd_upstream_proxy_protocol=haproxy ``` Changes for `dovecot` can be applied by adding the following content to `config/dovecot.cf`: -``` + +```cf haproxy_trusted_networks = , haproxy_timeout = 3 secs service imap-login { @@ -266,4 +273,11 @@ service imap-login { } } ``` -Note that port `10993` is used here to avoid conflicts with internal systems like `postscreen` and `amavis` as they will exchange messages on the default port and obviously have a different origin then compared to the proxy. \ No newline at end of file + +!!! note + Port `10993` is used here to avoid conflicts with internal systems like `postscreen` and `amavis` as they will exchange messages on the default port and obviously have a different origin then compared to the proxy. + +[docs-optionalconfig]: ../advanced/optional-config.md +[github-file-env]: https://github.com/docker-mailserver/docker-mailserver/blob/master/ENVIRONMENT.md +[github-file-dotenv]: https://github.com/docker-mailserver/docker-mailserver/blob/master/mailserver.env +[github-issue-1405-comment]: https://github.com/docker-mailserver/docker-mailserver/issues/1405#issuecomment-590106498 diff --git a/docs/content/uses-cases/forward-only-mailserver-with-ldap-authentication.md b/docs/content/uses-cases/forward-only-mailserver-with-ldap-authentication.md index 3ab795f1..fbc23736 100644 --- a/docs/content/uses-cases/forward-only-mailserver-with-ldap-authentication.md +++ b/docs/content/uses-cases/forward-only-mailserver-with-ldap-authentication.md @@ -1,11 +1,14 @@ +--- +title: 'Use Cases | Forward-Only Mailserver with LDAP' +--- -## Building a Forward-Only mailserver +## Building a Forward-Only Mailserver A **forward-only** mailserver does not have any local mailboxes. Instead, it has only aliases that forward emails to external email accounts (for example to a gmail account). You can also send email from the localhost (the computer where the mailserver is installed), using as sender any of the alias addresses. The important settings for this setup (on `mailserver.env`) are these: -```console +```env PERMIT_DOCKER=host ENABLE_POP3= ENABLE_CLAMAV=0 @@ -18,15 +21,15 @@ Since there are no local mailboxes, we use `SMTP_ONLY=1` to disable `dovecot`. W We can create aliases with `./setup.sh`, like this: -```bash +```sh ./setup.sh alias add ``` ## Authenticating with LDAP -If you want to send emails from outside the mailserver you have to authenticate somehow (with a username and password). One way of doing it is described in [this discussion](https://github.com/tomav/docker-mailserver/issues/1247). However if there are many user accounts, it is better to use authentication with LDAP. The settings for this on `mailserver.env` are: +If you want to send emails from outside the mailserver you have to authenticate somehow (with a username and password). One way of doing it is described in [this discussion][github-issue-1247]. However if there are many user accounts, it is better to use authentication with LDAP. The settings for this on `mailserver.env` are: -```console +```env ENABLE_LDAP=1 LDAP_START_TLS=yes LDAP_SERVER_HOST=ldap.example.org @@ -47,7 +50,7 @@ SASLAUTHD_LDAP_FILTER=(&(uid=%U)(objectClass=inetOrgPerson)) My LDAP data structure is very basic, containing only the username, password, and the external email address where to forward emails for this user. An entry looks like this -```console +```properties add uid=username,ou=users,dc=example,dc=org uid: username objectClass: inetOrgPerson @@ -57,7 +60,7 @@ userPassword: {SSHA}abcdefghi123456789 email: real-email-address@external-domain.com ``` -This structure is different from what is expected/assumed from the configuration scripts of the mailserver, so it doesn't work just by using the `LDAP_QUERY_FILTER_...` settings. Instead, I had to do [custom configuration](https://github.com/tomav/docker-mailserver#custom-user-changes--patches). I created the script `config/user-patches.sh`, with a content like this: +This structure is different from what is expected/assumed from the configuration scripts of the mailserver, so it doesn't work just by using the `LDAP_QUERY_FILTER_...` settings. Instead, I had to do [custom configuration][github-file-readme-patches]. I created the script `config/user-patches.sh`, with a content like this: ```bash #!/bin/bash @@ -97,3 +100,6 @@ You see that besides `query_filter`, I had to customize as well `result_attribut For more details about using LDAP see: [LDAP managed mail server with Postfix and Dovecot for multiple domains](https://www.vennedey.net/resources/2-LDAP-managed-mail-server-with-Postfix-and-Dovecot-for-multiple-domains) Another solution that serves as a forward-only mailserver is this: https://gitlab.com/docker-scripts/postfix + +[github-file-readme-patches]: https://github.com/docker-mailserver/docker-mailserver/blob/master/README.md#custom-user-changes--patches +[github-issue-1247]: https://github.com/docker-mailserver/docker-mailserver/issues/1247 diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 297ba9d9..081b3512 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -34,6 +34,7 @@ markdown_extensions: - abbr - attr_list - admonition + - pymdownx.details - pymdownx.highlight: extend_pygments_lang: - name: yml @@ -42,6 +43,16 @@ markdown_extensions: lang: cfg - name: conf lang: cfg + - name: env + lang: properties + # Not helpful with Python Pygments lexer highlighting, but we might change to a JS highlighter in future + # Ideally, this type of codefence might also have word-wrap enabled (CSS: {white-space: pre-wrap}) + - name: log + lang: shell-session + - name: fetchmailrc + lang: txt + - name: caddyfile + lang: txt - pymdownx.superfences - pymdownx.magiclink - pymdownx.emoji: From 1a8552b96cc6c18476f1f9657a9a75ead94d4552 Mon Sep 17 00:00:00 2001 From: wernerfred <20406381+wernerfred@users.noreply.github.com> Date: Mon, 1 Mar 2021 20:50:18 +0100 Subject: [PATCH 07/14] docs(refactor): Restructure document hierarchy Additionally rename `installation-examples.md` and split --- .../{ => config}/advanced/auth-ldap.md | 0 .../{ => config}/advanced/full-text-search.md | 0 docs/content/{ => config}/advanced/ipv6.md | 0 .../{ => config}/advanced/kubernetes.md | 0 .../{ => config}/advanced/mail-fetchmail.md | 0 .../advanced/mail-forwarding/aws-ses.md | 0 .../advanced/mail-forwarding/relay-hosts.md | 0 .../{ => config}/advanced/mail-sieve.md | 0 .../maintenance/update-and-cleanup.md | 0 .../{ => config}/advanced/optional-config.md | 0 .../advanced/override-defaults/dovecot.md | 0 .../advanced/override-defaults/postfix.md | 0 .../tutorials/basic-installation.md} | 123 ------------------ .../tutorials/mailserver-behind-proxy.md | 123 ++++++++++++++++++ ...nly-mailserver-with-ldap-authentication.md | 0 .../{config/troubleshooting => }/faq.md | 0 16 files changed, 123 insertions(+), 123 deletions(-) rename docs/content/{ => config}/advanced/auth-ldap.md (100%) rename docs/content/{ => config}/advanced/full-text-search.md (100%) rename docs/content/{ => config}/advanced/ipv6.md (100%) rename docs/content/{ => config}/advanced/kubernetes.md (100%) rename docs/content/{ => config}/advanced/mail-fetchmail.md (100%) rename docs/content/{ => config}/advanced/mail-forwarding/aws-ses.md (100%) rename docs/content/{ => config}/advanced/mail-forwarding/relay-hosts.md (100%) rename docs/content/{ => config}/advanced/mail-sieve.md (100%) rename docs/content/{ => config}/advanced/maintenance/update-and-cleanup.md (100%) rename docs/content/{ => config}/advanced/optional-config.md (100%) rename docs/content/{ => config}/advanced/override-defaults/dovecot.md (100%) rename docs/content/{ => config}/advanced/override-defaults/postfix.md (100%) rename docs/content/{tutorials/installation-examples.md => examples/tutorials/basic-installation.md} (56%) create mode 100644 docs/content/examples/tutorials/mailserver-behind-proxy.md rename docs/content/{ => examples}/uses-cases/forward-only-mailserver-with-ldap-authentication.md (100%) rename docs/content/{config/troubleshooting => }/faq.md (100%) diff --git a/docs/content/advanced/auth-ldap.md b/docs/content/config/advanced/auth-ldap.md similarity index 100% rename from docs/content/advanced/auth-ldap.md rename to docs/content/config/advanced/auth-ldap.md diff --git a/docs/content/advanced/full-text-search.md b/docs/content/config/advanced/full-text-search.md similarity index 100% rename from docs/content/advanced/full-text-search.md rename to docs/content/config/advanced/full-text-search.md diff --git a/docs/content/advanced/ipv6.md b/docs/content/config/advanced/ipv6.md similarity index 100% rename from docs/content/advanced/ipv6.md rename to docs/content/config/advanced/ipv6.md diff --git a/docs/content/advanced/kubernetes.md b/docs/content/config/advanced/kubernetes.md similarity index 100% rename from docs/content/advanced/kubernetes.md rename to docs/content/config/advanced/kubernetes.md diff --git a/docs/content/advanced/mail-fetchmail.md b/docs/content/config/advanced/mail-fetchmail.md similarity index 100% rename from docs/content/advanced/mail-fetchmail.md rename to docs/content/config/advanced/mail-fetchmail.md diff --git a/docs/content/advanced/mail-forwarding/aws-ses.md b/docs/content/config/advanced/mail-forwarding/aws-ses.md similarity index 100% rename from docs/content/advanced/mail-forwarding/aws-ses.md rename to docs/content/config/advanced/mail-forwarding/aws-ses.md diff --git a/docs/content/advanced/mail-forwarding/relay-hosts.md b/docs/content/config/advanced/mail-forwarding/relay-hosts.md similarity index 100% rename from docs/content/advanced/mail-forwarding/relay-hosts.md rename to docs/content/config/advanced/mail-forwarding/relay-hosts.md diff --git a/docs/content/advanced/mail-sieve.md b/docs/content/config/advanced/mail-sieve.md similarity index 100% rename from docs/content/advanced/mail-sieve.md rename to docs/content/config/advanced/mail-sieve.md diff --git a/docs/content/advanced/maintenance/update-and-cleanup.md b/docs/content/config/advanced/maintenance/update-and-cleanup.md similarity index 100% rename from docs/content/advanced/maintenance/update-and-cleanup.md rename to docs/content/config/advanced/maintenance/update-and-cleanup.md diff --git a/docs/content/advanced/optional-config.md b/docs/content/config/advanced/optional-config.md similarity index 100% rename from docs/content/advanced/optional-config.md rename to docs/content/config/advanced/optional-config.md diff --git a/docs/content/advanced/override-defaults/dovecot.md b/docs/content/config/advanced/override-defaults/dovecot.md similarity index 100% rename from docs/content/advanced/override-defaults/dovecot.md rename to docs/content/config/advanced/override-defaults/dovecot.md diff --git a/docs/content/advanced/override-defaults/postfix.md b/docs/content/config/advanced/override-defaults/postfix.md similarity index 100% rename from docs/content/advanced/override-defaults/postfix.md rename to docs/content/config/advanced/override-defaults/postfix.md diff --git a/docs/content/tutorials/installation-examples.md b/docs/content/examples/tutorials/basic-installation.md similarity index 56% rename from docs/content/tutorials/installation-examples.md rename to docs/content/examples/tutorials/basic-installation.md index cf8ecb08..3e89b558 100644 --- a/docs/content/tutorials/installation-examples.md +++ b/docs/content/examples/tutorials/basic-installation.md @@ -155,129 +155,6 @@ We are going to use this docker based mailserver: - **SMTP username**: `info@example.org` - **SMTP password**: `passwd123` -## Using `docker-mailserver` behind a Proxy - -### Information - -If you are hiding your container behind a proxy service you might have discovered that the proxied requests from now on contain the proxy IP as the request origin. Whilst this behavior is technical correct it produces certain problems on the containers behind the proxy as they cannot distinguish the real origin of the requests anymore. - -To solve this problem on TCP connections we can make use of the [proxy protocol](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt). Compared to other workarounds that exist (`X-Forwarded-For` which only works for HTTP requests or `Tproxy` that requires you to recompile your kernel) the proxy protocol: - -- It is protocol agnostic (can work with any layer 7 protocols, even when encrypted). -- It does not require any infrastructure changes. -- NAT-ing firewalls have no impact it. -- It is scalable. - -There is only one condition: **both endpoints** of the connection MUST be compatible with proxy protocol. - -Luckily `dovecot` and `postfix` are both Proxy-Protocol ready softwares so it depends only on your used reverse-proxy / loadbalancer. - -### Configuration of the used Proxy Software - -The configuration depends on the used proxy system. I will provide the configuration examples of [traefik v2](https://traefik.io/) using IMAP and SMTP with implicit TLS. - -Feel free to add your configuration if you achived the same goal using different proxy software below: - -??? "Traefik v2" - - Truncated configuration of traefik itself: - - ```yaml - version: '3.7' - services: - reverse-proxy: - image: traefik:v2.4 - container_name: docker-traefik - restart: always - command: - - "--providers.docker" - - "--providers.docker.exposedbydefault=false" - - "--providers.docker.network=proxy" - - "--entrypoints.web.address=:80" - - "--entryPoints.websecure.address=:443" - - "--entryPoints.smtp.address=:25" - - "--entryPoints.smtp-ssl.address=:465" - - "--entryPoints.imap-ssl.address=:993" - - "--entryPoints.sieve.address=:4190" - ports: - - "25:25" - - "465:465" - - "993:993" - - "4190:4190" - [...] - ``` - - Truncated list of neccessary labels on the mailserver container: - - ```yaml - version: '2' - services: - mail: - image: tvial/docker-mailserver:release-v7.2.0 - restart: always - networks: - - proxy - labels: - - "traefik.enable=true" - - "traefik.tcp.routers.smtp.rule=HostSNI(`*`)" - - "traefik.tcp.routers.smtp.entrypoints=smtp" - - "traefik.tcp.routers.smtp.service=smtp" - - "traefik.tcp.services.smtp.loadbalancer.server.port=25" - - "traefik.tcp.services.smtp.loadbalancer.proxyProtocol.version=1" - - "traefik.tcp.routers.smtp-ssl.rule=HostSNI(`*`)" - - "traefik.tcp.routers.smtp-ssl.entrypoints=smtp-ssl" - - "traefik.tcp.routers.smtp-ssl.service=smtp-ssl" - - "traefik.tcp.services.smtp-ssl.loadbalancer.server.port=465" - - "traefik.tcp.services.smtp-ssl.loadbalancer.proxyProtocol.version=1" - - "traefik.tcp.routers.imap-ssl.rule=HostSNI(`*`)" - - "traefik.tcp.routers.imap-ssl.entrypoints=imap-ssl" - - "traefik.tcp.routers.imap-ssl.service=imap-ssl" - - "traefik.tcp.services.imap-ssl.loadbalancer.server.port=10993" - - "traefik.tcp.services.imap-ssl.loadbalancer.proxyProtocol.version=2" - - "traefik.tcp.routers.sieve.rule=HostSNI(`*`)" - - "traefik.tcp.routers.sieve.entrypoints=sieve" - - "traefik.tcp.routers.sieve.service=sieve" - - "traefik.tcp.services.sieve.loadbalancer.server.port=4190" - [...] - ``` - - Keep in mind that it is neccessary to use port `10993` here. More information below at `dovecot` configuration. - -### Configuration of the Backend (`dovecot` and `postfix`) - -The following changes can be achived completely by adding the content to the appropriate files by using the projects [function to overwrite config files][docs-optionalconfig]. - -Changes for `postfix` can be applied by adding the following content to `config/postfix-main.cf`: - -```cf -postscreen_upstream_proxy_protocol = haproxy -``` - -and to `config/postfix-master.cf`: - -```cf -submission/inet/smtpd_upstream_proxy_protocol=haproxy -smtps/inet/smtpd_upstream_proxy_protocol=haproxy -``` - -Changes for `dovecot` can be applied by adding the following content to `config/dovecot.cf`: - -```cf -haproxy_trusted_networks = , -haproxy_timeout = 3 secs -service imap-login { - inet_listener imaps { - haproxy = yes - ssl = yes - port = 10993 - } -} -``` - -!!! note - Port `10993` is used here to avoid conflicts with internal systems like `postscreen` and `amavis` as they will exchange messages on the default port and obviously have a different origin then compared to the proxy. - -[docs-optionalconfig]: ../advanced/optional-config.md [github-file-env]: https://github.com/docker-mailserver/docker-mailserver/blob/master/ENVIRONMENT.md [github-file-dotenv]: https://github.com/docker-mailserver/docker-mailserver/blob/master/mailserver.env [github-issue-1405-comment]: https://github.com/docker-mailserver/docker-mailserver/issues/1405#issuecomment-590106498 diff --git a/docs/content/examples/tutorials/mailserver-behind-proxy.md b/docs/content/examples/tutorials/mailserver-behind-proxy.md new file mode 100644 index 00000000..1154ed1e --- /dev/null +++ b/docs/content/examples/tutorials/mailserver-behind-proxy.md @@ -0,0 +1,123 @@ +## Using `docker-mailserver` behind a Proxy + +### Information + +If you are hiding your container behind a proxy service you might have discovered that the proxied requests from now on contain the proxy IP as the request origin. Whilst this behavior is technical correct it produces certain problems on the containers behind the proxy as they cannot distinguish the real origin of the requests anymore. + +To solve this problem on TCP connections we can make use of the [proxy protocol](https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt). Compared to other workarounds that exist (`X-Forwarded-For` which only works for HTTP requests or `Tproxy` that requires you to recompile your kernel) the proxy protocol: + +- It is protocol agnostic (can work with any layer 7 protocols, even when encrypted). +- It does not require any infrastructure changes. +- NAT-ing firewalls have no impact it. +- It is scalable. + +There is only one condition: **both endpoints** of the connection MUST be compatible with proxy protocol. + +Luckily `dovecot` and `postfix` are both Proxy-Protocol ready softwares so it depends only on your used reverse-proxy / loadbalancer. + +### Configuration of the used Proxy Software + +The configuration depends on the used proxy system. I will provide the configuration examples of [traefik v2](https://traefik.io/) using IMAP and SMTP with implicit TLS. + +Feel free to add your configuration if you achived the same goal using different proxy software below: + +??? "Traefik v2" + + Truncated configuration of traefik itself: + + ```yaml + version: '3.7' + services: + reverse-proxy: + image: traefik:v2.4 + container_name: docker-traefik + restart: always + command: + - "--providers.docker" + - "--providers.docker.exposedbydefault=false" + - "--providers.docker.network=proxy" + - "--entrypoints.web.address=:80" + - "--entryPoints.websecure.address=:443" + - "--entryPoints.smtp.address=:25" + - "--entryPoints.smtp-ssl.address=:465" + - "--entryPoints.imap-ssl.address=:993" + - "--entryPoints.sieve.address=:4190" + ports: + - "25:25" + - "465:465" + - "993:993" + - "4190:4190" + [...] + ``` + + Truncated list of neccessary labels on the mailserver container: + + ```yaml + version: '2' + services: + mail: + image: tvial/docker-mailserver:release-v7.2.0 + restart: always + networks: + - proxy + labels: + - "traefik.enable=true" + - "traefik.tcp.routers.smtp.rule=HostSNI(`*`)" + - "traefik.tcp.routers.smtp.entrypoints=smtp" + - "traefik.tcp.routers.smtp.service=smtp" + - "traefik.tcp.services.smtp.loadbalancer.server.port=25" + - "traefik.tcp.services.smtp.loadbalancer.proxyProtocol.version=1" + - "traefik.tcp.routers.smtp-ssl.rule=HostSNI(`*`)" + - "traefik.tcp.routers.smtp-ssl.entrypoints=smtp-ssl" + - "traefik.tcp.routers.smtp-ssl.service=smtp-ssl" + - "traefik.tcp.services.smtp-ssl.loadbalancer.server.port=465" + - "traefik.tcp.services.smtp-ssl.loadbalancer.proxyProtocol.version=1" + - "traefik.tcp.routers.imap-ssl.rule=HostSNI(`*`)" + - "traefik.tcp.routers.imap-ssl.entrypoints=imap-ssl" + - "traefik.tcp.routers.imap-ssl.service=imap-ssl" + - "traefik.tcp.services.imap-ssl.loadbalancer.server.port=10993" + - "traefik.tcp.services.imap-ssl.loadbalancer.proxyProtocol.version=2" + - "traefik.tcp.routers.sieve.rule=HostSNI(`*`)" + - "traefik.tcp.routers.sieve.entrypoints=sieve" + - "traefik.tcp.routers.sieve.service=sieve" + - "traefik.tcp.services.sieve.loadbalancer.server.port=4190" + [...] + ``` + + Keep in mind that it is neccessary to use port `10993` here. More information below at `dovecot` configuration. + +### Configuration of the Backend (`dovecot` and `postfix`) + +The following changes can be achived completely by adding the content to the appropriate files by using the projects [function to overwrite config files][docs-optionalconfig]. + +Changes for `postfix` can be applied by adding the following content to `config/postfix-main.cf`: + +```cf +postscreen_upstream_proxy_protocol = haproxy +``` + +and to `config/postfix-master.cf`: + +```cf +submission/inet/smtpd_upstream_proxy_protocol=haproxy +smtps/inet/smtpd_upstream_proxy_protocol=haproxy +``` + +Changes for `dovecot` can be applied by adding the following content to `config/dovecot.cf`: + +```cf +haproxy_trusted_networks = , +haproxy_timeout = 3 secs +service imap-login { + inet_listener imaps { + haproxy = yes + ssl = yes + port = 10993 + } +} +``` + +!!! note + Port `10993` is used here to avoid conflicts with internal systems like `postscreen` and `amavis` as they will exchange messages on the default port and obviously have a different origin then compared to the proxy. + +[docs-optionalconfig]: ../advanced/optional-config.md diff --git a/docs/content/uses-cases/forward-only-mailserver-with-ldap-authentication.md b/docs/content/examples/uses-cases/forward-only-mailserver-with-ldap-authentication.md similarity index 100% rename from docs/content/uses-cases/forward-only-mailserver-with-ldap-authentication.md rename to docs/content/examples/uses-cases/forward-only-mailserver-with-ldap-authentication.md diff --git a/docs/content/config/troubleshooting/faq.md b/docs/content/faq.md similarity index 100% rename from docs/content/config/troubleshooting/faq.md rename to docs/content/faq.md From cc0706a6faacbda032998c5cfebba57f65435cff Mon Sep 17 00:00:00 2001 From: wernerfred <20406381+wernerfred@users.noreply.github.com> Date: Tue, 2 Mar 2021 19:40:43 +0100 Subject: [PATCH 08/14] docs: Add a contributing section --- docs/content/contributing/coding-style.md | 155 ++++++++++++++++++ docs/content/contributing/documentation.md | 6 + .../contributing/issues-and-pull-requests.md | 50 ++++++ docs/content/contributing/tests.md | 6 + docs/content/index.md | 5 + 5 files changed, 222 insertions(+) create mode 100644 docs/content/contributing/coding-style.md create mode 100644 docs/content/contributing/documentation.md create mode 100644 docs/content/contributing/issues-and-pull-requests.md create mode 100644 docs/content/contributing/tests.md diff --git a/docs/content/contributing/coding-style.md b/docs/content/contributing/coding-style.md new file mode 100644 index 00000000..9b5a4be5 --- /dev/null +++ b/docs/content/contributing/coding-style.md @@ -0,0 +1,155 @@ +--- +title: 'Contributing | Coding Style' +--- + +##Bash and Shell + +When refactoring, writing or altering scripts, that is Shell and bash scripts, in any way, adhere to these rules: + +1. **Adjust your style of coding to the style that is already present**! Even if you do not like it, this is due to consistency. There was a lot of work involved in making all scripts consistent. +2. **Use `shellcheck` to check your scripts**! Your contributions are checked by GitHub Actions too, so you will need to do this. You can **lint your work with `make lint`** to check against all targets. +3. **Use the provided `.editorconfig`** file. +4. Use `/bin/bash` or `/usr/bin/envbash` instead of `/bin/sh`. Adjust the style accordingly. +5. `setup.sh` provides a good starting point to look for. +6. When appropriate, use the `set` builtin. We recommend `set -euEo pipefail` or `set -uE`. + +## Styling rules + +### If-Else-Statements + +```bash +# when using braces, use double braces +# remember you do not need "" when using [[ ]] +if [[ ]] && [[ -f ${FILE} ]] +then + +# when running commands, you don't need braces +elif + +else + +fi + +# equality checks with numbers are done +# with -eq/-ne/-lt/-ge, not != or == +if [[ ${VAR} -ne 42 ]] || [[ ${SOME_VAR} -eq 6 ]] +then + +fi +``` + +### Variables & Braces + +!!! attention + + Variables are always uppercase. We always use braces. + +If you forgot this and want to change it later, you can use [this link][regex]. The used regex is `\$([^{("\\'\/])([a-zA-Z0-9_]*)([^}\/ \t'"\n.\]:(=\\-]*)`, where you should in practice be able to replace all variable occurrences without braces with occurrences with braces. + +```bash +# good +local VAR="good" +local NEW="${VAR}" + +# bad -> TravisCI will fail +var="bad" +new=$var +``` + +### Loops + +Like `if-else`, loops look like this + +```bash +for / while +do + +done +``` + +### Functions + +It's always nice to see the use of functions as it also provides a clear structure. If scripts are small, this is unnecessary, but if they become larger, please consider using functions. When doing so, provide `function _main`. + +```bash +function _ +{ + + + # variables that can be local should be local + local +} +``` + +### Error Tracing + +A construct to trace error in your scripts looks like this. Remember: Remove `set -x` in the end. This is for debugging purposes only. + +```bash +set -xeuEo pipefail +trap '__log_err ${FUNCNAME[0]:-"?"} ${BASH_COMMAND:-"?"} ${LINENO:-"?"} ${?:-"?"}' ERR + +SCRIPT='name_of_this_script.sh' + +function __log_err +{ + printf "\n––– \e[1m\e[31mUNCHECKED ERROR\e[0m\n%s\n%s\n%s\n%s\n\n" \ + " – script = ${SCRIPT:-${0}}" \ + " – function = ${1} / ${2}" \ + " – line = ${3}" \ + " – exit code = ${4}" 1>&2 + + +} +``` + +### Comments, Descriptiveness & An Example + +Comments should only describe non-obvious matters. Comments should start lowercase when they aren't sentences. Make the code **self-descriptive** by using meaningful names! Make comments not longer than approximately 80 columns, then wrap the line. + +A positive example, which is taken from `start-mailserver.sh`, would be + +```bash +function _setup_postfix_aliases +{ + _notify 'task' 'Setting up Postfix Aliases' + + : >/etc/postfix/virtual + : >/etc/postfix/regexp + + if [[ -f /tmp/docker-mailserver/postfix-virtual.cf ]] + then + # fixing old virtual user file + if grep -q ",$" /tmp/docker-mailserver/postfix-virtual.cf + then + sed -i -e "s/, /,/g" -e "s/,$//g" /tmp/docker-mailserver/postfix-virtual.cf + fi + + cp -f /tmp/docker-mailserver/postfix-virtual.cf /etc/postfix/virtual + + # the `to` is important, don't delete it + # shellcheck disable=SC2034 + while read -r FROM TO + do + # Setting variables for better readability + UNAME=$(echo "${FROM}" | cut -d @ -f1) + DOMAIN=$(echo "${FROM}" | cut -d @ -f2) + + # if they are equal it means the line looks like: "user1 other@domain.tld" + [[ "${UNAME}" != "${DOMAIN}" ]] && echo "${DOMAIN}" >> /tmp/vhost.tmp + done < <(grep -v "^\s*$\|^\s*\#" /tmp/docker-mailserver/postfix-virtual.cf || true) + else + _notify 'inf' "Warning 'config/postfix-virtual.cf' is not provided. No mail alias/forward created." + fi + + ... +} +``` + +## YAML + +When formatting YAML files, use [Prettier][prettier], an opinionated formatter. There are many plugins for IDEs around. + +[semver]: https://semver.org/ +[regex]: https://regex101.com/r/ikzJpF/7 +[prettier]: https://prettier.io diff --git a/docs/content/contributing/documentation.md b/docs/content/contributing/documentation.md new file mode 100644 index 00000000..e9470de1 --- /dev/null +++ b/docs/content/contributing/documentation.md @@ -0,0 +1,6 @@ +--- +title: 'Contributing | Documentation' +--- + +!!! todo + This section should provide a detailed step by step guide on how to contribute to documentation \ No newline at end of file diff --git a/docs/content/contributing/issues-and-pull-requests.md b/docs/content/contributing/issues-and-pull-requests.md new file mode 100644 index 00000000..801e06f0 --- /dev/null +++ b/docs/content/contributing/issues-and-pull-requests.md @@ -0,0 +1,50 @@ +--- +title: 'Contributing | Issues and Pull Requests' +--- + +This project is Open Source. That means that you can contribute on enhancements, bug fixing or improving the documentation. + +## Opening an Issue + +!!! attention + + **Before opening an issue**, read the [`README`][github-file-readme] carefully, use the [Wiki][wiki], the Postfix/Dovecot documentation and your search engine you trust. The issue tracker is not meant to be used for unrelated questions! + +When opening an issue, please provide details use case to let the community reproduce your problem. Please start the mail server with env `DMS_DEBUG=1` and paste the output into the issue. + +!!! attention + + **Use the issue templates** to provide the necessary information. Issues which do not use these templates are not worked on and closed. + +By raising issues, I agree to these terms and I understand, that the rules set for the issue tracker will help both maintainers as well as everyone to find a solution. + +Maintainers take the time to improve on this project and help by solving issues together. It is therefore expected from others to make an effort and **comply with the rules**. + +## Pull Requests + +### Submit a Pull-Request + +!!! question "Motivation" + + You want to add a feature? Feel free to start creating an issue explaining what you want to do and how you're thinking doing it. Other users may have the same need and collaboration may lead to better results. + +The development workflow is the following: + +1. Fork the project and clone your fork + 1. Create a new branch to work on + 2. Run `git submodule update --init --recursive` +2. Write the code that is needed :D +3. Add integration tests if necessary +4. Get the linters with `make install_linters` and install `jq` with the package manager of your OS +5. Use `make clean all` to build image locally and run tests (note that tests work on Linux **only**) +6. Document your improvements if necessary (e.g. if you introduced new environment variables, write the description in [`ENVIRONMENT.md`][github-file-env]) +7. [Commit][commit] and [sign your commit][gpg], push and create a pull-request to merge into `master`. Please **use the pull-request template** to provide a minimum of contextual information and make sure to meet the requirements of the checklist. + 1. Pull requests are automatically tested against the CI and will be reviewed when tests pass + 2. When your changes are validated, your branch is merged + 3. CI builds the new `:edge` image immediately and your changes will be includes in the next version release. + +[wiki]: https://docker-mailserver.github.io/docker-mailserver +[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 +[commit]: https://help.github.com/articles/closing-issues-via-commit-messages/ +[gpg]: https://docs.github.com/en/github/authenticating-to-github/generating-a-new-gpg-key diff --git a/docs/content/contributing/tests.md b/docs/content/contributing/tests.md new file mode 100644 index 00000000..f41eeba3 --- /dev/null +++ b/docs/content/contributing/tests.md @@ -0,0 +1,6 @@ +--- +title: 'Contributing | Tests' +--- + +!!! todo + This section should provide a detailed step by step guide on how to write tests \ No newline at end of file diff --git a/docs/content/index.md b/docs/content/index.md index 942be6f8..c683a61a 100644 --- a/docs/content/index.md +++ b/docs/content/index.md @@ -18,6 +18,11 @@ This wiki provides you with advanced configuration, detailed examples, and hints !!! tip See the [FAQ][docs-faq] for some more tips! +## Contributing + +We are always happy to welcome new contributors. For guidelines and entrypoints please have a look at the [Contributing section][docs-contributing]. + +[docs-contributing]: ./contributing/issues-and-pull-requests.md [docs-faq]: ./config/troubleshooting/faq.md [docs-optionalconfig]: ./advanced/optional-config.md [docs-setupsh]: ./config/setup.sh.md From 237a932f8e9f1e8c4ec82bb30e37fa74fe1dfa6d Mon Sep 17 00:00:00 2001 From: wernerfred <20406381+wernerfred@users.noreply.github.com> Date: Tue, 2 Mar 2021 18:48:28 +0100 Subject: [PATCH 09/14] docs(config): Add the nav section Various PR commits related to the nav section have been merged together: docs: Fix indentation for linter check docs: update edit uri to content subdirectory docs: add ghcr link docs: shorten nav entry name docs: quote ghcr nav entry docs(config): update nav section for relocated documents Additional nav section fixes: - consistent usage of quotes - eclint padding error - wrong indentation of pop3 - remove a leading slash from a filepath --- docs/mkdocs.yml | 53 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 081b3512..baf62d3b 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -4,7 +4,7 @@ site_author: 'docker-mailserver (Github Organization)' repo_name: 'docker-mailserver' repo_url: 'https://github.com/docker-mailserver/docker-mailserver' copyright: '

© Docker Mailserver Organization
This project is licensed under the MIT license.

' - +edit_uri: 'edit/master/docs/content' docs_dir: 'content/' site_url: 'https://docker-mailserver.github.io/docker-mailserver' theme: @@ -58,3 +58,54 @@ markdown_extensions: - pymdownx.emoji: emoji_index: !!python/name:materialx.emoji.twemoji emoji_generator: !!python/name:materialx.emoji.to_svg + +nav: + - 'Home': index.md + - 'Introduction': introduction.md + - 'Configuration': + - 'Your Best Friend setup.sh': config/setup.sh.md + - 'User Management': + - 'Accounts': config/user-management/accounts.md + - 'Aliases': config/user-management/aliases.md + - 'Best Practices': + - 'DKIM': config/best-practices/dkim.md + - 'DMARC': config/best-practices/dmarc.md + - 'SPF': config/best-practices/spf.md + - 'Auto-discovery': config/best-practices/autodiscover.md + - 'Security': + - 'Understanding the Ports': config/security/understanding-the-ports.md + - 'SSL/TLS': config/security/ssl.md + - 'Fail2Ban': config/security/fail2ban.md + - 'Troubleshooting': + - 'Debugging': config/troubleshooting/debugging.md + - 'Mail Delivery with POP3': config/pop3.md + - 'Advanced Configuration': + - 'Optional Configuration': config/advanced/optional-config.md + - 'Maintenance': + - 'Update and Cleanup': config/advanced/maintenance/update-and-cleanup.md + - 'Override the Default Configs': + - 'Dovecot': config/advanced/override-defaults/dovecot.md + - 'Postfix': config/advanced/override-defaults/postfix.md + - 'LDAP Authentication': config/advanced/auth-ldap.md + - 'Email Filtering with Sieve': config/advanced/mail-sieve.md + - 'Email Gathering with Fetchmail': config/advanced/mail-fetchmail.md + - 'Email Forwarding': + - 'Relay Hosts': config/advanced/mail-forwarding/relay-hosts.md + - 'AWS SES': config/advanced/mail-forwarding/aws-ses.md + - 'Full-Text Search': config/advanced/full-text-search.md + - 'Kubernetes': config/advanced/kubernetes.md + - 'IPv6': config/advanced/ipv6.md + - 'Examples': + - 'Tutorials': + - 'Basic Installation': examples/tutorials/basic-installation.md + - 'Mailserver behind Proxy': examples/tutorials/mailserver-behind-proxy.md + - 'Use Cases': + - 'Forward-Only Mailserver with LDAP': examples/uses-cases/forward-only-mailserver-with-ldap-authentication.md + - 'FAQ' : faq/faq.md + - 'Contributing': + - 'Issues and Pull Requests': contributing/issues-and-pull-requests.md + - 'Coding Style': contributing/coding-style.md + - 'Tests': contributing/tests.md + - 'Documentation': contributing/documentation.md + - 'DockerHub': https://hub.docker.com/repository/docker/mailserver/docker-mailserver + - 'GHCR': https://github.com/orgs/docker-mailserver/packages/container/package/docker-mailserver From 724fe72d2076a8dd326fa85daa0fb7df84306027 Mon Sep 17 00:00:00 2001 From: wernerfred <20406381+wernerfred@users.noreply.github.com> Date: Thu, 11 Mar 2021 20:41:24 +0100 Subject: [PATCH 10/14] docs: Update metadata and links to new locations Also removed the FAQ inline heading link for Rancher. It's not a relevant link (as the question already expects knowledge of Rancher), and breaks out of the bg colour heading style due to the HTML generation logic from mkdocs. --- docs/content/config/advanced/auth-ldap.md | 2 +- docs/content/config/advanced/full-text-search.md | 2 +- docs/content/config/advanced/ipv6.md | 2 +- docs/content/config/advanced/kubernetes.md | 2 +- docs/content/config/advanced/mail-fetchmail.md | 4 ++-- docs/content/config/advanced/mail-sieve.md | 2 +- docs/content/config/advanced/optional-config.md | 16 ++++++++-------- .../examples/tutorials/basic-installation.md | 2 +- .../tutorials/mailserver-behind-proxy.md | 6 +++++- docs/content/faq.md | 6 +++--- docs/content/index.md | 4 ++-- docs/mkdocs.yml | 2 +- 12 files changed, 27 insertions(+), 23 deletions(-) diff --git a/docs/content/config/advanced/auth-ldap.md b/docs/content/config/advanced/auth-ldap.md index 8e0f4eb7..e369d310 100644 --- a/docs/content/config/advanced/auth-ldap.md +++ b/docs/content/config/advanced/auth-ldap.md @@ -1,5 +1,5 @@ --- -title: 'LDAP Authentication' +title: 'Advanced | LDAP Authentication' --- ## Introduction diff --git a/docs/content/config/advanced/full-text-search.md b/docs/content/config/advanced/full-text-search.md index 2a73507c..29a88d58 100644 --- a/docs/content/config/advanced/full-text-search.md +++ b/docs/content/config/advanced/full-text-search.md @@ -1,5 +1,5 @@ --- -title: 'Full-Text Search' +title: 'Advanced | Full-Text Search' --- ## Overview diff --git a/docs/content/config/advanced/ipv6.md b/docs/content/config/advanced/ipv6.md index c5ec5fb1..56c02ee4 100644 --- a/docs/content/config/advanced/ipv6.md +++ b/docs/content/config/advanced/ipv6.md @@ -1,5 +1,5 @@ --- -title: 'IPv6' +title: 'Advanced | IPv6' --- ## Background diff --git a/docs/content/config/advanced/kubernetes.md b/docs/content/config/advanced/kubernetes.md index 74a3bc31..bf4d90cd 100644 --- a/docs/content/config/advanced/kubernetes.md +++ b/docs/content/config/advanced/kubernetes.md @@ -1,5 +1,5 @@ --- -title: 'Kubernetes' +title: 'Advanced | Kubernetes' --- ## Deployment Example diff --git a/docs/content/config/advanced/mail-fetchmail.md b/docs/content/config/advanced/mail-fetchmail.md index 30aa6208..7713db52 100644 --- a/docs/content/config/advanced/mail-fetchmail.md +++ b/docs/content/config/advanced/mail-fetchmail.md @@ -1,5 +1,5 @@ --- -title: 'Email Gathering with Fetchmail' +title: 'Advanced | Email Gathering with Fetchmail' --- To enable the [fetchmail][fetchmail-website] service to retrieve e-mails set the environment variable `ENABLE_FETCHMAIL` to `1`. Your `docker-compose.yml` file should look like following snippet: @@ -114,7 +114,7 @@ fetchmail: 6.3.26 querying outlook.office365.com (protocol POP3) at Mon Aug 29 2 fetchmail: normal termination, status 1 ``` -[docs-setup]: ../config/setup.sh.md +[docs-setup]: ../../config/setup.sh.md [fetchmail-website]: https://www.fetchmail.info [fetchmail-docs]: https://www.fetchmail.info/fetchmail-man.html [fetchmail-docs-run]: https://www.fetchmail.info/fetchmail-man.html#31 diff --git a/docs/content/config/advanced/mail-sieve.md b/docs/content/config/advanced/mail-sieve.md index 001648f0..db6e779b 100644 --- a/docs/content/config/advanced/mail-sieve.md +++ b/docs/content/config/advanced/mail-sieve.md @@ -1,5 +1,5 @@ --- -title: 'Email Filtering with Sieve' +title: 'Advanced | Email Filtering with Sieve' --- ## User-Defined Sieve Filters diff --git a/docs/content/config/advanced/optional-config.md b/docs/content/config/advanced/optional-config.md index 97702c0b..3d8dc57b 100644 --- a/docs/content/config/advanced/optional-config.md +++ b/docs/content/config/advanced/optional-config.md @@ -1,5 +1,5 @@ --- -title: 'Optional Configuration' +title: 'Advanced | Optional Configuration' hide: - toc # Hide Table of Contents for this page --- @@ -39,16 +39,16 @@ This is a list of all configuration files and directories which are optional or - **dovecot.cf:** replaces `/etc/dovecot/local.conf`. (Docs: [Override Dovecot Defaults][docs-override-dovecot]) - **dovecot-quotas.cf:** list of custom quotas per mailbox. (Docs: [Accounts][docs-accounts-quota]) -[docs-accounts-quota]: ../config/user-management/accounts.md#notes -[docs-aliases-regex]: ../config/user-management/aliases.md#configuring-regexp-aliases -[docs-dkim]: ../config/best-practices/dkim.md -[docs-fail2ban]: ../config/security/fail2ban.md -[docs-faq-spamrules]: ../config/troubleshooting/faq.md#how-can-i-manage-my-custom-spamassassin-rules +[docs-accounts-quota]: ../../config/user-management/accounts.md#notes +[docs-aliases-regex]: ../../config/user-management/aliases.md#configuring-regexp-aliases +[docs-dkim]: ../../config/best-practices/dkim.md +[docs-fail2ban]: ../../config/security/fail2ban.md +[docs-faq-spamrules]: ../../faq.md#how-can-i-manage-my-custom-spamassassin-rules [docs-override-postfix]: ./override-defaults/postfix.md [docs-override-dovecot]: ./override-defaults/dovecot.md [docs-relayhosts-senderauth]: ./mail-forwarding/relay-hosts.md#sender-dependent-authentication [docs-relayhosts-senderhost]: ./mail-forwarding/relay-hosts.md#sender-dependent-relay-host [docs-sieve]: ./mail-sieve.md -[docs-setupsh]: ../config/setup.sh.md -[docs-ssl]: ../config/security/ssl.md +[docs-setupsh]: ../../config/setup.sh.md +[docs-ssl]: ../../config/security/ssl.md [github-commit-setup-stack.sh-L411]: https://github.com/docker-mailserver/docker-mailserver/blob/941e7acdaebe271eaf3d296b36d4d81df4c54b90/target/scripts/startup/setup-stack.sh#L411 diff --git a/docs/content/examples/tutorials/basic-installation.md b/docs/content/examples/tutorials/basic-installation.md index 3e89b558..7b63fab0 100644 --- a/docs/content/examples/tutorials/basic-installation.md +++ b/docs/content/examples/tutorials/basic-installation.md @@ -1,5 +1,5 @@ --- -title: 'Tutorials | Installation Examples' +title: 'Tutorials | Basic Installation' --- ## Building a Simple Mailserver diff --git a/docs/content/examples/tutorials/mailserver-behind-proxy.md b/docs/content/examples/tutorials/mailserver-behind-proxy.md index 1154ed1e..febccbf7 100644 --- a/docs/content/examples/tutorials/mailserver-behind-proxy.md +++ b/docs/content/examples/tutorials/mailserver-behind-proxy.md @@ -1,3 +1,7 @@ +--- +title: 'Tutorials | Mailserver behind Proxy' +--- + ## Using `docker-mailserver` behind a Proxy ### Information @@ -120,4 +124,4 @@ service imap-login { !!! note Port `10993` is used here to avoid conflicts with internal systems like `postscreen` and `amavis` as they will exchange messages on the default port and obviously have a different origin then compared to the proxy. -[docs-optionalconfig]: ../advanced/optional-config.md +[docs-optionalconfig]: ../../config/advanced/optional-config.md diff --git a/docs/content/faq.md b/docs/content/faq.md index f262f7a6..e142bbe4 100644 --- a/docs/content/faq.md +++ b/docs/content/faq.md @@ -1,5 +1,5 @@ --- -title: 'Troubleshooting | FAQ' +title: 'FAQ' --- ### What kind of database are you using? @@ -307,7 +307,7 @@ Otherwise, it could work with 512M of RAM. Current figure is about 850M and growing. If you get errors about clamav or amavis failing to allocate memory you need more RAM or more swap and of course docker must be allowed to use swap (not always the case). If you can't use swap at all you may need 3G RAM. -### Can `docker-mailserver` run in a [Rancher Environment](http://rancher.com/rancher/)? +### Can `docker-mailserver` run in a Rancher Environment? Yes, by adding the environment variable `PERMIT_DOCKER: network`. @@ -401,7 +401,7 @@ sed -i 's/rimap -r/rimap/' /etc/supervisor/conf.d/saslauth.conf supervisorctl update ``` -[docs-maintenance]: ../../advanced/maintenance/update-and-cleanup.md +[docs-maintenance]: ./config/advanced/maintenance/update-and-cleanup.md [github-issue-95]: https://github.com/docker-mailserver/docker-mailserver/issues/95 [github-issue-97]: https://github.com/docker-mailserver/docker-mailserver/issues/97 [github-issue-1247]: https://github.com/docker-mailserver/docker-mailserver/issues/1247 diff --git a/docs/content/index.md b/docs/content/index.md index c683a61a..14485769 100644 --- a/docs/content/index.md +++ b/docs/content/index.md @@ -23,8 +23,8 @@ This wiki provides you with advanced configuration, detailed examples, and hints We are always happy to welcome new contributors. For guidelines and entrypoints please have a look at the [Contributing section][docs-contributing]. [docs-contributing]: ./contributing/issues-and-pull-requests.md -[docs-faq]: ./config/troubleshooting/faq.md -[docs-optionalconfig]: ./advanced/optional-config.md +[docs-faq]: ./faq.md +[docs-optionalconfig]: ./config/advanced/optional-config.md [docs-setupsh]: ./config/setup.sh.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 diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index baf62d3b..49f10003 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -101,7 +101,7 @@ nav: - 'Mailserver behind Proxy': examples/tutorials/mailserver-behind-proxy.md - 'Use Cases': - 'Forward-Only Mailserver with LDAP': examples/uses-cases/forward-only-mailserver-with-ldap-authentication.md - - 'FAQ' : faq/faq.md + - 'FAQ' : faq.md - 'Contributing': - 'Issues and Pull Requests': contributing/issues-and-pull-requests.md - 'Coding Style': contributing/coding-style.md From 463bc967d229a55de6522f4b08d3a6427a3f8f67 Mon Sep 17 00:00:00 2001 From: wernerfred <20406381+wernerfred@users.noreply.github.com> Date: Mon, 1 Mar 2021 21:32:45 +0100 Subject: [PATCH 11/14] docs(fix): Update wiki references to the new docs url Additionally replaces old references to `tvial` images with the new `mailserver` docker image name. --- .github/ISSUE_TEMPLATE/bug_report.md | 14 +++++++------- .github/ISSUE_TEMPLATE/config.yml | 4 ++-- .github/pull_request_template.md | 2 +- CODE_OF_CONDUCT.md | 2 +- CONTRIBUTING.md | 4 ++-- ENVIRONMENT.md | 4 ++-- README.md | 12 ++++++------ docs/content/config/advanced/auth-ldap.md | 2 +- docs/content/config/advanced/full-text-search.md | 2 +- docs/content/config/advanced/kubernetes.md | 2 +- docs/content/config/security/ssl.md | 6 +++--- .../contributing/issues-and-pull-requests.md | 4 ++-- .../examples/tutorials/basic-installation.md | 4 ++-- .../examples/tutorials/mailserver-behind-proxy.md | 2 +- docs/content/faq.md | 6 +++--- docs/content/index.md | 2 +- mailserver.env | 2 +- 17 files changed, 37 insertions(+), 37 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 37ef22cb..c54d02aa 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -13,21 +13,21 @@ Possible answers to your issue https://github.com/docker-mailserver/docker-mailserver#requirements * Email seen as spam: - https://github.com/docker-mailserver/docker-mailserver/wiki/Configure-SPF - https://github.com/docker-mailserver/docker-mailserver/wiki/Configure-DKIM + https://docker-mailserver.github.io/docker-mailserver/edge/config/best-practices/spf + https://docker-mailserver.github.io/docker-mailserver/edge/config/best-practices/dkim * Creating new domains and accounts - https://github.com/docker-mailserver/docker-mailserver/wiki/Configure-Accounts + https://docker-mailserver.github.io/docker-mailserver/edge/config/user-management/accounts * Use a relay mail server - https://github.com/docker-mailserver/docker-mailserver/wiki/Configure-AWS-SES + https://docker-mailserver.github.io/docker-mailserver/edge/config/advanced/mail-forwarding/aws-ses The variable name can be used for other email servers. * FAQ and tips - https://github.com/docker-mailserver/docker-mailserver/wiki/FAQ-and-Tips + https://docker-mailserver.github.io/docker-mailserver/edge/faq -* The wiki - https://github.com/docker-mailserver/docker-mailserver/wiki +* The documentation + https://docker-mailserver.github.io/docker-mailserver/edge * Open issues https://github.com/docker-mailserver/docker-mailserver/issues diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 9bd2dd71..ed2eb258 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -2,8 +2,8 @@ blank_issues_enabled: false contact_links: - - name: Wiki - url: https://github.com/docker-mailserver/docker-mailserver/wiki + - name: Documentation + url: https://docker-mailserver.github.io/docker-mailserver/edge about: Extended documentaton - visit this first before opening issues - name: Default Documentation url: https://github.com/docker-mailserver/docker-mailserver/blob/master/README.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 0a739ebf..9e6fda57 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -20,6 +20,6 @@ Fixes # (issue) - [ ] My code follows the style guidelines of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas -- [ ] I have made corresponding changes to the documentation (README.md or ENVIRONMENT.md or the Wiki) +- [ ] I have made corresponding changes to the documentation (README.md or ENVIRONMENT.md or the documentation) - [ ] If necessary I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md index 63216313..17e8fe48 100644 --- a/CODE_OF_CONDUCT.md +++ b/CODE_OF_CONDUCT.md @@ -29,7 +29,7 @@ Examples of unacceptable behavior include: Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful. -Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. +Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, documentation edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate. ## Scope diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 12ec220b..44465d0f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,6 +1,6 @@ # Contributing -This project is Open Source. That means that you can contribute on enhancements, bug fixing or improving the documentation in the [Wiki](https://github.com/docker-mailserver/docker-mailserver/wiki). +This project is Open Source. That means that you can contribute on enhancements, bug fixing or improving the [documentation](https://docker-mailserver.github.io/docker-mailserver/edge). 1. [Issues & PRs](#issues--prs) 1. [Opening an Issue](#opening-an-issue) @@ -13,7 +13,7 @@ This project is Open Source. That means that you can contribute on enhancements, ### Opening an Issue -**Before opening an issue**, read the [`README`](./README.md) carefully, use the [Wiki](https://github.com/docker-mailserver/docker-mailserver/wiki/), the Postfix/Dovecot documentation and your search engine you trust. The issue tracker is not meant to be used for unrelated questions! When opening an issue, please provide details use case to let the community reproduce your problem. Please start the mail server with env `DMS_DEBUG=1` and paste the output into the issue. **Use the issue templates** to provide the necessary information. Issues which do not use these templates are not worked on and closed. By raising issues, I agree to these terms and I understand, that the rules set for the issue tracker will help both maintainers as well as everyone to find a solution. +**Before opening an issue**, read the [`README`](./README.md) carefully, use the [Documentation](https://docker-mailserver.github.io/docker-mailserver/edge), the Postfix/Dovecot documentation and your search engine you trust. The issue tracker is not meant to be used for unrelated questions! When opening an issue, please provide details use case to let the community reproduce your problem. Please start the mail server with env `DMS_DEBUG=1` and paste the output into the issue. **Use the issue templates** to provide the necessary information. Issues which do not use these templates are not worked on and closed. By raising issues, I agree to these terms and I understand, that the rules set for the issue tracker will help both maintainers as well as everyone to find a solution. Maintainers take the time to improve on this project and help by solving issues together. It is therefore expected from others to make an effort and **comply with the rules**. diff --git a/ENVIRONMENT.md b/ENVIRONMENT.md index 89f60de2..ae3c0089 100644 --- a/ENVIRONMENT.md +++ b/ENVIRONMENT.md @@ -71,7 +71,7 @@ Otherwise, `iptables` won't be able to ban IPs. - Optional: `SSL_ALT_CERT_PATH` and `SSL_ALT_KEY_PATH` allow providing a 2nd certificate as a fallback for dual (aka hybrid) certificate support. Useful for ECDSA with an RSA fallback. Presently only `manual` mode supports this feature. - self-signed => Enables self-signed certificates. -Please read [the SSL page in the wiki](https://github.com/docker-mailserver/docker-mailserver/wiki/Configure-SSL) for more information. +Please read [the SSL page in the documentation](https://docker-mailserver.github.io/docker-mailserver/edge/config/security/ssl) for more information. ##### TLS_LEVEL @@ -144,7 +144,7 @@ Set the mailbox size limit for all users. If set to zero, the size will be unlim - **1** => Dovecot quota is enabled - 0 => Dovecot quota is disabled -See [mailbox quota](https://github.com/docker-mailserver/docker-mailserver/wiki/Configure-Accounts#mailbox-quota). +See [mailbox quota](https://docker-mailserver.github.io/docker-mailserver/edge/config/user-management/accounts/#notes). ##### POSTFIX\_MESSAGE\_SIZE\_LIMIT diff --git a/README.md b/README.md index 1518b0f3..330a23a1 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ A fullstack but simple mail server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.) ## Included Services - [Postfix](http://www.postfix.org) with SMTP or LDAP auth -- [Dovecot](https://www.dovecot.org) for SASL, IMAP (or POP3), with LDAP Auth, Sieve and [quotas](https://github.com/docker-mailserver/docker-mailserver/wiki/Configure-Accounts#mailbox-quota) +- [Dovecot](https://www.dovecot.org) for SASL, IMAP (or POP3), with LDAP Auth, Sieve and [quotas](https://docker-mailserver.github.io/docker-mailserver/edge/config/user-management/accounts#notes) - [Amavis](https://www.amavis.org/) - [Spamassasin](http://spamassassin.apache.org/) supporting custom rules - [ClamAV](https://www.clamav.net/) with automatic updates @@ -33,8 +33,8 @@ A fullstack but simple mail server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.) - [Postscreen](http://www.postfix.org/POSTSCREEN_README.html) - [Postgrey](https://postgrey.schweikert.ch/) - [LetsEncrypt](https://letsencrypt.org/) and self-signed certificates -- [Setup script](https://github.com/docker-mailserver/docker-mailserver/wiki/setup.sh) to easily configure and maintain your mailserver -- Basic [Sieve support](https://github.com/docker-mailserver/docker-mailserver/wiki/Configure-Sieve-filters) using dovecot +- [Setup script](https://docker-mailserver.github.io/docker-mailserver/edge/config/setup.sh) to easily configure and maintain your mailserver +- Basic [Sieve support](https://docker-mailserver.github.io/docker-mailserver/edge/config/advanced/mail-sieve) using dovecot - SASLauthd with LDAP auth - Persistent data and state - [CI/CD](https://github.com/docker-mailserver/docker-mailserver/actions) @@ -53,7 +53,7 @@ A fullstack but simple mail server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.) - 1 vCore - 512MB RAM -**Note:** You'll need to deactivate some services like ClamAV to be able to run on a host with 512MB of RAM. Even with 1G RAM you may run into problems without swap, see [FAQ](https://github.com/docker-mailserver/docker-mailserver/wiki/FAQ-and-Tips). +**Note:** You'll need to deactivate some services like ClamAV to be able to run on a host with 512MB of RAM. Even with 1G RAM you may run into problems without swap, see [FAQ](https://docker-mailserver.github.io/docker-mailserver/edge/faq/#what-system-requirements-are-required-to-run-docker-mailserver-effectively). ## Usage @@ -108,7 +108,7 @@ chmod a+x ./setup.sh - don't quote your values - variable substitution is *not* supported (e.g. `OVERRIDE_HOSTNAME=$HOSTNAME.$DOMAINNAME`). - Variables in `.env` are expanded in the `docker-compose.yml` file **only** and **not** in the container. The file `mailserver.env` serves this case where environment variables are used in the container. -- If you want to use a bare domain (host name = domain name), see [FAQ](https://github.com/docker-mailserver/docker-mailserver/wiki/FAQ-and-Tips#can-i-use-nakedbare-domains-no-host-name) +- If you want to use a bare domain (host name = domain name), see [FAQ](https://docker-mailserver.github.io/docker-mailserver/edge/faq#can-i-use-nakedbare-domains-no-host-name) ### Get up and running @@ -223,7 +223,7 @@ If you got any problems with SPF and/or forwarding mails, give [SRS](https://git 2. Receives email and filters for spam and viruses. For submitting outgoing mail you should prefer the submission ports(465, 587), which require authentication. Unless a relay host is configured, outgoing email will leave the server via port 25(thus outbound traffic must not be blocked by your provider or firewall). 3. A submission port since 2018, [RFC 8314](https://tools.ietf.org/html/rfc8314). Originally a secure variant of port 25. -See the [wiki](https://github.com/docker-mailserver/docker-mailserver/wiki) for further details and best practice advice, especially regarding security concerns. +See the [documentation](https://docker-mailserver.github.io/docker-mailserver/edge/config/security/understanding-the-ports/) for further details and best practice advice, especially regarding security concerns. ## Examples diff --git a/docs/content/config/advanced/auth-ldap.md b/docs/content/config/advanced/auth-ldap.md index e369d310..8ce8e2c5 100644 --- a/docs/content/config/advanced/auth-ldap.md +++ b/docs/content/config/advanced/auth-ldap.md @@ -39,7 +39,7 @@ version: '2' services: mail: - image: tvial/docker-mailserver:latest + image: mailserver/docker-mailserver:latest hostname: mail domainname: domain.com container_name: mail diff --git a/docs/content/config/advanced/full-text-search.md b/docs/content/config/advanced/full-text-search.md index 29a88d58..8a626bb4 100644 --- a/docs/content/config/advanced/full-text-search.md +++ b/docs/content/config/advanced/full-text-search.md @@ -20,7 +20,7 @@ The [dovecot-solr Plugin](https://wiki2.dovecot.org/Plugins/FTS/Solr) is used in restart: always mailserver: - image: tvial/docker-mailserver:latest + image: mailserver/docker-mailserver:latest ... volumes: ... diff --git a/docs/content/config/advanced/kubernetes.md b/docs/content/config/advanced/kubernetes.md index bf4d90cd..c3f4c86f 100644 --- a/docs/content/config/advanced/kubernetes.md +++ b/docs/content/config/advanced/kubernetes.md @@ -144,7 +144,7 @@ spec: # mountPath: /tmp/files containers: - name: docker-mailserver - image: tvial/docker-mailserver:latest + image: mailserver/docker-mailserver:latest imagePullPolicy: Always volumeMounts: - name: config diff --git a/docs/content/config/security/ssl.md b/docs/content/config/security/ssl.md index 95a8f7f1..c151e2e4 100644 --- a/docs/content/config/security/ssl.md +++ b/docs/content/config/security/ssl.md @@ -190,7 +190,7 @@ The second part of the setup is the actual mail container. So, in another folder version: '2' services: mail: - image: tvial/docker-mailserver:latest + image: mailserver/docker-mailserver:latest hostname: ${HOSTNAME} domainname: ${DOMAINNAME} container_name: ${CONTAINER_NAME} @@ -379,7 +379,7 @@ This allows for support of wild card certificates: `SSL_DOMAIN=*.example.com`. H version: '3.8' services: mail: - image: tvial/docker-mailserver:stable + image: mailserver/docker-mailserver:stable hostname: mail domainname: example.com volumes: @@ -427,7 +427,7 @@ Depending of your Traefik configuration, certificates may be stored using a file You can easily generate a self-signed SSL certificate by using the following command: ```sh -docker run -it --rm -v "$(pwd)"/config/ssl:/tmp/docker-mailserver/ssl -h mail.my-domain.com -t tvial/docker-mailserver generate-ssl-certificate +docker run -it --rm -v "$(pwd)"/config/ssl:/tmp/docker-mailserver/ssl -h mail.my-domain.com -t mailserver/docker-mailserver generate-ssl-certificate # Press enter # Enter a password when needed diff --git a/docs/content/contributing/issues-and-pull-requests.md b/docs/content/contributing/issues-and-pull-requests.md index 801e06f0..6ae3cb48 100644 --- a/docs/content/contributing/issues-and-pull-requests.md +++ b/docs/content/contributing/issues-and-pull-requests.md @@ -8,7 +8,7 @@ This project is Open Source. That means that you can contribute on enhancements, !!! attention - **Before opening an issue**, read the [`README`][github-file-readme] carefully, use the [Wiki][wiki], the Postfix/Dovecot documentation and your search engine you trust. The issue tracker is not meant to be used for unrelated questions! + **Before opening an issue**, read the [`README`][github-file-readme] carefully, study the [documentation][docs], the Postfix/Dovecot documentation and your search engine you trust. The issue tracker is not meant to be used for unrelated questions! When opening an issue, please provide details use case to let the community reproduce your problem. Please start the mail server with env `DMS_DEBUG=1` and paste the output into the issue. @@ -43,7 +43,7 @@ The development workflow is the following: 2. When your changes are validated, your branch is merged 3. CI builds the new `:edge` image immediately and your changes will be includes in the next version release. -[wiki]: https://docker-mailserver.github.io/docker-mailserver +[docs]: https://docker-mailserver.github.io/docker-mailserver/edge [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 [commit]: https://help.github.com/articles/closing-issues-via-commit-messages/ diff --git a/docs/content/examples/tutorials/basic-installation.md b/docs/content/examples/tutorials/basic-installation.md index 7b63fab0..50f934ff 100644 --- a/docs/content/examples/tutorials/basic-installation.md +++ b/docs/content/examples/tutorials/basic-installation.md @@ -27,7 +27,7 @@ We are going to use this docker based mailserver: services: mail: - image: tvial/docker-mailserver:latest + image: mailserver/docker-mailserver:latest hostname: mail domainname: example.org container_name: mail @@ -76,7 +76,7 @@ We are going to use this docker based mailserver: On your server you may have to do it differently. -- Pull the docker image: `docker pull tvial/docker-mailserver:latest` +- Pull the docker image: `docker pull mailserver/docker-mailserver:latest` - Now generate the DKIM keys with `./setup.sh config dkim` and copy the content of the file `config/opendkim/keys/domain.tld/mail.txt` on the domain zone configuration at the DNS server. I use [bind9](https://github.com/docker-scripts/bind9) for managing my domains, so I just paste it on `example.org.db`: diff --git a/docs/content/examples/tutorials/mailserver-behind-proxy.md b/docs/content/examples/tutorials/mailserver-behind-proxy.md index febccbf7..cc4c5620 100644 --- a/docs/content/examples/tutorials/mailserver-behind-proxy.md +++ b/docs/content/examples/tutorials/mailserver-behind-proxy.md @@ -60,7 +60,7 @@ Feel free to add your configuration if you achived the same goal using different version: '2' services: mail: - image: tvial/docker-mailserver:release-v7.2.0 + image: mailserver/docker-mailserver:release-v7.2.0 restart: always networks: - proxy diff --git a/docs/content/faq.md b/docs/content/faq.md index e142bbe4..d55e56f8 100644 --- a/docs/content/faq.md +++ b/docs/content/faq.md @@ -187,7 +187,7 @@ Then with plain `docker-compose`: ```yaml services: mail: - image: tvial/docker-mailserver:latest + image: mailserver/docker-mailserver:latest volumes: - ./cron/sa-learn:/etc/cron.d/sa-learn ``` @@ -199,7 +199,7 @@ version: "3.3" services: mail: - image: tvial/docker-mailserver:latest + image: mailserver/docker-mailserver:latest # ... configs: - source: my_sa_crontab @@ -351,7 +351,7 @@ proxy_interfaces = X.X.X.X (your public IP) ### What About Updates You can of course use a own script or every now and then pull && stop && rm && start the images but there are tools available for this. -There is a page in the [Update and Cleanup][docs-maintenance] wiki page that explains how to use it the docker way. +There is a section in the [Update and Cleanup][docs-maintenance] documentation page that explains how to use it the docker way. ### How to adjust settings with the `user-patches.sh` script diff --git a/docs/content/index.md b/docs/content/index.md index 14485769..923ee83c 100644 --- a/docs/content/index.md +++ b/docs/content/index.md @@ -6,7 +6,7 @@ title: Home Please first have a look at the [`README.md`][github-file-readme] to setup and configure this server. -This wiki provides you with advanced configuration, detailed examples, and hints. +This documentation provides you with advanced configuration, detailed examples, and hints. ## Getting Started diff --git a/mailserver.env b/mailserver.env index 0eb4e328..a039a779 100644 --- a/mailserver.env +++ b/mailserver.env @@ -83,7 +83,7 @@ POSTSCREEN_ACTION=enforce # 1 => only launch postfix smtp SMTP_ONLY= -# Please read [the SSL page in the wiki](https://github.com/docker-mailserver/docker-mailserver/wiki/Configure-SSL) for more information. +# Please read [the SSL page in the documentation](https://docker-mailserver.github.io/docker-mailserver/edge/config/security/ssl) for more information. # # empty => SSL disabled # letsencrypt => Enables Let's Encrypt certificates From 711b4c9d83f5ee4b21b78823fcead12c6f646a7e Mon Sep 17 00:00:00 2001 From: wernerfred <20406381+wernerfred@users.noreply.github.com> Date: Tue, 2 Mar 2021 17:39:06 +0100 Subject: [PATCH 12/14] docs(refactor): Convert more content to use admonitions + improvements --- docs/content/config/advanced/auth-ldap.md | 171 ++-- docs/content/config/advanced/kubernetes.md | 783 +++++++++--------- .../content/config/advanced/mail-fetchmail.md | 36 +- .../advanced/mail-forwarding/aws-ses.md | 2 +- .../advanced/mail-forwarding/relay-hosts.md | 10 +- docs/content/config/advanced/mail-sieve.md | 57 +- .../advanced/override-defaults/dovecot.md | 2 +- .../advanced/override-defaults/postfix.md | 4 +- docs/content/config/best-practices/dkim.md | 5 +- docs/content/config/best-practices/dmarc.md | 3 +- docs/content/config/best-practices/spf.md | 6 +- docs/content/config/pop3.md | 7 +- docs/content/config/security/ssl.md | 374 +++++---- docs/content/config/setup.sh.md | 4 + .../examples/tutorials/basic-installation.md | 66 +- ...nly-mailserver-with-ldap-authentication.md | 8 +- docs/content/faq.md | 117 +-- docs/content/introduction.md | 21 +- 18 files changed, 884 insertions(+), 792 deletions(-) diff --git a/docs/content/config/advanced/auth-ldap.md b/docs/content/config/advanced/auth-ldap.md index 8ce8e2c5..66e641e1 100644 --- a/docs/content/config/advanced/auth-ldap.md +++ b/docs/content/config/advanced/auth-ldap.md @@ -6,106 +6,107 @@ title: 'Advanced | LDAP Authentication' Getting started with ldap and this mailserver we need to take 3 parts in account: -* POSTFIX -* DOVECOT -* SASLAUTHD (this can also be handled by dovecot above) +- `postfix` +- `dovecot` +- `saslauthd` (this can also be handled by dovecot) ## Variables to Control Provisioning by the Container -__POSTFIX__: +Have a look at the [`ENVIRONMENT.md`][github-file-env] for information on the default values. -* `LDAP_QUERY_FILTER_USER` -* `LDAP_QUERY_FILTER_GROUP` -* `LDAP_QUERY_FILTER_ALIAS` -* `LDAP_QUERY_FILTER_DOMAIN` +!!! example "postfix" -__SASLAUTHD__: + - `LDAP_QUERY_FILTER_USER` + - `LDAP_QUERY_FILTER_GROUP` + - `LDAP_QUERY_FILTER_ALIAS` + - `LDAP_QUERY_FILTER_DOMAIN` -* `SASLAUTHD_LDAP_FILTER` +!!! example "saslauthd" -__DOVECOT__: + - `SASLAUTHD_LDAP_FILTER` -* `DOVECOT_USER_FILTER` -* `DOVECOT_PASS_FILTER` +!!! example "dovecot" -!!! note - This page will provide several use cases like recipes to show, how this project can be used with it's LDAP Features. + - `DOVECOT_USER_FILTER` + - `DOVECOT_PASS_FILTER` ## LDAP Setup - Kopano / Zarafa -```yaml ---- -version: '2' +???+ example "Example Code" -services: - mail: - image: mailserver/docker-mailserver:latest - hostname: mail - domainname: domain.com - container_name: mail + ```yaml + --- + version: '2' - ports: - - "25:25" - - "143:143" - - "587:587" - - "993:993" + services: + mail: + image: mailserver/docker-mailserver:latest + hostname: mail + domainname: domain.com + container_name: mail + + ports: + - "25:25" + - "143:143" + - "587:587" + - "993:993" + + volumes: + - maildata:/var/mail + - mailstate:/var/mail-state + - ./config/:/tmp/docker-mailserver/ + + environment: + # We are not using dovecot here + - SMTP_ONLY=1 + - ENABLE_SPAMASSASSIN=1 + - ENABLE_CLAMAV=1 + - ENABLE_FAIL2BAN=1 + - ENABLE_POSTGREY=1 + - SASLAUTHD_PASSWD= + + # >>> SASL Authentication + - ENABLE_SASLAUTHD=1 + - SASLAUTHD_LDAP_SERVER= + - SASLAUTHD_LDAP_PROTO= + - SASLAUTHD_LDAP_BIND_DN=cn=Administrator,cn=Users,dc=mydomain,dc=loc + - SASLAUTHD_LDAP_PASSWORD=mypassword + - SASLAUTHD_LDAP_SEARCH_BASE=dc=mydomain,dc=loc + - SASLAUTHD_LDAP_FILTER=(&(sAMAccountName=%U)(objectClass=person)) + - SASLAUTHD_MECHANISMS=ldap + # <<< SASL Authentication + + # >>> Postfix Ldap Integration + - ENABLE_LDAP=1 + - LDAP_SERVER_HOST= + - LDAP_SEARCH_BASE=dc=mydomain,dc=loc + - LDAP_BIND_DN=cn=Administrator,cn=Users,dc=mydomain,dc=loc + - LDAP_BIND_PW=mypassword + - LDAP_QUERY_FILTER_USER=(&(objectClass=user)(mail=%s)) + - LDAP_QUERY_FILTER_GROUP=(&(objectclass=group)(mail=%s)) + - LDAP_QUERY_FILTER_ALIAS=(&(objectClass=user)(otherMailbox=%s)) + - LDAP_QUERY_FILTER_DOMAIN=(&(|(mail=*@%s)(mailalias=*@%s)(mailGroupMember=*@%s))(mailEnabled=TRUE)) + # <<< Postfix Ldap Integration + + # >>> Kopano Integration + - ENABLE_POSTFIX_VIRTUAL_TRANSPORT=1 + - POSTFIX_DAGENT=lmtp:kopano:2003 + # <<< Kopano Integration + + - ONE_DIR=1 + - DMS_DEBUG=0 + - SSL_TYPE=letsencrypt + - PERMIT_DOCKER=host + + cap_add: + - NET_ADMIN volumes: - - maildata:/var/mail - - mailstate:/var/mail-state - - ./config/:/tmp/docker-mailserver/ - - environment: - # We are not using dovecot here - - SMTP_ONLY=1 - - ENABLE_SPAMASSASSIN=1 - - ENABLE_CLAMAV=1 - - ENABLE_FAIL2BAN=1 - - ENABLE_POSTGREY=1 - - SASLAUTHD_PASSWD= - - # >>> SASL Authentication - - ENABLE_SASLAUTHD=1 - - SASLAUTHD_LDAP_SERVER= - - SASLAUTHD_LDAP_PROTO= - - SASLAUTHD_LDAP_BIND_DN=cn=Administrator,cn=Users,dc=mydomain,dc=loc - - SASLAUTHD_LDAP_PASSWORD=mypassword - - SASLAUTHD_LDAP_SEARCH_BASE=dc=mydomain,dc=loc - - SASLAUTHD_LDAP_FILTER=(&(sAMAccountName=%U)(objectClass=person)) - - SASLAUTHD_MECHANISMS=ldap - # <<< SASL Authentication - - # >>> Postfix Ldap Integration - - ENABLE_LDAP=1 - - LDAP_SERVER_HOST= - - LDAP_SEARCH_BASE=dc=mydomain,dc=loc - - LDAP_BIND_DN=cn=Administrator,cn=Users,dc=mydomain,dc=loc - - LDAP_BIND_PW=mypassword - - LDAP_QUERY_FILTER_USER=(&(objectClass=user)(mail=%s)) - - LDAP_QUERY_FILTER_GROUP=(&(objectclass=group)(mail=%s)) - - LDAP_QUERY_FILTER_ALIAS=(&(objectClass=user)(otherMailbox=%s)) - - LDAP_QUERY_FILTER_DOMAIN=(&(|(mail=*@%s)(mailalias=*@%s)(mailGroupMember=*@%s))(mailEnabled=TRUE)) - # <<< Postfix Ldap Integration - - # >>> Kopano Integration - - ENABLE_POSTFIX_VIRTUAL_TRANSPORT=1 - - POSTFIX_DAGENT=lmtp:kopano:2003 - # <<< Kopano Integration - - - ONE_DIR=1 - - DMS_DEBUG=0 - - SSL_TYPE=letsencrypt - - PERMIT_DOCKER=host - - cap_add: - - NET_ADMIN - -volumes: - maildata: - driver: local - mailstate: - driver: local -``` + maildata: + driver: local + mailstate: + driver: local + ``` If your directory has not the postfix-book schema installed, then you must change the internal attribute handling for dovecot. For this you have to change the `pass_attr` and the `user_attr` mapping, as shown in the example below: @@ -122,3 +123,5 @@ The following example illustrates this for a directory that has the qmail-schema - DOVECOT_PASS_FILTER=(&(objectClass=qmailUser)(uid=%u)(accountStatus=active)) - DOVECOT_USER_FILTER=(&(objectClass=qmailUser)(uid=%u)(accountStatus=active)) ``` + +[github-file-env]: https://github.com/docker-mailserver/docker-mailserver/blob/master/ENVIRONMENT.md \ No newline at end of file diff --git a/docs/content/config/advanced/kubernetes.md b/docs/content/config/advanced/kubernetes.md index c3f4c86f..357e3621 100644 --- a/docs/content/config/advanced/kubernetes.md +++ b/docs/content/config/advanced/kubernetes.md @@ -6,231 +6,258 @@ title: 'Advanced | Kubernetes' There is nothing much in deploying mailserver to Kubernetes itself. The things are pretty same as in [`docker-compose.yml`][github-file-compose], but with Kubernetes syntax. -```yaml -apiVersion: v1 -kind: Namespace -metadata: - name: mailserver ---- -kind: ConfigMap -apiVersion: v1 -metadata: - name: mailserver.env.config - namespace: mailserver - labels: - app: mailserver -data: - OVERRIDE_HOSTNAME: example.com - ENABLE_FETCHMAIL: "0" - FETCHMAIL_POLL: "120" - ENABLE_SPAMASSASSIN: "0" - ENABLE_CLAMAV: "0" - ENABLE_FAIL2BAN: "0" - ENABLE_POSTGREY: "0" - ONE_DIR: "1" - DMS_DEBUG: "0" +??? example "ConfigMap" ---- -kind: ConfigMap -apiVersion: v1 -metadata: - name: mailserver.config - namespace: mailserver - labels: - app: mailserver -data: - postfix-accounts.cf: | - user1@example.com|{SHA512-CRYPT}$6$2YpW1nYtPBs2yLYS$z.5PGH1OEzsHHNhl3gJrc3D.YMZkvKw/vp.r5WIiwya6z7P/CQ9GDEJDr2G2V0cAfjDFeAQPUoopsuWPXLk3u1 - - postfix-virtual.cf: | - alias1@example.com user1@dexample.com - - #dovecot.cf: | - # service stats { - # unix_listener stats-reader { - # group = docker - # mode = 0666 - # } - # unix_listener stats-writer { - # group = docker - # mode = 0666 - # } - # } - - SigningTable: | - *@example.com mail._domainkey.example.com - - KeyTable: | - mail._domainkey.example.com example.com:mail:/etc/opendkim/keys/example.com-mail.key - - TrustedHosts: | - 127.0.0.1 - localhost - - #user-patches.sh: | - # #!/bin/bash - - #fetchmail.cf: | - ---- -kind: Secret -apiVersion: v1 -metadata: - name: mailserver.opendkim.keys - namespace: mailserver - labels: - app: mailserver -type: Opaque -data: - example.com-mail.key: 'base64-encoded-DKIM-key' - ---- -kind: Service -apiVersion: v1 -metadata: - name: mailserver - namespace: mailserver - labels: - app: mailserver -spec: - selector: - app: mailserver - ports: - - name: smtp - port: 25 - targetPort: smtp - - name: smtp-secure - port: 465 - targetPort: smtp-secure - - name: smtp-auth - port: 587 - targetPort: smtp-auth - - name: imap - port: 143 - targetPort: imap - - name: imap-secure - port: 993 - targetPort: imap-secure ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: mailserver - namespace: mailserver -spec: - replicas: 1 - selector: - matchLabels: - app: mailserver - template: + ```yaml + apiVersion: v1 + kind: Namespace metadata: + name: mailserver + --- + kind: ConfigMap + apiVersion: v1 + metadata: + name: mailserver.env.config + namespace: mailserver labels: app: mailserver - role: mail - tier: backend - spec: - #nodeSelector: - # kubernetes.io/hostname: local.k8s - #initContainers: - #- name: init-myservice - # image: busybox - # command: ["/bin/sh", "-c", "cp /tmp/user-patches.sh /tmp/files"] - # volumeMounts: - # - name: config - # subPath: user-patches.sh - # mountPath: /tmp/user-patches.sh - # readOnly: true - # - name: tmp-files - # mountPath: /tmp/files - containers: - - name: docker-mailserver - image: mailserver/docker-mailserver:latest - imagePullPolicy: Always - volumeMounts: - - name: config - subPath: postfix-accounts.cf - mountPath: /tmp/docker-mailserver/postfix-accounts.cf - readOnly: true - #- name: config - # subPath: postfix-main.cf - # mountPath: /tmp/docker-mailserver/postfix-main.cf - # readOnly: true - - name: config - subPath: postfix-virtual.cf - mountPath: /tmp/docker-mailserver/postfix-virtual.cf - readOnly: true - - name: config - subPath: fetchmail.cf - mountPath: /tmp/docker-mailserver/fetchmail.cf - readOnly: true - - name: config - subPath: dovecot.cf - mountPath: /tmp/docker-mailserver/dovecot.cf - readOnly: true - #- name: config - # subPath: user1.example.com.dovecot.sieve - # mountPath: /tmp/docker-mailserver/user1@example.com.dovecot.sieve - # readOnly: true - #- name: tmp-files - # subPath: user-patches.sh - # mountPath: /tmp/docker-mailserver/user-patches.sh - - name: config - subPath: SigningTable - mountPath: /tmp/docker-mailserver/opendkim/SigningTable - readOnly: true - - name: config - subPath: KeyTable - mountPath: /tmp/docker-mailserver/opendkim/KeyTable - readOnly: true - - name: config - subPath: TrustedHosts - mountPath: /tmp/docker-mailserver/opendkim/TrustedHosts - readOnly: true - - name: opendkim-keys - mountPath: /tmp/docker-mailserver/opendkim/keys - readOnly: true - - name: data - mountPath: /var/mail - subPath: data - - name: data - mountPath: /var/mail-state - subPath: state - - name: data - mountPath: /var/log/mail - subPath: log - ports: - - name: smtp - containerPort: 25 - protocol: TCP - - name: smtp-secure - containerPort: 465 - protocol: TCP - - name: smtp-auth - containerPort: 587 - - name: imap - containerPort: 143 - protocol: TCP - - name: imap-secure - containerPort: 993 - protocol: TCP - envFrom: - - configMapRef: - name: mailserver.env.config - volumes: - - name: config - configMap: - name: mailserver.config - - name: opendkim-keys - secret: - secretName: mailserver.opendkim.keys - - name: data - persistentVolumeClaim: - claimName: mail-storage - - name: tmp-files - emptyDir: {} -``` + data: + OVERRIDE_HOSTNAME: example.com + ENABLE_FETCHMAIL: "0" + FETCHMAIL_POLL: "120" + ENABLE_SPAMASSASSIN: "0" + ENABLE_CLAMAV: "0" + ENABLE_FAIL2BAN: "0" + ENABLE_POSTGREY: "0" + ONE_DIR: "1" + DMS_DEBUG: "0" -!!! note + --- + kind: ConfigMap + apiVersion: v1 + metadata: + name: mailserver.config + namespace: mailserver + labels: + app: mailserver + data: + postfix-accounts.cf: | + user1@example.com|{SHA512-CRYPT}$6$2YpW1nYtPBs2yLYS$z.5PGH1OEzsHHNhl3gJrc3D.YMZkvKw/vp.r5WIiwya6z7P/CQ9GDEJDr2G2V0cAfjDFeAQPUoopsuWPXLk3u1 + + postfix-virtual.cf: | + alias1@example.com user1@dexample.com + + #dovecot.cf: | + # service stats { + # unix_listener stats-reader { + # group = docker + # mode = 0666 + # } + # unix_listener stats-writer { + # group = docker + # mode = 0666 + # } + # } + + SigningTable: | + *@example.com mail._domainkey.example.com + + KeyTable: | + mail._domainkey.example.com example.com:mail:/etc/opendkim/keys/example.com-mail.key + + TrustedHosts: | + 127.0.0.1 + localhost + + #user-patches.sh: | + # #!/bin/bash + + #fetchmail.cf: | + ``` + +??? example "Secret" + + ```yaml + apiVersion: v1 + kind: Namespace + metadata: + name: mailserver + --- + kind: Secret + apiVersion: v1 + metadata: + name: mailserver.opendkim.keys + namespace: mailserver + labels: + app: mailserver + type: Opaque + data: + example.com-mail.key: 'base64-encoded-DKIM-key' + ``` + +??? example "Service" + + ```yaml + apiVersion: v1 + kind: Namespace + metadata: + name: mailserver + --- + kind: Service + apiVersion: v1 + metadata: + name: mailserver + namespace: mailserver + labels: + app: mailserver + spec: + selector: + app: mailserver + ports: + - name: smtp + port: 25 + targetPort: smtp + - name: smtp-secure + port: 465 + targetPort: smtp-secure + - name: smtp-auth + port: 587 + targetPort: smtp-auth + - name: imap + port: 143 + targetPort: imap + - name: imap-secure + port: 993 + targetPort: imap-secure + ``` + +??? example "Deployment" + + ```yaml + apiVersion: v1 + kind: Namespace + metadata: + name: mailserver + --- + apiVersion: apps/v1 + kind: Deployment + metadata: + name: mailserver + namespace: mailserver + spec: + replicas: 1 + selector: + matchLabels: + app: mailserver + template: + metadata: + labels: + app: mailserver + role: mail + tier: backend + spec: + #nodeSelector: + # kubernetes.io/hostname: local.k8s + #initContainers: + #- name: init-myservice + # image: busybox + # command: ["/bin/sh", "-c", "cp /tmp/user-patches.sh /tmp/files"] + # volumeMounts: + # - name: config + # subPath: user-patches.sh + # mountPath: /tmp/user-patches.sh + # readOnly: true + # - name: tmp-files + # mountPath: /tmp/files + containers: + - name: docker-mailserver + image: mailserver/docker-mailserver:latest + imagePullPolicy: Always + volumeMounts: + - name: config + subPath: postfix-accounts.cf + mountPath: /tmp/docker-mailserver/postfix-accounts.cf + readOnly: true + #- name: config + # subPath: postfix-main.cf + # mountPath: /tmp/docker-mailserver/postfix-main.cf + # readOnly: true + - name: config + subPath: postfix-virtual.cf + mountPath: /tmp/docker-mailserver/postfix-virtual.cf + readOnly: true + - name: config + subPath: fetchmail.cf + mountPath: /tmp/docker-mailserver/fetchmail.cf + readOnly: true + - name: config + subPath: dovecot.cf + mountPath: /tmp/docker-mailserver/dovecot.cf + readOnly: true + #- name: config + # subPath: user1.example.com.dovecot.sieve + # mountPath: /tmp/docker-mailserver/user1@example.com.dovecot.sieve + # readOnly: true + #- name: tmp-files + # subPath: user-patches.sh + # mountPath: /tmp/docker-mailserver/user-patches.sh + - name: config + subPath: SigningTable + mountPath: /tmp/docker-mailserver/opendkim/SigningTable + readOnly: true + - name: config + subPath: KeyTable + mountPath: /tmp/docker-mailserver/opendkim/KeyTable + readOnly: true + - name: config + subPath: TrustedHosts + mountPath: /tmp/docker-mailserver/opendkim/TrustedHosts + readOnly: true + - name: opendkim-keys + mountPath: /tmp/docker-mailserver/opendkim/keys + readOnly: true + - name: data + mountPath: /var/mail + subPath: data + - name: data + mountPath: /var/mail-state + subPath: state + - name: data + mountPath: /var/log/mail + subPath: log + ports: + - name: smtp + containerPort: 25 + protocol: TCP + - name: smtp-secure + containerPort: 465 + protocol: TCP + - name: smtp-auth + containerPort: 587 + - name: imap + containerPort: 143 + protocol: TCP + - name: imap-secure + containerPort: 993 + protocol: TCP + envFrom: + - configMapRef: + name: mailserver.env.config + volumes: + - name: config + configMap: + name: mailserver.config + - name: opendkim-keys + secret: + secretName: mailserver.opendkim.keys + - name: data + persistentVolumeClaim: + claimName: mail-storage + - name: tmp-files + emptyDir: {} + ``` + +!!! warning Any sensitive data (keys, etc) should be deployed via [Secrets][k8s-config-secret]. Other configuration just fits well into [ConfigMaps][k8s-config-pod]. !!! note @@ -246,54 +273,58 @@ Preserving real client IP is relatively [non-trivial in Kubernetes][k8s-service- If you do not require SPF checks for incoming mails you may disable them in [Postfix configuration][docs-postfix] by dropping following line (which removes `check_policy_service unix:private/policyd-spf` option): -```yaml -kind: ConfigMap -apiVersion: v1 -metadata: - name: mailserver.config - labels: - app: mailserver -data: - postfix-main.cf: | - smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_unauth_pipelining, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, reject_unknown_recipient_domain, reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net -# ... +!!! example ---- + ```yaml + kind: ConfigMap + apiVersion: v1 + metadata: + name: mailserver.config + labels: + app: mailserver + data: + postfix-main.cf: | + smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_unauth_pipelining, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname, reject_unknown_recipient_domain, reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net + # ... -kind: Deployment -apiVersion: extensions/v1beta1 -metadata: - name: mailserver -# ... - volumeMounts: - - name: config - subPath: postfix-main.cf - mountPath: /tmp/docker-mailserver/postfix-main.cf - readOnly: true -``` + --- + + kind: Deployment + apiVersion: extensions/v1beta1 + metadata: + name: mailserver + # ... + volumeMounts: + - name: config + subPath: postfix-main.cf + mountPath: /tmp/docker-mailserver/postfix-main.cf + readOnly: true + ``` ### External IPs Service The simplest way is to expose mailserver as a [Service][k8s-network-service] with [external IPs][k8s-network-external-ip]. -```yaml -kind: Service -apiVersion: v1 -metadata: - name: mailserver - labels: - app: mailserver -spec: - selector: - app: mailserver - ports: - - name: smtp - port: 25 - targetPort: smtp -# ... - externalIPs: - - 80.11.12.10 -``` +!!! example + + ```yaml + kind: Service + apiVersion: v1 + metadata: + name: mailserver + labels: + app: mailserver + spec: + selector: + app: mailserver + ports: + - name: smtp + port: 25 + targetPort: smtp + # ... + externalIPs: + - 80.11.12.10 + ``` **Downsides** @@ -313,29 +344,31 @@ The [Proxy Pod][k8s-proxy-service] helps to avoid necessity of specifying extern The simplest way to preserve real client IP is to use `hostPort` and `hostNetwork: true` in the mailserver [Pod][k8s-workload-pod]. This comes in price of availability: you can talk to mailserver from outside world only via IPs of [Node][k8s-nodes] where mailserver is deployed. -```yaml -kind: Deployment -apiVersion: extensions/v1beta1 -metadata: - name: mailserver -# ... - spec: - hostNetwork: true -# ... - containers: -# ... - ports: - - name: smtp - containerPort: 25 - hostPort: 25 - - name: smtp-auth - containerPort: 587 - hostPort: 587 - - name: imap-secure - containerPort: 993 - hostPort: 993 -# ... -``` +!!! example + + ```yaml + kind: Deployment + apiVersion: extensions/v1beta1 + metadata: + name: mailserver + # ... + spec: + hostNetwork: true + # ... + containers: + # ... + ports: + - name: smtp + containerPort: 25 + hostPort: 25 + - name: smtp-auth + containerPort: 587 + hostPort: 587 + - name: imap-secure + containerPort: 993 + hostPort: 993 + # ... + ``` **Downsides** @@ -363,53 +396,55 @@ With [HAProxy][dockerhub-haproxy], the configuration should look similar to the Then, configure both [Postfix][docs-postfix] and [Dovecot][docs-dovecot] to expect the PROXY protocol: -```yaml -kind: ConfigMap -apiVersion: v1 -metadata: - name: mailserver.config - labels: - app: mailserver -data: - postfix-main.cf: | - postscreen_upstream_proxy_protocol = haproxy - postfix-master.cf: | - submission/inet/smtpd_upstream_proxy_protocol=haproxy - smtps/inet/smtpd_upstream_proxy_protocol=haproxy - dovecot.cf: | - # Assuming your ingress controller is bound to 10.0.0.0/8 - haproxy_trusted_networks = 10.0.0.0/8, 127.0.0.0/8 - service imap-login { - inet_listener imaps { - haproxy = yes - } - } -# ... ---- +!!! example -kind: Deployment -apiVersion: extensions/v1beta1 -metadata: - name: mailserver -spec: - template: + ```yaml + kind: ConfigMap + apiVersion: v1 + metadata: + name: mailserver.config + labels: + app: mailserver + data: + postfix-main.cf: | + postscreen_upstream_proxy_protocol = haproxy + postfix-master.cf: | + submission/inet/smtpd_upstream_proxy_protocol=haproxy + smtps/inet/smtpd_upstream_proxy_protocol=haproxy + dovecot.cf: | + # Assuming your ingress controller is bound to 10.0.0.0/8 + haproxy_trusted_networks = 10.0.0.0/8, 127.0.0.0/8 + service imap-login { + inet_listener imaps { + haproxy = yes + } + } + # ... + --- + + kind: Deployment + apiVersion: extensions/v1beta1 + metadata: + name: mailserver spec: - containers: - - name: docker-mailserver - volumeMounts: - - name: config - subPath: postfix-main.cf - mountPath: /tmp/docker-mailserver/postfix-main.cf - readOnly: true - - name: config - subPath: postfix-master.cf - mountPath: /tmp/docker-mailserver/postfix-master.cf - readOnly: true - - name: config - subPath: dovecot.cf - mountPath: /tmp/docker-mailserver/dovecot.cf - readOnly: true -``` + template: + spec: + containers: + - name: docker-mailserver + volumeMounts: + - name: config + subPath: postfix-main.cf + mountPath: /tmp/docker-mailserver/postfix-main.cf + readOnly: true + - name: config + subPath: postfix-master.cf + mountPath: /tmp/docker-mailserver/postfix-master.cf + readOnly: true + - name: config + subPath: dovecot.cf + mountPath: /tmp/docker-mailserver/dovecot.cf + readOnly: true + ``` **Downsides** @@ -419,52 +454,56 @@ spec: [Kube-Lego][kube-lego] may be used for a role of Let's Encrypt client. It works with Kubernetes [Ingress Resources][k8s-network-ingress] and automatically issues/manages certificates/keys for exposed services via Ingresses. -```yaml -kind: Ingress -apiVersion: extensions/v1beta1 -metadata: - name: mailserver - labels: - app: mailserver - annotations: - kubernetes.io/tls-acme: 'true' -spec: - rules: - - host: example.com - http: - paths: - - path: / - backend: - serviceName: default-backend - servicePort: 80 - tls: - - secretName: mailserver.tls - hosts: - - example.com -``` +!!! example + + ```yaml + kind: Ingress + apiVersion: extensions/v1beta1 + metadata: + name: mailserver + labels: + app: mailserver + annotations: + kubernetes.io/tls-acme: 'true' + spec: + rules: + - host: example.com + http: + paths: + - path: / + backend: + serviceName: default-backend + servicePort: 80 + tls: + - secretName: mailserver.tls + hosts: + - example.com + ``` Now, you can use Let's Encrypt cert and key from `mailserver.tls` [Secret][k8s-config-secret] in your [Pod][k8s-workload-pod] spec: -```yaml -# ... -env: - - name: SSL_TYPE - value: 'manual' - - name: SSL_CERT_PATH - value: '/etc/ssl/mailserver/tls.crt' - - name: SSL_KEY_PATH - value: '/etc/ssl/mailserver/tls.key' -# ... -volumeMounts: - - name: tls - mountPath: /etc/ssl/mailserver - readOnly: true -# ... -volumes: - - name: tls - secret: - secretName: mailserver.tls -``` +!!! example + + ```yaml + # ... + env: + - name: SSL_TYPE + value: 'manual' + - name: SSL_CERT_PATH + value: '/etc/ssl/mailserver/tls.crt' + - name: SSL_KEY_PATH + value: '/etc/ssl/mailserver/tls.key' + # ... + volumeMounts: + - name: tls + mountPath: /etc/ssl/mailserver + readOnly: true + # ... + volumes: + - name: tls + secret: + secretName: mailserver.tls + ``` [docs-dovecot]: ./override-defaults/dovecot.md [docs-postfix]: ./override-defaults/postfix.md diff --git a/docs/content/config/advanced/mail-fetchmail.md b/docs/content/config/advanced/mail-fetchmail.md index 7713db52..1621a1a5 100644 --- a/docs/content/config/advanced/mail-fetchmail.md +++ b/docs/content/config/advanced/mail-fetchmail.md @@ -26,25 +26,29 @@ Generate a file called `fetchmail.cf` and place it in the `config` folder. Your A detailed description of the configuration options can be found in the [online version of the manual page][fetchmail-docs]. -### Example IMAP Configuration +### IMAP Configuration -```fetchmailrc -poll 'imap.example.com' proto imap - user 'username' - pass 'secret' - is 'user1@domain.tld' - ssl -``` +!!! example -### Example POP3 Configuration + ```fetchmailrc + poll 'imap.example.com' proto imap + user 'username' + pass 'secret' + is 'user1@domain.tld' + ssl + ``` -```fetchmailrc -poll 'pop3.example.com' proto pop3 - user 'username' - pass 'secret' - is 'user2@domain.tld' - ssl -``` +### POP3 Configuration + +!!! example + + ```fetchmailrc + poll 'pop3.example.com' proto pop3 + user 'username' + pass 'secret' + is 'user2@domain.tld' + ssl + ``` !!! caution Don’t forget the last line: eg: `is 'user1@domain.tld'`. After `is` you have to specify one email address from the configuration file `config/postfix-accounts.cf`. diff --git a/docs/content/config/advanced/mail-forwarding/aws-ses.md b/docs/content/config/advanced/mail-forwarding/aws-ses.md index 6e27588a..1f1a64df 100644 --- a/docs/content/config/advanced/mail-forwarding/aws-ses.md +++ b/docs/content/config/advanced/mail-forwarding/aws-ses.md @@ -2,7 +2,7 @@ title: 'Mail Forwarding | AWS SES' --- -!!! note +!!! warning New configuration, see [Configure Relay Hosts][docs-relay] Instead of letting postfix deliver mail directly it is possible to configure it to deliver outgoing email via Amazon SES (Simple Email Service). (Receiving inbound email via SES is not implemented.) The configuration follows the guidelines provided by AWS in https://docs.aws.amazon.com/ses/latest/DeveloperGuide/postfix.html, specifically, the `STARTTLS` method. diff --git a/docs/content/config/advanced/mail-forwarding/relay-hosts.md b/docs/content/config/advanced/mail-forwarding/relay-hosts.md index ac11ffcd..5bb672e5 100644 --- a/docs/content/config/advanced/mail-forwarding/relay-hosts.md +++ b/docs/content/config/advanced/mail-forwarding/relay-hosts.md @@ -12,14 +12,14 @@ Depending on the domain of the sender, you may want to send via a different rela Basic configuration is done via environment variables: -* **RELAY_HOST** _default host to relay mail through, empty will disable this feature_ -* **RELAY_PORT** _port on default relay, defaults to port 25_ -* **RELAY_USER** _username for the default relay_ -* **RELAY_PASSWORD** _password for the default user_ +* `RELAY_HOST`: _default host to relay mail through, empty will disable this feature_ +* `RELAY_PORT`: _port on default relay, defaults to port 25_ +* `RELAY_USER`: _username for the default relay_ +* `RELAY_PASSWORD`: _password for the default user_ Setting these environment variables will cause mail for all sender domains to be routed via the specified host, authenticating with the user/password combination. -!!! note +!!! warning For users of the previous `AWS_SES_*` variables: please update your configuration to use these new variables, no other configuration is required. ## Advanced Configuration diff --git a/docs/content/config/advanced/mail-sieve.md b/docs/content/config/advanced/mail-sieve.md index db6e779b..cb3f6ea3 100644 --- a/docs/content/config/advanced/mail-sieve.md +++ b/docs/content/config/advanced/mail-sieve.md @@ -19,32 +19,38 @@ It's even possible to install a user provided Sieve filter at startup during use An example of a sieve filter that moves mails to a folder `INBOX/spam` depending on the sender address: -```sieve -require ["fileinto", "reject"]; +!!! example -if address :contains ["From"] "spam@spam.com" { - fileinto "INBOX.spam"; -} else { - keep; -} -``` + ```sieve + require ["fileinto", "reject"]; -!!! note + if address :contains ["From"] "spam@spam.com" { + fileinto "INBOX.spam"; + } else { + keep; + } + ``` + +!!! warning That folders have to exist beforehand if sieve should move them. Another example of a sieve filter that forward mails to a different address: -```sieve -require ["copy"]; +!!! example -redirect :copy "user2@otherdomain.tld"; -``` + ```sieve + require ["copy"]; + + redirect :copy "user2@otherdomain.tld"; + ``` Just forward all incoming emails and do not save them locally: -```sieve -redirect "user2@otherdomain.tld"; -``` +!!! example + + ```sieve + redirect "user2@otherdomain.tld"; + ``` You can also use external programs to filter or pipe (process) messages by adding executable scripts in `config/sieve-pipe` or `config/sieve-filter`. This can be used in lieu of a local alias file, for instance to forward an email to a webservice. These programs can then be referenced by filename, by all users. Note that the process running the scripts run as a privileged user. For further information see [Dovecot's wiki](https://wiki.dovecot.org/Pigeonhole/Sieve/Plugins/Pipe). @@ -59,13 +65,15 @@ For more examples or a detailed description of the Sieve language have a look at The [Manage Sieve](https://doc.dovecot.org/admin_manual/pigeonhole_managesieve_server/) extension allows users to modify their Sieve script by themselves. The authentication mechanisms are the same as for the main dovecot service. ManageSieve runs on port `4190` and needs to be enabled using the `ENABLE_MANAGESIEVE=1` environment variable. -```yaml -# docker-compose.yml -ports: - - "4190:4190" -environment: - - ENABLE_MANAGESIEVE=1 -``` +!!! example + + ```yaml + # docker-compose.yml + ports: + - "4190:4190" + environment: + - ENABLE_MANAGESIEVE=1 + ``` All user defined sieve scripts that are managed by ManageSieve are stored in the user's home folder in `/var/mail/domain.com/user1/sieve`. Just one sieve script might be active for a user and is sym-linked to `/var/mail/domain.com/user1/.dovecot.sieve` automatically. @@ -73,4 +81,5 @@ All user defined sieve scripts that are managed by ManageSieve are stored in the ManageSieve makes sure to not overwrite an existing `.dovecot.sieve` file. If a user activates a new sieve script the old one is backuped and moved to the `sieve` folder. The extension is known to work with the following ManageSieve clients: -* **Sieve Editor** a portable standalone application based on the former Thunderbird plugin (https://github.com/thsmi/sieve). + +- **Sieve Editor** a portable standalone application based on the former Thunderbird plugin (https://github.com/thsmi/sieve). diff --git a/docs/content/config/advanced/override-defaults/dovecot.md b/docs/content/config/advanced/override-defaults/dovecot.md index e4ef7490..e0650916 100644 --- a/docs/content/config/advanced/override-defaults/dovecot.md +++ b/docs/content/config/advanced/override-defaults/dovecot.md @@ -48,7 +48,7 @@ To debug your dovecot configuration you can use: - Or: `docker exec -it doveconf | grep ` !!! note - [`setup.sh`][github-file-setupsh] is included in the `docker-mailserver` repository. + [`setup.sh`][github-file-setupsh] is included in the `docker-mailserver` repository. Make sure to grap the one matching your image version. The `config/dovecot.cf` is copied internally to `/etc/dovecot/local.conf`. To check this file run: diff --git a/docs/content/config/advanced/override-defaults/postfix.md b/docs/content/config/advanced/override-defaults/postfix.md index e380b231..3ce0a895 100644 --- a/docs/content/config/advanced/override-defaults/postfix.md +++ b/docs/content/config/advanced/override-defaults/postfix.md @@ -14,7 +14,9 @@ message_size_limit = 52428800 That specific example is now supported and can be handled by setting `POSTFIX_MESSAGE_SIZE_LIMIT`. -[Postfix documentation](http://www.postfix.org/documentation.html) remains the best place to find configuration options. +!!! seealso + + [Postfix documentation](http://www.postfix.org/documentation.html) remains the best place to find configuration options. Each line in the provided file will be loaded into postfix. diff --git a/docs/content/config/best-practices/dkim.md b/docs/content/config/best-practices/dkim.md index e012470d..569de5b3 100644 --- a/docs/content/config/best-practices/dkim.md +++ b/docs/content/config/best-practices/dkim.md @@ -2,7 +2,10 @@ title: 'Best Practices | DKIM' --- -DKIM is a security measure targeting email spoofing. It is greatly recommended one activates it. See [the Wikipedia page](https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail) for more details on DKIM. +DKIM is a security measure targeting email spoofing. It is greatly recommended one activates it. + +!!! seealso + See [the Wikipedia page](https://en.wikipedia.org/wiki/DomainKeys_Identified_Mail) for more details on DKIM. ## Enabling DKIM Signature diff --git a/docs/content/config/best-practices/dmarc.md b/docs/content/config/best-practices/dmarc.md index e8309c66..ccc36a5a 100644 --- a/docs/content/config/best-practices/dmarc.md +++ b/docs/content/config/best-practices/dmarc.md @@ -4,7 +4,8 @@ hide: - toc # Hide Table of Contents for this page --- -DMARC Guide: https://github.com/internetstandards/toolbox-wiki/blob/master/DMARC-how-to.md +!!! seealso + DMARC Guide: https://github.com/internetstandards/toolbox-wiki/blob/master/DMARC-how-to.md ## Enabling DMARC diff --git a/docs/content/config/best-practices/spf.md b/docs/content/config/best-practices/spf.md index 15bfc55b..dacfc4ce 100644 --- a/docs/content/config/best-practices/spf.md +++ b/docs/content/config/best-practices/spf.md @@ -6,9 +6,11 @@ hide: From [Wikipedia](https://en.wikipedia.org/wiki/Sender_Policy_Framework): -> Sender Policy Framework (SPF) is a simple email-validation system designed to detect email spoofing by providing a mechanism to allow receiving mail exchangers to check that incoming mail from a domain comes from a host authorized by that domain's administrators. The list of authorized sending hosts for a domain is published in the Domain Name System (DNS) records for that domain in the form of a specially formatted TXT record. Email spam and phishing often use forged "from" addresses, so publishing and checking SPF records can be considered anti-spam techniques. +!!! quote + Sender Policy Framework (SPF) is a simple email-validation system designed to detect email spoofing by providing a mechanism to allow receiving mail exchangers to check that incoming mail from a domain comes from a host authorized by that domain's administrators. The list of authorized sending hosts for a domain is published in the Domain Name System (DNS) records for that domain in the form of a specially formatted TXT record. Email spam and phishing often use forged "from" addresses, so publishing and checking SPF records can be considered anti-spam techniques. -For a more technical review: https://github.com/internetstandards/toolbox-wiki/blob/master/SPF-how-to.md +!!! seealso + For a more technical review: https://github.com/internetstandards/toolbox-wiki/blob/master/SPF-how-to.md ## Add a SPF Record diff --git a/docs/content/config/pop3.md b/docs/content/config/pop3.md index caa44891..4350f455 100644 --- a/docs/content/config/pop3.md +++ b/docs/content/config/pop3.md @@ -4,10 +4,11 @@ hide: - toc # Hide Table of Contents for this page --- -**We do not recommend using POP. Use IMAP instead.** +!!! warning -If you really want to have POP3 running, add 3 lines to the docker-compose.yml : -Add the ports 110 and 995, and add environment variable ENABLE_POP : + **We do not recommend using POP3. Use IMAP instead.** + +If you really want to have POP3 running add the ports 110 and 995 and the environment variable `ENABLE_POP3` to your `docker-compose.yml`: ```yaml mail: diff --git a/docs/content/config/security/ssl.md b/docs/content/config/security/ssl.md index c151e2e4..b136416e 100644 --- a/docs/content/config/security/ssl.md +++ b/docs/content/config/security/ssl.md @@ -134,98 +134,102 @@ Then: `/path/to/mailserver/docker-compose up -d mail` The following `docker-compose.yml` is the basic setup you need for using `letsencrypt-nginx-proxy-companion`. It is mainly derived from its own wiki/documenation. -```yaml -version: "2" +???+ example "Example Code" + + ```yaml + version: "2" + + services: + nginx: + image: nginx + container_name: nginx + ports: + - 80:80 + - 443:443 + volumes: + - /mnt/data/nginx/htpasswd:/etc/nginx/htpasswd + - /mnt/data/nginx/conf.d:/etc/nginx/conf.d + - /mnt/data/nginx/vhost.d:/etc/nginx/vhost.d + - /mnt/data/nginx/html:/usr/share/nginx/html + - /mnt/data/nginx/certs:/etc/nginx/certs:ro + networks: + - proxy-tier + restart: always + + nginx-gen: + image: jwilder/docker-gen + container_name: nginx-gen + volumes: + - /var/run/docker.sock:/tmp/docker.sock:ro + - /mnt/data/nginx/templates/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro + volumes_from: + - nginx + entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf + restart: always + + letsencrypt-nginx-proxy-companion: + image: jrcs/letsencrypt-nginx-proxy-companion + container_name: letsencrypt-companion + volumes_from: + - nginx + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + - /mnt/data/nginx/certs:/etc/nginx/certs:rw + environment: + - NGINX_DOCKER_GEN_CONTAINER=nginx-gen + - DEBUG=false + restart: always -services: - nginx: - image: nginx - container_name: nginx - ports: - - 80:80 - - 443:443 - volumes: - - /mnt/data/nginx/htpasswd:/etc/nginx/htpasswd - - /mnt/data/nginx/conf.d:/etc/nginx/conf.d - - /mnt/data/nginx/vhost.d:/etc/nginx/vhost.d - - /mnt/data/nginx/html:/usr/share/nginx/html - - /mnt/data/nginx/certs:/etc/nginx/certs:ro networks: - - proxy-tier - restart: always - - nginx-gen: - image: jwilder/docker-gen - container_name: nginx-gen - volumes: - - /var/run/docker.sock:/tmp/docker.sock:ro - - /mnt/data/nginx/templates/nginx.tmpl:/etc/docker-gen/templates/nginx.tmpl:ro - volumes_from: - - nginx - entrypoint: /usr/local/bin/docker-gen -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf - restart: always - - letsencrypt-nginx-proxy-companion: - image: jrcs/letsencrypt-nginx-proxy-companion - container_name: letsencrypt-companion - volumes_from: - - nginx - volumes: - - /var/run/docker.sock:/var/run/docker.sock:ro - - /mnt/data/nginx/certs:/etc/nginx/certs:rw - environment: - - NGINX_DOCKER_GEN_CONTAINER=nginx-gen - - DEBUG=false - restart: always - -networks: - proxy-tier: - external: - name: nginx-proxy -``` + proxy-tier: + external: + name: nginx-proxy + ``` The second part of the setup is the actual mail container. So, in another folder, create another `docker-compose.yml` with the following content (Removed all ENV variables for this example): -```yaml -version: '2' -services: - mail: - image: mailserver/docker-mailserver:latest - hostname: ${HOSTNAME} - domainname: ${DOMAINNAME} - container_name: ${CONTAINER_NAME} - ports: - - "25:25" - - "143:143" - - "465:465" - - "587:587" - - "993:993" - volumes: - - ./mail:/var/mail - - ./mail-state:/var/mail-state - - ./config/:/tmp/docker-mailserver/ - - /mnt/data/nginx/certs/:/etc/letsencrypt/live/:ro - cap_add: - - NET_ADMIN - - SYS_PTRACE - restart: always +???+ example "Example Code" + + ```yaml + version: '2' + services: + mail: + image: mailserver/docker-mailserver:latest + hostname: ${HOSTNAME} + domainname: ${DOMAINNAME} + container_name: ${CONTAINER_NAME} + ports: + - "25:25" + - "143:143" + - "465:465" + - "587:587" + - "993:993" + volumes: + - ./mail:/var/mail + - ./mail-state:/var/mail-state + - ./config/:/tmp/docker-mailserver/ + - /mnt/data/nginx/certs/:/etc/letsencrypt/live/:ro + cap_add: + - NET_ADMIN + - SYS_PTRACE + restart: always + + cert-companion: + image: nginx + environment: + - "VIRTUAL_HOST=" + - "VIRTUAL_NETWORK=nginx-proxy" + - "LETSENCRYPT_HOST=" + - "LETSENCRYPT_EMAIL=" + networks: + - proxy-tier + restart: always - cert-companion: - image: nginx - environment: - - "VIRTUAL_HOST=" - - "VIRTUAL_NETWORK=nginx-proxy" - - "LETSENCRYPT_HOST=" - - "LETSENCRYPT_EMAIL=" networks: - - proxy-tier - restart: always - -networks: - proxy-tier: - external: - name: nginx-proxy -``` + proxy-tier: + external: + name: nginx-proxy + ``` The mail container needs to have the letsencrypt certificate folder mounted as a volume. No further changes are needed. The second container is a dummy-sidecar we need, because the mail-container do not expose any web-ports. Set your ENV variables as you need. (`VIRTUAL_HOST` and `LETSENCRYPT_HOST` are mandandory, see documentation) @@ -275,70 +279,72 @@ For Caddy v2 you can specify the `key_type` in your server's global settings, wh If you are instead using a json config for Caddy v2, you can set it in your site's TLS automation policies: -```json -{ - "apps": { - "http": { - "servers": { - "srv0": { - "listen": [ - ":443" - ], - "routes": [ - { - "match": [ - { - "host": [ - "mail.domain.com", - ] - } +???+ example "Example Code" + + ```json + { + "apps": { + "http": { + "servers": { + "srv0": { + "listen": [ + ":443" ], - "handle": [ + "routes": [ { - "handler": "subroute", - "routes": [ + "match": [ { - "handle": [ + "host": [ + "mail.domain.com", + ] + } + ], + "handle": [ + { + "handler": "subroute", + "routes": [ { - "body": "", - "handler": "static_response" + "handle": [ + { + "body": "", + "handler": "static_response" + } + ] } ] } - ] - } - ], - "terminal": true - }, - ] - } - } - }, - "tls": { - "automation": { - "policies": [ - { - "subjects": [ - "mail.domain.com", - ], - "key_type": "rsa2048", - "issuer": { - "email": "email@email.com", - "module": "acme" - } - }, - { - "issuer": { - "email": "email@email.com", - "module": "acme" + ], + "terminal": true + }, + ] } } - ] + }, + "tls": { + "automation": { + "policies": [ + { + "subjects": [ + "mail.domain.com", + ], + "key_type": "rsa2048", + "issuer": { + "email": "email@email.com", + "module": "acme" + } + }, + { + "issuer": { + "email": "email@email.com", + "module": "acme" + } + } + ] + } + } } } - } -} -``` + ``` The generated certificates can be mounted: @@ -375,44 +381,46 @@ Traefik's V2 storage format is natively supported if the `acme.json` store is mo This allows for support of wild card certificates: `SSL_DOMAIN=*.example.com`. Here is an example setup for [`docker-compose`](https://docs.docker.com/compose/): -```yaml -version: '3.8' -services: - mail: - image: mailserver/docker-mailserver:stable - hostname: mail - domainname: example.com - volumes: - - /etc/ssl/acme-v2.json:/etc/letsencrypt/acme.json:ro - environment: - SSL_TYPE: letsencrypt - # SSL_DOMAIN: "*.example.com" - traefik: - image: traefik:v2.2 - restart: always - ports: - - "80:80" - - "443:443" - command: - - --providers.docker - - --entrypoints.web.address=:80 - - --entrypoints.web.http.redirections.entryPoint.to=websecure - - --entrypoints.web.http.redirections.entryPoint.scheme=https - - --entrypoints.websecure.address=:443 - - --entrypoints.websecure.http.middlewares=hsts@docker - - --entrypoints.websecure.http.tls.certResolver=le - - --certificatesresolvers.le.acme.email=admin@example.net - - --certificatesresolvers.le.acme.storage=/acme.json - - --certificatesresolvers.le.acme.httpchallenge.entrypoint=web - volumes: - - /var/run/docker.sock:/var/run/docker.sock:ro - - /etc/ssl/acme-v2.json:/acme.json +???+ example "Example Code" - whoami: - image: containous/whoami - labels: - - "traefik.http.routers.whoami.rule=Host(`mail.example.com`)" -``` + ```yaml + version: '3.8' + services: + mail: + image: mailserver/docker-mailserver:stable + hostname: mail + domainname: example.com + volumes: + - /etc/ssl/acme-v2.json:/etc/letsencrypt/acme.json:ro + environment: + SSL_TYPE: letsencrypt + # SSL_DOMAIN: "*.example.com" + traefik: + image: traefik:v2.2 + restart: always + ports: + - "80:80" + - "443:443" + command: + - --providers.docker + - --entrypoints.web.address=:80 + - --entrypoints.web.http.redirections.entryPoint.to=websecure + - --entrypoints.web.http.redirections.entryPoint.scheme=https + - --entrypoints.websecure.address=:443 + - --entrypoints.websecure.http.middlewares=hsts@docker + - --entrypoints.websecure.http.tls.certResolver=le + - --certificatesresolvers.le.acme.email=admin@example.net + - --certificatesresolvers.le.acme.storage=/acme.json + - --certificatesresolvers.le.acme.httpchallenge.entrypoint=web + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + - /etc/ssl/acme-v2.json:/acme.json + + whoami: + image: containous/whoami + labels: + - "traefik.http.routers.whoami.rule=Host(`mail.example.com`)" + ``` This setup only comes with one caveat: The domain has to be configured on another service for traefik to actually request it from lets-encrypt (`whoami` in this case). @@ -422,9 +430,13 @@ If you are using Traefik v1, you might want to _push_ your Traefik-managed certi Depending of your Traefik configuration, certificates may be stored using a file or a KV Store (consul, etcd...) Either way, certificates will be renewed by Traefik, then automatically pushed to the mailserver thanks to the `cert-renewer` service. Finally, dovecot and postfix will be restarted. -## Self-Signed Certificates (Testing Only) +## Self-Signed Certificates -You can easily generate a self-signed SSL certificate by using the following command: +!!! warning + + Use self-signed certificates only for testing purposes! + +You can generate a self-signed SSL certificate by using the following command: ```sh docker run -it --rm -v "$(pwd)"/config/ssl:/tmp/docker-mailserver/ssl -h mail.my-domain.com -t mailserver/docker-mailserver generate-ssl-certificate @@ -472,7 +484,7 @@ environment: This will mount the path where your ssl certificates reside as read-only under `/tmp/ssl`. Then all you have to do is to specify the location of your private key and the certificate. -!!! note +!!! info You may have to restart your mailserver once the certificates change. ## Testing a Certificate is Valid @@ -509,9 +521,11 @@ docker exec mail openssl s_client \ ## Plain-Text Access -Not recommended for purposes other than testing. +!!! warning -Just add this to `config/dovecot.cf`: + Not recommended for purposes other than testing. + +Add this to `config/dovecot.cf`: ```cf ssl = yes diff --git a/docs/content/config/setup.sh.md b/docs/content/config/setup.sh.md index 8b43a02c..70bff7a5 100644 --- a/docs/content/config/setup.sh.md +++ b/docs/content/config/setup.sh.md @@ -13,6 +13,10 @@ wget https://raw.githubusercontent.com/docker-mailserver/docker-mailserver/maste chmod a+x ./setup.sh ``` +!!! info + + Make sure to get the `setup.sh` that comes with the release you're using. Look up the release and the git commit on which this release is based upon by selecting the appropriate tag on GitHub. This can done with the "Switch branches/tags" button on GitHub, choosing the right tag. This is done in order to rule out possible inconsistencies between versions. + ## Usage Run `./setup.sh -h` and you'll get some usage information: diff --git a/docs/content/examples/tutorials/basic-installation.md b/docs/content/examples/tutorials/basic-installation.md index 50f934ff..6a008096 100644 --- a/docs/content/examples/tutorials/basic-installation.md +++ b/docs/content/examples/tutorials/basic-installation.md @@ -22,39 +22,41 @@ We are going to use this docker based mailserver: - Create the file `docker-compose.yml` with a content like this: - ```yaml - version: '2' + !!! example - services: - mail: - image: mailserver/docker-mailserver:latest - hostname: mail - domainname: example.org - container_name: mail - ports: - - "25:25" - - "587:587" - - "465:465" - volumes: - - ./data/:/var/mail/ - - ./state/:/var/mail-state/ - - ./config/:/tmp/docker-mailserver/ - - /var/ds/wsproxy/letsencrypt/:/etc/letsencrypt/ - environment: - - PERMIT_DOCKER=network - - SSL_TYPE=letsencrypt - - ONE_DIR=1 - - DMS_DEBUG=1 - - SPOOF_PROTECTION=0 - - REPORT_RECIPIENT=1 - - ENABLE_SPAMASSASSIN=0 - - ENABLE_CLAMAV=0 - - ENABLE_FAIL2BAN=1 - - ENABLE_POSTGREY=0 - cap_add: - - NET_ADMIN - - SYS_PTRACE - ``` + ```yaml + version: '2' + + services: + mail: + image: mailserver/docker-mailserver:latest + hostname: mail + domainname: example.org + container_name: mail + ports: + - "25:25" + - "587:587" + - "465:465" + volumes: + - ./data/:/var/mail/ + - ./state/:/var/mail-state/ + - ./config/:/tmp/docker-mailserver/ + - /var/ds/wsproxy/letsencrypt/:/etc/letsencrypt/ + environment: + - PERMIT_DOCKER=network + - SSL_TYPE=letsencrypt + - ONE_DIR=1 + - DMS_DEBUG=1 + - SPOOF_PROTECTION=0 + - REPORT_RECIPIENT=1 + - ENABLE_SPAMASSASSIN=0 + - ENABLE_CLAMAV=0 + - ENABLE_FAIL2BAN=1 + - ENABLE_POSTGREY=0 + cap_add: + - NET_ADMIN + - SYS_PTRACE + ``` For more details about the environment variables that can be used, and their meaning and possible values, check also these: diff --git a/docs/content/examples/uses-cases/forward-only-mailserver-with-ldap-authentication.md b/docs/content/examples/uses-cases/forward-only-mailserver-with-ldap-authentication.md index fbc23736..b3033299 100644 --- a/docs/content/examples/uses-cases/forward-only-mailserver-with-ldap-authentication.md +++ b/docs/content/examples/uses-cases/forward-only-mailserver-with-ldap-authentication.md @@ -97,9 +97,13 @@ postfix reload You see that besides `query_filter`, I had to customize as well `result_attribute` and `result_format`. -For more details about using LDAP see: [LDAP managed mail server with Postfix and Dovecot for multiple domains](https://www.vennedey.net/resources/2-LDAP-managed-mail-server-with-Postfix-and-Dovecot-for-multiple-domains) +!!! sealso -Another solution that serves as a forward-only mailserver is this: https://gitlab.com/docker-scripts/postfix + For more details about using LDAP see: [LDAP managed mail server with Postfix and Dovecot for multiple domains](https://www.vennedey.net/resources/2-LDAP-managed-mail-server-with-Postfix-and-Dovecot-for-multiple-domains) + +!!! seealso + + Another solution that serves as a forward-only mailserver is this: https://gitlab.com/docker-scripts/postfix [github-file-readme-patches]: https://github.com/docker-mailserver/docker-mailserver/blob/master/README.md#custom-user-changes--patches [github-issue-1247]: https://github.com/docker-mailserver/docker-mailserver/issues/1247 diff --git a/docs/content/faq.md b/docs/content/faq.md index d55e56f8..256a6a55 100644 --- a/docs/content/faq.md +++ b/docs/content/faq.md @@ -9,11 +9,11 @@ This image is based on config files that can be persisted using Docker volumes, ### Where are emails stored? -Mails are stored in `/var/mail/${domain}/${username}`. +Mails are stored in `/var/mail/${domain}/${username}`. Since `v9.0.0` it is possible to add custom `user_attributes` for each accounts to have a different mailbox configuration (See [#1792][github-issue-1792]). -You should use a [data volume container](https://medium.com/@ramangupta/why-docker-data-containers-are-good-589b3c6c749e#.uxyrp7xpu) for `/var/mail` to persist data. +!!! warning -Otherwise, your data may be lost. + You should use a [data volume container](https://medium.com/@ramangupta/why-docker-data-containers-are-good-589b3c6c749e#.uxyrp7xpu) for `/var/mail` to persist data. Otherwise, your data may be lost. ### How to alter the running mailserver instance _without_ relaunching the container? @@ -147,68 +147,70 @@ If you run the server with `docker-compose`, you can leverage on docker configs The following configuration works nicely: -Create a _system_ cron file: +??? example -```sh -# in the docker-compose.yml root directory -mkdir cron -touch cron/sa-learn -chown root:root cron/sa-learn -chmod 0644 cron/sa-learn -``` + Create a _system_ cron file: -Edit the system cron file `nano cron/sa-learn`, and set an appropriate configuration: + ```sh + # in the docker-compose.yml root directory + mkdir cron + touch cron/sa-learn + chown root:root cron/sa-learn + chmod 0644 cron/sa-learn + ``` -```conf -# This assumes you're having `environment: ONE_DIR=1` in the env-mailserver, -# with a consolidated config in `/var/mail-state` -# -# m h dom mon dow user command -# -# Everyday 2:00AM, learn spam from a specific user -# spam: junk directory -0 2 * * * root sa-learn --spam /var/mail/domain.com/username/.Junk --dbpath /var/mail-state/lib-amavis/.spamassassin -# ham: archive directories -15 2 * * * root sa-learn --ham /var/mail/domain.com/username/.Archive* --dbpath /var/mail-state/lib-amavis/.spamassassin -# ham: inbox subdirectories -30 2 * * * root sa-learn --ham /var/mail/domain.com/username/cur* --dbpath /var/mail-state/lib-amavis/.spamassassin -# -# Everyday 3:00AM, learn spam from all users of a domain -# spam: junk directory -0 3 * * * root sa-learn --spam /var/mail/otherdomain.com/*/.Junk --dbpath /var/mail-state/lib-amavis/.spamassassin -# ham: archive directories -15 3 * * * root sa-learn --ham /var/mail/otherdomain.com/*/.Archive* --dbpath /var/mail-state/lib-amavis/.spamassassin -# ham: inbox subdirectories -30 3 * * * root sa-learn --ham /var/mail/otherdomain.com/*/cur* --dbpath /var/mail-state/lib-amavis/.spamassassin -``` + Edit the system cron file `nano cron/sa-learn`, and set an appropriate configuration: -Then with plain `docker-compose`: + ```conf + # This assumes you're having `environment: ONE_DIR=1` in the env-mailserver, + # with a consolidated config in `/var/mail-state` + # + # m h dom mon dow user command + # + # Everyday 2:00AM, learn spam from a specific user + # spam: junk directory + 0 2 * * * root sa-learn --spam /var/mail/domain.com/username/.Junk --dbpath /var/mail-state/lib-amavis/.spamassassin + # ham: archive directories + 15 2 * * * root sa-learn --ham /var/mail/domain.com/username/.Archive* --dbpath /var/mail-state/lib-amavis/.spamassassin + # ham: inbox subdirectories + 30 2 * * * root sa-learn --ham /var/mail/domain.com/username/cur* --dbpath /var/mail-state/lib-amavis/.spamassassin + # + # Everyday 3:00AM, learn spam from all users of a domain + # spam: junk directory + 0 3 * * * root sa-learn --spam /var/mail/otherdomain.com/*/.Junk --dbpath /var/mail-state/lib-amavis/.spamassassin + # ham: archive directories + 15 3 * * * root sa-learn --ham /var/mail/otherdomain.com/*/.Archive* --dbpath /var/mail-state/lib-amavis/.spamassassin + # ham: inbox subdirectories + 30 3 * * * root sa-learn --ham /var/mail/otherdomain.com/*/cur* --dbpath /var/mail-state/lib-amavis/.spamassassin + ``` -```yaml -services: - mail: - image: mailserver/docker-mailserver:latest - volumes: - - ./cron/sa-learn:/etc/cron.d/sa-learn -``` + Then with plain `docker-compose`: -Or with [docker swarm](https://docs.docker.com/engine/swarm/configs/): + ```yaml + services: + mail: + image: mailserver/docker-mailserver:latest + volumes: + - ./cron/sa-learn:/etc/cron.d/sa-learn + ``` -```yaml -version: "3.3" + Or with [docker swarm](https://docs.docker.com/engine/swarm/configs/): + + ```yaml + version: "3.3" + + services: + mail: + image: mailserver/docker-mailserver:latest + # ... + configs: + - source: my_sa_crontab + target: /etc/cron.d/sa-learn -services: - mail: - image: mailserver/docker-mailserver:latest - # ... configs: - - source: my_sa_crontab - target: /etc/cron.d/sa-learn - -configs: - my_sa_crontab: - file: ./cron/sa-learn -``` + my_sa_crontab: + file: ./cron/sa-learn + ``` With the default settings, Spamassassin will require 200 mails trained for spam (for example with the method explained above) and 200 mails trained for ham (using the same command as above but using `--ham` and providing it with some ham mails). Until you provided these 200+200 mails, Spamassasin will not take the learned mails into account. For further reference, see the [Spamassassin Wiki](https://wiki.apache.org/spamassassin/BayesNotWorking). @@ -302,7 +304,7 @@ If we're blind, we won't be able to do anything. 1 core and 1GB of RAM + swap partition is recommended to run `docker-mailserver` with clamav. Otherwise, it could work with 512M of RAM. -!!! note +!!! warning Clamav can consume a lot of memory, as it reads the entire signature database into RAM. Current figure is about 850M and growing. If you get errors about clamav or amavis failing to allocate memory you need more RAM or more swap and of course docker must be allowed to use swap (not always the case). If you can't use swap at all you may need 3G RAM. @@ -407,4 +409,5 @@ supervisorctl update [github-issue-1247]: https://github.com/docker-mailserver/docker-mailserver/issues/1247 [github-issue-1405-comment]: https://github.com/docker-mailserver/docker-mailserver/issues/1405#issuecomment-590106498 [github-issue-1639]: https://github.com/docker-mailserver/docker-mailserver/issues/1639 +[github-issue-1792]: https://github.com/docker-mailserver/docker-mailserver/pull/1792 [hanscees-userpatches]: https://github.com/hanscees/dockerscripts/blob/master/scripts/tomav-user-patches.sh diff --git a/docs/content/introduction.md b/docs/content/introduction.md index 66d58f14..14ea6fb8 100644 --- a/docs/content/introduction.md +++ b/docs/content/introduction.md @@ -51,15 +51,16 @@ Fetching an email: MUA <------------------------------ ┫ MDA ╯ ┃ ┗━━━━━━━┛ ``` -> Let's say Alice owns a Gmail account, `alice@gmail.com`; and Bob owns an account on a `docker-mailserver`'s instance, `bob@dms.io`. -> -> Make sure not to conflate these two very different scenarios: -> A) Alice sends an email to `bob@dms.io` => the email is first submitted to MTA `smtp.gmail.com`, then relayed to MTA `smtp.dms.io` where it is then delivered into Bob's mailbox. -> B) Bob sends an email to `alice@gmail.com` => the email is first submitted to MTA `smtp.dms.io`, then relayed to MTA `smtp.gmail.com` and eventually delivered into Alice's mailbox. -> -> In scenario *A* the email leaves Gmail's premises, that email's *initial* submission is _not_ handled by your `docker-mailserver` instance(MTA); it merely receives the email after it has been relayed by Gmail's MTA. In scenario *B*, the `docker-mailserver` instance(MTA) handles the submission, prior to relaying. -> -> The main takeaway is that when a third-party sends an email to a `docker-mailserver` instance(MTA) (or any MTA for that matter), it does _not_ establish a direct connection with that MTA. Email submission first goes through the sender's MTA, then some relaying between at least two MTAs is required to deliver the email. That will prove very important when it comes to security management. +!!! example + Let's say Alice owns a Gmail account, `alice@gmail.com`; and Bob owns an account on a `docker-mailserver`'s instance, `bob@dms.io`. + + Make sure not to conflate these two very different scenarios: + A) Alice sends an email to `bob@dms.io` => the email is first submitted to MTA `smtp.gmail.com`, then relayed to MTA `smtp.dms.io` where it is then delivered into Bob's mailbox. + B) Bob sends an email to `alice@gmail.com` => the email is first submitted to MTA `smtp.dms.io`, then relayed to MTA `smtp.gmail.com` and eventually delivered into Alice's mailbox. + + In scenario *A* the email leaves Gmail's premises, that email's *initial* submission is _not_ handled by your `docker-mailserver` instance(MTA); it merely receives the email after it has been relayed by Gmail's MTA. In scenario *B*, the `docker-mailserver` instance(MTA) handles the submission, prior to relaying. + + The main takeaway is that when a third-party sends an email to a `docker-mailserver` instance(MTA) (or any MTA for that matter), it does _not_ establish a direct connection with that MTA. Email submission first goes through the sender's MTA, then some relaying between at least two MTAs is required to deliver the email. That will prove very important when it comes to security management. One important thing to note is that MTA and MDA programs may actually handle _multiple_ tasks (which is the case with `docker-mailserver`'s Postfix and Dovecot). @@ -145,7 +146,7 @@ The best practice as of 2020 when it comes to securing Outward Submission is to - [ESMTP][wikipedia-esmtp] is [SMTP][wikipedia-smtp] + extensions. It's the version of the SMTP protocol that most mail servers speak nowadays. For the purpose of this documentation, ESMTP and SMTP are synonymous. - Port 465 is the reserved TCP port for Implicit TLS Submission (since 2018). There is actually a boisterous history to that ports usage, but let's keep it simple. -!!! note +!!! warning This Submission setup is sometimes refered to as [SMTPS][wikipedia-smtps]. Long story short: this is incorrect and should be avoided. Although a very satisfactory setup, Implicit TLS on port 465 is somewhat "cutting edge". There exists another well established mail Submission setup that must be supported as well, SMTP+STARTTLS on port 587. It uses Explicit TLS: the client starts with a cleartext connection, then the server informs a TLS-encrypted "upgraded" connection may be established, and the client _may_ eventually decide to establish it prior to the Submission. Basically it's an opportunistic, opt-in TLS upgrade of the connection between the client and the server, at the client's discretion, using a mechanism known as [STARTTLS][wikipedia-starttls] that both ends need to implement. From bbaca9a468f0a614011be2038b3ed754d6f30c9d Mon Sep 17 00:00:00 2001 From: polarathene <5098581+polarathene@users.noreply.github.com> Date: Wed, 10 Mar 2021 17:30:57 +1300 Subject: [PATCH 13/14] docs(config): Tidy up and better document `mkdocs.yml` --- docs/mkdocs.yml | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index 49f10003..efea8172 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -1,12 +1,28 @@ +# Site specific: site_name: 'Docker Mailserver' site_description: 'A fullstack but simple mail server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.) using Docker.' site_author: 'docker-mailserver (Github Organization)' +copyright: '

© Docker Mailserver Organization
This project is licensed under the MIT license.

' + +# Project source specific: repo_name: 'docker-mailserver' repo_url: 'https://github.com/docker-mailserver/docker-mailserver' -copyright: '

© Docker Mailserver Organization
This project is licensed under the MIT license.

' + +# All docs `edit` button will go to this subpath of the `repo_url`: +# For versioned docs, this may be a little misleading for a user not viewing the `edge` docs which match the `master` branch. edit_uri: 'edit/master/docs/content' + +# The main docs content lives here, any files will be copied over to the deployed version, +# unless the file or directory name is prefixed with a `.` docs_dir: 'content/' -site_url: 'https://docker-mailserver.github.io/docker-mailserver' + +# Canonical URL (HTML content instructs search engines that this is where the preferred version of the docs is located, useful when we have duplicate content like versioned docs) +# https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Choosing_between_www_and_non-www_URLs#using_%3Clink_relcanonical%3E +# Also required for `sitemap.xml` generation at build time; which bots use to assist them crawling and indexing a website, +# the `mkdocs-material` 'Instant Navigation' feature utilizes the sitemap data to work. +site_url: 'https://docker-mailserver.github.io/docker-mailserver/edge' + +# Anything related to the `mkdocs-material` theme config goes here: theme: name: 'material' favicon: assets/logo/favicon-32x32.png @@ -18,6 +34,7 @@ theme: - navigation.expand - navigation.instant +# We make some minor style adjustments or resolve issues that upstream `mkdocs-material` would not accept a PR for: extra_css: - assets/css/customizations.css @@ -28,6 +45,7 @@ extra: version: provider: mike +# Various extensions for `mkdocs` are enabled and configured here to extend supported markdown syntax/features. markdown_extensions: - toc: anchorlink: true @@ -35,6 +53,11 @@ markdown_extensions: - attr_list - admonition - pymdownx.details + - pymdownx.superfences + - pymdownx.magiclink + - pymdownx.emoji: + emoji_index: !!python/name:materialx.emoji.twemoji + emoji_generator: !!python/name:materialx.emoji.to_svg - pymdownx.highlight: extend_pygments_lang: - name: yml @@ -53,12 +76,12 @@ markdown_extensions: lang: txt - name: caddyfile lang: txt - - pymdownx.superfences - - pymdownx.magiclink - - pymdownx.emoji: - emoji_index: !!python/name:materialx.emoji.twemoji - emoji_generator: !!python/name:materialx.emoji.to_svg +# Hard-coded navigation list. Key(UI label): Value(relative filepath from `docs_dir`). +# - If referencing a file more than once, the URLs will all point to the nav hierarchy of the last file reference entry. That usually breaks UX, try avoid it. +# - The top-level elements are presented as tabs (due to `theme.features.navigation.tabs`). +# - Nested elements appear in the sidebar (left) of each tabs page. +# - 3rd level and beyond are automatically expanded in the sidebar instead of collapsed (due to `theme.features.navigation.expand`) nav: - 'Home': index.md - 'Introduction': introduction.md From 1b971a89cb6d945897b71e593ffc398c4e70fff5 Mon Sep 17 00:00:00 2001 From: polarathene <5098581+polarathene@users.noreply.github.com> Date: Wed, 24 Mar 2021 12:44:28 +1300 Subject: [PATCH 14/14] docs(sync): Add Github Wiki contributions During the long-lived PR, multiple contributions to the existing Github Wiki were made, this commit applies those here and mentions the files and authors attributed to the changes: JaapD: dkim.md + forward-only-mailserver-with-ldap-authentication.md Added corrections to `setup.sh config dkim` command. Added compatibility warning about 4096-bit key sizes or greater. Added ldap tip. --- fred727-temp: optional-config.md Added a mention for `user-patches.sh`. --- Semir Patel: setup.sh.md + debugging.md Minor corrections. Additionally corrected `tvial` references that had already been updated in this PR series. --- Stefan Neben: kubernetes.md > Port 25 proxy protocol configuration in master.cf was missing docs(sync): Add Github Wiki contributions > IMAP with STARTTLS is also active, so we need that option here as well docs(sync): Add Github Wiki contribution --- docs/content/config/advanced/kubernetes.md | 4 ++++ docs/content/config/advanced/optional-config.md | 2 ++ docs/content/config/best-practices/dkim.md | 16 ++++++++++++---- docs/content/config/setup.sh.md | 4 ++-- docs/content/config/troubleshooting/debugging.md | 2 +- ...d-only-mailserver-with-ldap-authentication.md | 4 ++++ 6 files changed, 25 insertions(+), 7 deletions(-) diff --git a/docs/content/config/advanced/kubernetes.md b/docs/content/config/advanced/kubernetes.md index 357e3621..0223368f 100644 --- a/docs/content/config/advanced/kubernetes.md +++ b/docs/content/config/advanced/kubernetes.md @@ -409,12 +409,16 @@ Then, configure both [Postfix][docs-postfix] and [Dovecot][docs-dovecot] to expe postfix-main.cf: | postscreen_upstream_proxy_protocol = haproxy postfix-master.cf: | + smtp/inet/postscreen_upstream_proxy_protocol=haproxy submission/inet/smtpd_upstream_proxy_protocol=haproxy smtps/inet/smtpd_upstream_proxy_protocol=haproxy dovecot.cf: | # Assuming your ingress controller is bound to 10.0.0.0/8 haproxy_trusted_networks = 10.0.0.0/8, 127.0.0.0/8 service imap-login { + inet_listener imap { + haproxy = yes + } inet_listener imaps { haproxy = yes } diff --git a/docs/content/config/advanced/optional-config.md b/docs/content/config/advanced/optional-config.md index 3d8dc57b..7ad053a2 100644 --- a/docs/content/config/advanced/optional-config.md +++ b/docs/content/config/advanced/optional-config.md @@ -38,12 +38,14 @@ This is a list of all configuration files and directories which are optional or - **amavis.cf:** replaces the `/etc/amavis/conf.d/50-user` file - **dovecot.cf:** replaces `/etc/dovecot/local.conf`. (Docs: [Override Dovecot Defaults][docs-override-dovecot]) - **dovecot-quotas.cf:** list of custom quotas per mailbox. (Docs: [Accounts][docs-accounts-quota]) +- **user-patches.sh:** this file will be run after all configuration files are set up, but before the postfix, amavis and other daemons are started. (Docs: [FAQ - How to adjust settings with the `user-patches.sh` script][docs-faq-userpatches]) [docs-accounts-quota]: ../../config/user-management/accounts.md#notes [docs-aliases-regex]: ../../config/user-management/aliases.md#configuring-regexp-aliases [docs-dkim]: ../../config/best-practices/dkim.md [docs-fail2ban]: ../../config/security/fail2ban.md [docs-faq-spamrules]: ../../faq.md#how-can-i-manage-my-custom-spamassassin-rules +[docs-faq-userpatches]: ../../faq.md#how-to-adjust-settings-with-the-user-patchessh-script [docs-override-postfix]: ./override-defaults/postfix.md [docs-override-dovecot]: ./override-defaults/dovecot.md [docs-relayhosts-senderauth]: ./mail-forwarding/relay-hosts.md#sender-dependent-authentication diff --git a/docs/content/config/best-practices/dkim.md b/docs/content/config/best-practices/dkim.md index 569de5b3..0e71058c 100644 --- a/docs/content/config/best-practices/dkim.md +++ b/docs/content/config/best-practices/dkim.md @@ -18,13 +18,13 @@ To enable DKIM signature, **you must have created at least one email account**. After generating DKIM keys, you should restart the mail server. DNS edits may take a few minutes to hours to propagate. The script assumes you're being in the directory where the `config/` directory is located. The default keysize when generating the signature is 4096 bits for now. If you need to change it (e.g. your DNS provider limits the size), then provide the size as the first parameter of the command: ```sh -./setup.sh config dkim +./setup.sh config dkim keysize ``` For LDAP systems that do not have any directly created user account you can run the following command (since `8.0.0`) to generate the signature by additionally providing the desired domain name (if you have multiple domains use the command multiple times or provide a comma-separated list of domains): ```sh -./setup.sh config dkim [,] +./setup.sh config dkim keysize domain [,] ``` Now the keys are generated, you can configure your DNS server with DKIM signature, simply by adding a TXT record. If you have direct access to your DNS zone file, then it's only a matter of pasting the content of `config/opendkim/keys/domain.tld/mail.txt` in your `domain.tld.hosts` zone. @@ -78,6 +78,10 @@ SendReports yes Mode v ``` +## Switch Off DKIM + +Simply remove the DKIM key by recreating (not just relaunching) the mailserver container. + ## Debugging - [DKIM-verifer](https://addons.mozilla.org/en-US/thunderbird/addon/dkim-verifier): A add-on for the mail client Thunderbird. @@ -106,6 +110,10 @@ mail._domainkey.domain.tld. 3600 IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBA ;; MSG SIZE rcvd: 310 ``` -## Switch Off DKIM +--- -Simply remove the DKIM key by recreating (not just relaunching) the mailserver container. +!!! warning "Key sizes >=4096-bit" + + Keys of 4096 bits could de denied by some mailservers. According to https://tools.ietf.org/html/rfc6376 keys are preferably between 512 and 2048 bits. See issue [#1854][github-issue-1854]. + +[github-issue-1854]: https://github.com/docker-mailserver/docker-mailserver/issues/1854 diff --git a/docs/content/config/setup.sh.md b/docs/content/config/setup.sh.md index 70bff7a5..48b99498 100644 --- a/docs/content/config/setup.sh.md +++ b/docs/content/config/setup.sh.md @@ -19,7 +19,7 @@ chmod a+x ./setup.sh ## Usage -Run `./setup.sh -h` and you'll get some usage information: +Run `./setup.sh help` and you'll get some usage information: ```bash setup.sh Bootstrapping Script @@ -30,7 +30,7 @@ OPTIONS: -i IMAGE_NAME The name of the docker-mailserver image The default value is - 'docker.io/mailserver/docker-maiserver:latest' + 'docker.io/mailserver/docker-mailserver:latest' -c CONTAINER_NAME The name of the running container. diff --git a/docs/content/config/troubleshooting/debugging.md b/docs/content/config/troubleshooting/debugging.md index 4d608847..0c7deb87 100644 --- a/docs/content/config/troubleshooting/debugging.md +++ b/docs/content/config/troubleshooting/debugging.md @@ -53,7 +53,7 @@ fail2ban-client stop dovecot fail2ban-client stop postfix ``` -## Send email is never received +## Sent email is never received Some hosting provides have a stealth block on port 25. Make sure to check with your hosting provider that traffic on port 25 is allowed diff --git a/docs/content/examples/uses-cases/forward-only-mailserver-with-ldap-authentication.md b/docs/content/examples/uses-cases/forward-only-mailserver-with-ldap-authentication.md index b3033299..b62964e6 100644 --- a/docs/content/examples/uses-cases/forward-only-mailserver-with-ldap-authentication.md +++ b/docs/content/examples/uses-cases/forward-only-mailserver-with-ldap-authentication.md @@ -105,5 +105,9 @@ You see that besides `query_filter`, I had to customize as well `result_attribut Another solution that serves as a forward-only mailserver is this: https://gitlab.com/docker-scripts/postfix +!!! tip + + One user reports only having success if `ENABLE_LDAP=0` was set. + [github-file-readme-patches]: https://github.com/docker-mailserver/docker-mailserver/blob/master/README.md#custom-user-changes--patches [github-issue-1247]: https://github.com/docker-mailserver/docker-mailserver/issues/1247