From 7a83e9c1517c3883c4440843eecf11b28cebde91 Mon Sep 17 00:00:00 2001 From: revsuine Date: Tue, 26 Nov 2024 15:32:13 +0000 Subject: [PATCH 1/2] content/blog/_index.md: frame index of blog --- content/blog/_index.md | 1 + hugo.toml | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/content/blog/_index.md b/content/blog/_index.md index fd72a9b..af1be2e 100644 --- a/content/blog/_index.md +++ b/content/blog/_index.md @@ -1,6 +1,7 @@ +++ draft = false title = 'Blog' +framed = true [params] Toc = false diff --git a/hugo.toml b/hugo.toml index 5faeea9..a2d7b2f 100644 --- a/hugo.toml +++ b/hugo.toml @@ -67,7 +67,6 @@ theme = 'terminal' # can be overridden in a page's front-matter # TocTitle = "Table of Contents" # default - [params.twitter] # set Twitter handles for Twitter cards # see https://developer.twitter.com/en/docs/tweets/optimize-with-cards/guides/getting-started#card-and-content-attribution From 8b04cfa06b53fef358923212f8aa423cf994816a Mon Sep 17 00:00:00 2001 From: revsuine Date: Tue, 26 Nov 2024 15:45:14 +0000 Subject: [PATCH 2/2] postfix header checks --- .../index.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/content/blog/mail_server_alpine_postfix_dovecot_tutorial/index.md b/content/blog/mail_server_alpine_postfix_dovecot_tutorial/index.md index a108d9f..24de61c 100644 --- a/content/blog/mail_server_alpine_postfix_dovecot_tutorial/index.md +++ b/content/blog/mail_server_alpine_postfix_dovecot_tutorial/index.md @@ -386,6 +386,25 @@ mailbox_size_limit = 0 By default, `mailbox_size_limit` is `51200000`. This number is in bytes. You can similarly set a `message_size_limit`. +Let's hide some sensitive info that tends to get attached to email headers by clients. Edit +`/etc/postfix/header_checks`, or create it if it doesn't already exist, and add the following lines: + +```plaintext +/^Received: .*/ IGNORE +/^User-Agent: .*/ IGNORE +/^X-Originating-IP: .*/ IGNORE +/^X-Mailer: .*/ IGNORE +/^Mime-Version: .*/ IGNORE +``` + +Now add the following to your `/etc/postfix/main.cf`: + +```conf +header_checks = regexp:/etc/postfix/header_checks +smtp_header_checks = $header_checks +mime_header_checks = $header_checks +``` + Finally, here are some various hardening settings you can add to your `/etc/postfix/main.conf`: ```conf