From 63ac4bdfa386ad58e28f941ade5855cc8be7fcf2 Mon Sep 17 00:00:00 2001 From: andryyy Date: Sat, 18 Sep 2021 15:07:42 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20mailcow/?= =?UTF-8?q?mailcow-dockerized-docs@1f9bb1ee0fa77429dcec880778fc85f140c5d23?= =?UTF-8?q?9=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 12 + b_n_r_accidental_deletion/index.html | 12 + b_n_r_backup/index.html | 12 + b_n_r_restore/index.html | 12 + client/client-android/index.html | 12 + client/client-apple/index.html | 12 + client/client-emclient/index.html | 12 + client/client-kontact/index.html | 12 + client/client-manual/index.html | 12 + client/client-outlook/index.html | 12 + client/client-thunderbird/index.html | 12 + client/client-windows/index.html | 12 + client/client-windowsphone/index.html | 12 + client/index.html | 12 + debug-admin_login_sogo/index.html | 12 + debug-asan_rspamd/index.html | 12 + debug-attach_service/index.html | 12 + debug-common_problems/index.html | 12 + debug-logs/index.html | 12 + debug-mysql_upgrade/index.html | 12 + debug-reset_pw/index.html | 12 + debug-reset_tls/index.html | 12 + debug-rm_volumes/index.html | 12 + debug/index.html | 12 + firststeps-disable_ipv6/index.html | 12 + firststeps-dmarc_reporting/index.html | 2203 +++++++++++++++++ firststeps-ip_bindings/index.html | 12 + firststeps-local_mta/index.html | 12 + firststeps-logging/index.html | 12 + firststeps-rp/index.html | 12 + firststeps-rspamd_ui/index.html | 16 +- firststeps-snat/index.html | 16 +- firststeps-ssl/index.html | 12 + firststeps-sync_jobs_migration/index.html | 12 + i_u_m_deinstall/index.html | 12 + i_u_m_install/index.html | 12 + i_u_m_migration/index.html | 12 + i_u_m_update/index.html | 12 + index.html | 12 + model-acl/index.html | 12 + model-passwd/index.html | 12 + model-sender_rcv/index.html | 12 + prerequisite-dns/index.html | 12 + prerequisite-system/index.html | 12 + restrictions_ip_accss/index.html | 12 + search/search_index.json | 2 +- sitemap.xml | 195 +- sitemap.xml.gz | Bin 1029 -> 1039 bytes third_party-borgmatic/index.html | 12 + third_party-exchange_onprem/index.html | 12 + third_party-gitea/index.html | 12 + third_party-gogs/index.html | 12 + third_party-mailpiler_integration/index.html | 12 + third_party-nextcloud/index.html | 12 + third_party-portainer/index.html | 12 + third_party-roundcube/index.html | 12 + third_party-thunderbird/index.html | 12 + u_e-80_to_443/index.html | 12 + u_e-autodiscover_config/index.html | 12 + u_e-backup_restore-maildir/index.html | 12 + u_e-backup_restore-mysql/index.html | 12 + u_e-docker-cust_dockerfiles/index.html | 12 + u_e-docker-dc_bash_compl/index.html | 12 + u_e-dovecot-any_acl/index.html | 12 + u_e-dovecot-catchall_vacation/index.html | 12 + u_e-dovecot-expunge/index.html | 12 + u_e-dovecot-extra_conf/index.html | 12 + u_e-dovecot-fts/index.html | 12 + u_e-dovecot-idle_interval/index.html | 12 + u_e-dovecot-mail-crypt/index.html | 12 + u_e-dovecot-more/index.html | 12 + u_e-dovecot-public_folder/index.html | 12 + u_e-dovecot-static_master/index.html | 12 + u_e-dovecot-vmail-volume/index.html | 12 + u_e-fido2/index.html | 12 + u_e-mailcow_ui-bl_wl/index.html | 12 + u_e-mailcow_ui-config/index.html | 12 + u_e-mailcow_ui-css/index.html | 12 + u_e-mailcow_ui-pushover/index.html | 12 + u_e-mailcow_ui-spamalias/index.html | 12 + u_e-mailcow_ui-spamfilter/index.html | 12 + u_e-mailcow_ui-tagging/index.html | 12 + u_e-mailcow_ui-tfa/index.html | 12 + u_e-nginx/index.html | 12 + u_e-postfix-attachment_size/index.html | 12 + u_e-postfix-custom_transport/index.html | 12 + .../index.html | 12 + u_e-postfix-extra_cf/index.html | 12 + u_e-postfix-pflogsumm/index.html | 12 + u_e-postfix-postscreen_whitelist/index.html | 12 + u_e-postfix-relayhost/index.html | 12 + u_e-postfix-trust_networks/index.html | 12 + u_e-redis/index.html | 12 + u_e-reeanble-weak-protocols/index.html | 12 + u_e-rspamd/index.html | 12 + u_e-sogo/index.html | 12 + u_e-unbound-fwd/index.html | 12 + u_e-update-hooks/index.html | 12 + u_e-webmail-site/index.html | 12 + u_e-why_unbound/index.html | 12 + 100 files changed, 3460 insertions(+), 100 deletions(-) create mode 100644 firststeps-dmarc_reporting/index.html diff --git a/404.html b/404.html index 7eb449510..c275cd26f 100644 --- a/404.html +++ b/404.html @@ -447,6 +447,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/b_n_r_accidental_deletion/index.html b/b_n_r_accidental_deletion/index.html index 43c394535..57a916ab0 100644 --- a/b_n_r_accidental_deletion/index.html +++ b/b_n_r_accidental_deletion/index.html @@ -454,6 +454,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/b_n_r_backup/index.html b/b_n_r_backup/index.html index ca8b57c6a..f0098426a 100644 --- a/b_n_r_backup/index.html +++ b/b_n_r_backup/index.html @@ -454,6 +454,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/b_n_r_restore/index.html b/b_n_r_restore/index.html index 92450b71d..bf994c565 100644 --- a/b_n_r_restore/index.html +++ b/b_n_r_restore/index.html @@ -454,6 +454,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/client/client-android/index.html b/client/client-android/index.html index c7c57a2b6..4909aa24e 100644 --- a/client/client-android/index.html +++ b/client/client-android/index.html @@ -449,6 +449,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/client/client-apple/index.html b/client/client-apple/index.html index bcb6e2999..344e56076 100644 --- a/client/client-apple/index.html +++ b/client/client-apple/index.html @@ -454,6 +454,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/client/client-emclient/index.html b/client/client-emclient/index.html index e531b4ff7..c9f38c4a2 100644 --- a/client/client-emclient/index.html +++ b/client/client-emclient/index.html @@ -449,6 +449,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/client/client-kontact/index.html b/client/client-kontact/index.html index 1fd22f7f8..b472eff27 100644 --- a/client/client-kontact/index.html +++ b/client/client-kontact/index.html @@ -449,6 +449,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/client/client-manual/index.html b/client/client-manual/index.html index 7ac2686e7..20b6952c8 100644 --- a/client/client-manual/index.html +++ b/client/client-manual/index.html @@ -454,6 +454,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/client/client-outlook/index.html b/client/client-outlook/index.html index 4103a802a..46903956b 100644 --- a/client/client-outlook/index.html +++ b/client/client-outlook/index.html @@ -454,6 +454,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/client/client-thunderbird/index.html b/client/client-thunderbird/index.html index e1c6aa642..b1fc95bfe 100644 --- a/client/client-thunderbird/index.html +++ b/client/client-thunderbird/index.html @@ -454,6 +454,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/client/client-windows/index.html b/client/client-windows/index.html index 7dc4e878e..7fb5a576d 100644 --- a/client/client-windows/index.html +++ b/client/client-windows/index.html @@ -449,6 +449,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/client/client-windowsphone/index.html b/client/client-windowsphone/index.html index b6d65bb9d..4823f3369 100644 --- a/client/client-windowsphone/index.html +++ b/client/client-windowsphone/index.html @@ -449,6 +449,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/client/index.html b/client/index.html index 6447c6c2e..e72f1539e 100644 --- a/client/index.html +++ b/client/index.html @@ -449,6 +449,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/debug-admin_login_sogo/index.html b/debug-admin_login_sogo/index.html index ca3d1bc7b..7923f100b 100644 --- a/debug-admin_login_sogo/index.html +++ b/debug-admin_login_sogo/index.html @@ -454,6 +454,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/debug-asan_rspamd/index.html b/debug-asan_rspamd/index.html index 4bbc44a41..9a06d262c 100644 --- a/debug-asan_rspamd/index.html +++ b/debug-asan_rspamd/index.html @@ -449,6 +449,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/debug-attach_service/index.html b/debug-attach_service/index.html index 97f2a870b..247f6d78f 100644 --- a/debug-attach_service/index.html +++ b/debug-attach_service/index.html @@ -454,6 +454,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/debug-common_problems/index.html b/debug-common_problems/index.html index 4aa7dec9a..88de23227 100644 --- a/debug-common_problems/index.html +++ b/debug-common_problems/index.html @@ -454,6 +454,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/debug-logs/index.html b/debug-logs/index.html index e2e523766..2c3a4508d 100644 --- a/debug-logs/index.html +++ b/debug-logs/index.html @@ -449,6 +449,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/debug-mysql_upgrade/index.html b/debug-mysql_upgrade/index.html index dc1737652..3dcfc196b 100644 --- a/debug-mysql_upgrade/index.html +++ b/debug-mysql_upgrade/index.html @@ -454,6 +454,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/debug-reset_pw/index.html b/debug-reset_pw/index.html index ee873e385..492bfffd9 100644 --- a/debug-reset_pw/index.html +++ b/debug-reset_pw/index.html @@ -454,6 +454,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/debug-reset_tls/index.html b/debug-reset_tls/index.html index 3348d689d..8155e5666 100644 --- a/debug-reset_tls/index.html +++ b/debug-reset_tls/index.html @@ -449,6 +449,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/debug-rm_volumes/index.html b/debug-rm_volumes/index.html index b7dd7b07a..b3737e796 100644 --- a/debug-rm_volumes/index.html +++ b/debug-rm_volumes/index.html @@ -449,6 +449,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/debug/index.html b/debug/index.html index 8d8c41b8c..179d42ebe 100644 --- a/debug/index.html +++ b/debug/index.html @@ -449,6 +449,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/firststeps-disable_ipv6/index.html b/firststeps-disable_ipv6/index.html index 28f895aba..ff8542bf1 100644 --- a/firststeps-disable_ipv6/index.html +++ b/firststeps-disable_ipv6/index.html @@ -459,6 +459,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/firststeps-dmarc_reporting/index.html b/firststeps-dmarc_reporting/index.html new file mode 100644 index 000000000..3402a501e --- /dev/null +++ b/firststeps-dmarc_reporting/index.html @@ -0,0 +1,2203 @@ + + + + + + + + + + + + + + + + + + + DMARC Reporting - mailcow: dockerized documentation + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + Skip to content + + +
    +
    + +
    + +
    + +
    + +
    + + + + +
    +
    + + + +
    +
    +
    + + + + +
    +
    +
    + + + +
    + +
    + + +
    +
    + + + + + + + +

    DMARC Reporting

    + +

    DMARC Reporting done via Rspamd DMARC Module.

    +

    Rspamd documentation can be found here: https://rspamd.com/doc/modules/dmarc.html

    +

    Important:

    +
      +
    1. +

      Change example.com, mail.example.com and Example to reflect your setup

      +
    2. +
    3. +

      DMARC reporting requires additional attention, especially over the first few days

      +
    4. +
    5. +

      All receiving domains hosted on mailcow send from one reporting domain. It is recommended to use the parent domain of your MAILCOW_HOSTNAME:

      +
        +
      • If your MAILCOW_HOSTNAME is mail.example.com change the following config to domain = "example.com";
      • +
      • Set email equally, e.g. email = "noreply-dmarc@example.com";
      • +
      +
    6. +
    7. +

      It is optional but recommended to create an email user noreply-dmarc in mailcow to handle bounces.

      +
    8. +
    +

    Enable DMARC reporting

    +
      +
    1. Create the file data/conf/rspamd/local.d/dmarc.conf and set the following content:
    2. +
    +
    reporting {
    +    enabled = true;
    +    email = 'noreply-dmarc@example.com';
    +    domain = 'example.com';
    +    org_name = 'Example';
    +    helo = 'rspamd';
    +    smtp = 'postfix';
    +    smtp_port = 25;
    +    from_name = 'Example DMARC Report';
    +    msgid_from = 'rspamd.mail.example.com';
    +    max_entries = 2k;
    +    keys_expire = 2d;
    +}
    +
    +
      +
    1. Create or modify docker-compose.override.yml in the mailcow-dockerized base directory:
    2. +
    +
    version: '2.1'
    +
    +services:
    +  rspamd-mailcow:
    +    environment:
    +      - MASTER=${MASTER:-y}
    +    labels:
    +      ofelia.enabled: "true"
    +      ofelia.job-exec.rspamd_dmarc_reporting.schedule: "@every 24h"
    +      ofelia.job-exec.rspamd_dmarc_reporting.command: "/bin/bash -c \"[[ $${MASTER} == y ]] && /usr/bin/rspamadm dmarc_report > /var/lib/rspamd/dmarc_reports_last_log 2>&1 || exit 0\""
    +  ofelia-mailcow:
    +    depends_on:
    +      - rspamd-mailcow
    +
    +
      +
    1. Run docker-compose up -d
    2. +
    +

    Send a copy reports to yourself

    +

    To receive a hidden copy of reports generated by Rspamd you can set a bcc_addrs list in the reporting config section of data/conf/rspamd/local.d/dmarc.conf:

    +
    reporting {
    +    enabled = true;
    +    email = 'noreply-dmarc@example.com';
    +    bcc_addrs = ["noreply-dmarc@example.com","parsedmarc@example.com"];
    +[...]
    +
    +

    Rspamd will load changes in real time, so you won't need to restart the container at this point.

    +

    This can be useful if you...

    +
      +
    • ...want to check that your DMARC reports are sent correctly and authenticated.
    • +
    • ...want to analyze your own reports to get statistics, i.e. to use with ParseDMARC or other analytic systems.
    • +
    +

    Troubleshooting

    +

    Check when the report schedule last ran:

    +
    docker-compose exec rspamd-mailcow date -r /var/lib/rspamd/dmarc_reports_last_log
    +
    +

    See the latest report output:

    +
    docker-compose exec rspamd-mailcow cat /var/lib/rspamd/dmarc_reports_last_log
    +
    +

    Manually trigger a DMARC report:

    +
    docker-compose exec rspamd-mailcow rspamadm dmarc_report
    +
    +

    Validate that Rspamd has recorded data in Redis:

    +
    docker-compose exec redis-mailcow redis-cli KEYS 'dmarc;*'
    +docker-compose exec redis-mailcow redis-cli HGETALL "dmarc;example.com;20211231"
    +
    +

    Change DMARC reporting frequency

    +

    In the example above reports are sent once every 24 hours. You may want to change that interval:

    +
      +
    1. +

      Edit docker-compose.override.yml and a djust ofelia.job-exec.rspamd_dmarc_reporting.schedule: "@every 24h" to a desired value.

      +
    2. +
    3. +

      Run docker-compose up -d

      +
    4. +
    5. +

      Run docker-compose restart ofelia-mailcow

      +
    6. +
    +

    Disable DMARC Reporting

    +

    To disable reporting:

    +
      +
    1. +

      Set enabled to false in data/conf/rspamd/local.d/dmarc.conf

      +
    2. +
    3. +

      Revert changes done to docker-compose.override.yml

      +
    4. +
    5. +

      Run docker-compose up -d

      +
    6. +
    + + + + + + + +
    +
    +
    + +
    + + + + +
    +
    +
    +
    + + + + + + + + + + \ No newline at end of file diff --git a/firststeps-ip_bindings/index.html b/firststeps-ip_bindings/index.html index 14f8772ff..8442d937c 100644 --- a/firststeps-ip_bindings/index.html +++ b/firststeps-ip_bindings/index.html @@ -499,6 +499,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/firststeps-local_mta/index.html b/firststeps-local_mta/index.html index 0dea2523e..b21ae4964 100644 --- a/firststeps-local_mta/index.html +++ b/firststeps-local_mta/index.html @@ -459,6 +459,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/firststeps-logging/index.html b/firststeps-logging/index.html index 1278903e2..21254754b 100644 --- a/firststeps-logging/index.html +++ b/firststeps-logging/index.html @@ -519,6 +519,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/firststeps-rp/index.html b/firststeps-rp/index.html index 503e94f98..985e16409 100644 --- a/firststeps-rp/index.html +++ b/firststeps-rp/index.html @@ -527,6 +527,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT diff --git a/firststeps-rspamd_ui/index.html b/firststeps-rspamd_ui/index.html index cb346acc4..fae511c8c 100644 --- a/firststeps-rspamd_ui/index.html +++ b/firststeps-rspamd_ui/index.html @@ -459,6 +459,18 @@ +
  • + + DMARC Reporting + +
  • + + + + + + +
  • SNAT @@ -1894,13 +1906,13 @@ -
  • + DMARC Reporting + +
  • + + + + + + @@ -1882,7 +1894,7 @@ SNAT6_TO_SOURCE=dead:beef