Ci-dessous, les différences entre deux révisions de la page.
Prochaine révision | Révision précédente | ||
tutoriaux:install-email-server:postfix-remove-headers [2023/05/25 18:00] – créée frater | tutoriaux:install-email-server:postfix-remove-headers [2024/07/06 01:18] (Version actuelle) – frater | ||
---|---|---|---|
Ligne 1: | Ligne 1: | ||
- | ====== | + | ====== Part A1 - Remove headers ====== |
<WRAP round info> | <WRAP round info> | ||
Ligne 13: | Ligne 13: | ||
</ | </ | ||
- | In order for this to work, your main.cf file will have to have a reference to the header_checks file as follows: | + | In order for this to work, your '' |
<code bash> | <code bash> | ||
- | It is recommended that you keep all of your postfix map files in one directory along with any checks files. In this case, these will be kept in / | + | It is recommended that you keep all of your postfix map files in one directory along with any checks files. In this case, these will be kept in '' |
===== HEADER_CHECKS DETAILS ===== | ===== HEADER_CHECKS DETAILS ===== | ||
- | In addition to any spam filters (see our header_checks file for more information), | + | In addition to any spam filters (see our '' |
- | | + | < |
- | #/^Header: IfContains/ | + | # Sample For Dropping Headers: |
- | /^Received: from 127.0.0.1/ IGNORE | + | #/^Header: IfContains/ |
- | / | + | /^Received: from 127.0.0.1/ IGNORE |
- | / | + | / |
- | / | + | / |
+ | / | ||
+ | </ | ||
- | Each line above will search for headers tha have the content between the /^ and the / and will remove each line within the email headers that matches. As an example, the line “/ | + | Each line above will search for headers tha have the content between the '' |
The following lines are related to Anomy Sanitizer and SpamAssassin – two very useful products. These three lines will remove references from the headers for the two software packages, making sure that the users of the system will not easily identify the software that is running on the back end. | The following lines are related to Anomy Sanitizer and SpamAssassin – two very useful products. These three lines will remove references from the headers for the two software packages, making sure that the users of the system will not easily identify the software that is running on the back end. | ||
- | | + | < |
- | #/^Header: IfContains/ | + | # Sample For Dropping Headers: |
- | /^Received: from 127.0.0.1/ IGNORE | + | #/^Header: IfContains/ |
- | / | + | /^Received: from 127.0.0.1/ IGNORE |
- | / | + | / |
- | / | + | / |
+ | / | ||
+ | </ | ||
If one were to want to remove all headers relevant to personal information and previous hosts on which the email has passed, the following would be a possible configuration. Note that by removing all of this information, | If one were to want to remove all headers relevant to personal information and previous hosts on which the email has passed, the following would be a possible configuration. Note that by removing all of this information, | ||
- | | + | < |
- | #/^Header: IfContains/ IGNORE | + | # Sample For Dropping Headers: |
- | / | + | #/^Header: IfContains/ IGNORE |
- | / | + | / |
- | / | + | / |
- | / | + | / |
- | / | + | / |
- | / | + | / |
- | / | + | / |
- | / | + | / |
- | / | + | / |
- | / | + | / |
+ | / | ||
+ | </ | ||
===== OTHER METHODS OF IMPLEMENTATION ===== | ===== OTHER METHODS OF IMPLEMENTATION ===== | ||
Ligne 59: | Ligne 66: | ||
Another method of keeping only the headers that you want would be as follows: | Another method of keeping only the headers that you want would be as follows: | ||
- | | + | < |
- | /./ IGNORE | + | / |
+ | /./ IGNORE | ||
+ | </ | ||
In this case, we are specifying all of the headers that are OK on the fist line, and removing all of the rest on the second line. | In this case, we are specifying all of the headers that are OK on the fist line, and removing all of the rest on the second line. |