postfix header checks
This commit is contained in:
parent
7a83e9c151
commit
8b04cfa06b
1 changed files with 19 additions and 0 deletions
|
@ -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`.
|
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`:
|
Finally, here are some various hardening settings you can add to your `/etc/postfix/main.conf`:
|
||||||
|
|
||||||
```conf
|
```conf
|
||||||
|
|
Loading…
Reference in a new issue