Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
centos:mail_c7:postfix3_1 [26.01.2019 20:26. ] – [Lockup-Tables] django | centos:mail_c7:postfix3_1 [18.11.2024 19:12. ] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
---|---|---|---|
Zeile 16: | Zeile 16: | ||
===== Installation ===== | ===== Installation ===== | ||
- | Seit CentOS 6.0 wird als **MTA** Postfix installiert - aktuell ist dies der 2.10er Release. Im vorliegenden Konfigurationsbeispiel wollen wir uns aber im Detail mit der __aktuellen__ Version **V3** beschäftigen. Als Installationsquelle nutzen wie hierzu das [[centos:mailserver.guru|Repository | + | Seit CentOS 6.0 wird als **MTA** Postfix installiert - aktuell ist dies der 2.10er Release. Im vorliegenden Konfigurationsbeispiel wollen wir uns aber im Detail mit der __aktuellen__ Version **V3** beschäftigen. Als Installationsquelle nutzen wie hierzu das [[centos:nausch.org|Repository |
- | ==== Repository | + | ==== Repository |
- | Damit nun bei der Installation und den späteren Updates nicht mehr den von CentOS 7 bereoitgestellen Postfix in der Version 2.10 sondern die aktuellere Version 3.x aus dem Repository | + | Damit nun bei der Installation und den späteren Updates nicht mehr den von CentOS 7 bereoitgestellen Postfix in der Version 2.10 sondern die aktuellere Version 3.x aus dem Repository |
# vim / | # vim / | ||
<file bash / | <file bash / | ||
Zeile 71: | Zeile 71: | ||
</ | </ | ||
- | Als nächstes konfigurieren wir dann die Verwendung des Postfix 3.x-Relase aus dem Zweig **testing** des verwendeten Repositories **mailserver.guru**. Dazu passen wir die zugehörige Konfigurationsdatei wie folgt an: | + | Als nächstes konfigurieren wir dann die Verwendung des Postfix 3.x-Relase aus dem Zweig **testing** des verwendeten Repositories **nausch.org**. Dazu passen wir die zugehörige Konfigurationsdatei wie folgt an: |
- | # vim / | + | # vim / |
- | <file bash / | + | <file bash / |
name=Extra (Mailserver-)Packages for Enterprise Linux 7 - | name=Extra (Mailserver-)Packages for Enterprise Linux 7 - | ||
- | baseurl=http:// | + | baseurl=http:// |
priority=5 | priority=5 | ||
enabled=1 | enabled=1 | ||
Zeile 86: | Zeile 86: | ||
- | [mailserver.guru-testing] | + | [nausch.org-testing] |
name=Testing (Mailserver-)Packages for Enterprise Linux 7 - | name=Testing (Mailserver-)Packages for Enterprise Linux 7 - | ||
- | baseurl=http:// | + | baseurl=http:// |
priority=5 | priority=5 | ||
# Django : 2019-01-26 | # Django : 2019-01-26 | ||
Zeile 117: | Zeile 117: | ||
Build Host : vml000137.dmz.nausch.org | Build Host : vml000137.dmz.nausch.org | ||
Relocations : (not relocatable) | Relocations : (not relocatable) | ||
- | Packager | + | Packager |
URL : http:// | URL : http:// | ||
Summary | Summary | ||
Zeile 2306: | Zeile 2306: | ||
* **[[centos: | * **[[centos: | ||
- | \\ \\ \\ | ||
- | <WRAP center round todo 30%> | ||
- | FIXME FIXME FIXME | ||
- | * //**do geds weida!**// | ||
- | FIXME FIXME FIXME | ||
- | </ | ||
- | \\ \\ \\ | ||
===== Header-Checks ===== | ===== Header-Checks ===== | ||
Möchte man Informationen im Mailheader zum Bewerten verwenden, um so z.B. eine Nachricht zu blocken, kann man dies mit Hilfe der Konfigurationsdatei **header_checks** realisieren. | Möchte man Informationen im Mailheader zum Bewerten verwenden, um so z.B. eine Nachricht zu blocken, kann man dies mit Hilfe der Konfigurationsdatei **header_checks** realisieren. | ||
# less / | # less / | ||
<file bash / | <file bash / | ||
- | # | + | # |
- | # NAME | + | # NAME |
- | # header_checks - Postfix built-in content inspection | + | # header_checks - Postfix built-in content inspection |
- | # | + | # |
- | # SYNOPSIS | + | # SYNOPSIS |
- | # header_checks = pcre:/ | + | # header_checks = pcre:/ |
- | # mime_header_checks = pcre:/ | + | # mime_header_checks = pcre:/ |
- | # nested_header_checks = pcre:/ | + | # nested_header_checks = pcre:/ |
- | # body_checks = pcre:/ | + | # body_checks = pcre:/ |
# | # | ||
# milter_header_checks = pcre:/ | # milter_header_checks = pcre:/ | ||
Zeile 2448: | Zeile 2441: | ||
# if / | # if / | ||
# | # | ||
- | # endif | + | # endif |
- | # if and endif, if and only if the same input string | + | # that |
- | # also matches /pattern/. The if..endif can nest. | + | # and endif. The if..endif can nest. |
# | # | ||
# Note: do not prepend whitespace to patterns | # Note: do not prepend whitespace to patterns | ||
Zeile 2457: | Zeile 2450: | ||
# if !/ | # if !/ | ||
# | # | ||
- | # endif | + | # endif |
- | # if and endif, if and only if the same input string | + | # match that |
- | # does not match /pattern/. The if..endif can nest. | + | # between if and endif. The if..endif can nest. |
# | # | ||
# blank lines and comments | # blank lines and comments | ||
Zeile 2492: | Zeile 2485: | ||
# Action names are case insensitive. They are shown in upper | # Action names are case insensitive. They are shown in upper | ||
# case for consistency with other Postfix documentation. | # case for consistency with other Postfix documentation. | ||
+ | # | ||
+ | # BCC user@domain | ||
+ | # Add the specified address as a BCC recipient, | ||
+ | # | ||
+ | # a local part and domain part. The number | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # Note 1: the BCC address is added as if it was spec- | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | # 3461. | ||
+ | # | ||
+ | # Note 2: this ignores duplicate addresses (with the | ||
+ | # same delivery status notification options). | ||
+ | # | ||
+ | # This feature is available in Postfix 3.0 and later. | ||
+ | # | ||
+ | # This feature is not supported with smtp header/body | ||
+ | # | ||
# | # | ||
# DISCARD optional text... | # DISCARD optional text... | ||
- | # Claim successful delivery and silently discard | + | # |
+ | # | ||
# | # | ||
# | # | ||
Zeile 2521: | Zeile 2536: | ||
# | # | ||
# FILTER transport: | # FILTER transport: | ||
- | # After the message is queued, send the entire | + | # Override the content_filter parameter setting, |
- | # sage through the specified | + | # |
- | # The transport name specifies the first field of a | + | # queued, send the entire |
- | # mail delivery | + | # fied |
- | # syntax of the next-hop destination is described | + | # specifies the first field of a mail delivery |
- | # the manual | + | # definition in master.cf; the syntax of the next-hop |
- | # agent. | + | # destination is described in the manual page of the |
- | # | + | # corresponding |
+ | # about external content | ||
+ | # FILTER_README file. | ||
# | # | ||
# | # | ||
Zeile 2581: | Zeile 2598: | ||
# | # | ||
# IGNORE Delete the current line from the input, and inspect | # IGNORE Delete the current line from the input, and inspect | ||
- | # the next input line. | + | # the next input line. See STRIP for an alternative |
+ | # that logs the action. | ||
# | # | ||
# INFO optional text... | # INFO optional text... | ||
# Log an " | # Log an " | ||
- | # | + | # log a generic text), and inspect |
- | # line. This action is useful for routine logging | + | # |
# for debugging. | # for debugging. | ||
# | # | ||
# This feature is available in Postfix 2.8 and later. | # This feature is available in Postfix 2.8 and later. | ||
+ | # | ||
+ | # PASS optional text... | ||
+ | # | ||
+ | # log a generic text), and turn off header, body, and | ||
+ | # | ||
+ | # sage. | ||
+ | # | ||
+ | # Note: this feature relies on trust in information | ||
+ | # that is easy to forge. | ||
+ | # | ||
+ | # This feature is available in Postfix 3.2 and later. | ||
+ | # | ||
+ | # This feature is not supported with smtp header/body | ||
+ | # | ||
# | # | ||
# PREPEND text... | # PREPEND text... | ||
- | # | + | # |
# | # | ||
# | # | ||
# | # | ||
# | # | ||
- | # | + | # |
# line, immediately | # line, immediately | ||
# triggered the PREPEND action. | # triggered the PREPEND action. | ||
# | # | ||
# | # | ||
- | # the input stream: | + | # the input stream: |
# header/body checks or address rewriting, and | # header/body checks or address rewriting, and | ||
# it does not affect the way that Postfix adds | # it does not affect the way that Postfix adds | ||
Zeile 2608: | Zeile 2640: | ||
# | # | ||
# | # | ||
- | # line, the prepended text must begin with a | + | # line, the prepended text must begin with a |
# valid message header label. | # valid message header label. | ||
# | # | ||
- | # | + | # |
- | # line text. | + | # |
# | # | ||
# This feature is available in Postfix 2.1 and later. | # This feature is available in Postfix 2.1 and later. | ||
Zeile 2620: | Zeile 2652: | ||
# | # | ||
# REDIRECT user@domain | # REDIRECT user@domain | ||
- | # Write a message redirection request | + | # |
- | # | + | # file, and inspect the next input line. After the |
# | # | ||
# | # | ||
# | # | ||
- | # | + | # Note: this action overrides the FILTER action, |
- | # | + | # |
- | # | + | # |
# | # | ||
# | # | ||
Zeile 2636: | Zeile 2668: | ||
# | # | ||
# REPLACE text... | # REPLACE text... | ||
- | # | + | # |
# and inspect the next input line. | # and inspect the next input line. | ||
# | # | ||
# This feature is available in Postfix 2.2 and later. | # This feature is available in Postfix 2.2 and later. | ||
- | # The description below applies to Postfix 2.2.2 and | + | # |
# | # | ||
# | # | ||
# | # | ||
# | # | ||
- | # | + | # |
- | # replacement text must begin with a valid | + | # replacement |
# header label. | # header label. | ||
# | # | ||
- | # | + | # |
- | # stream. Unlike the result from the PREPEND | + | # stream. |
- | # action, | + | # action, a replaced |
- | # subject to address rewriting and may affect | + | # subject |
- | # the way that Postfix adds missing message | + | # the way that Postfix |
# headers. | # headers. | ||
# | # | ||
# REJECT optional text... | # REJECT optional text... | ||
- | # | + | # |
- | # | + | # remainder |
- | # wise reply with a generic error message. | + | # |
+ | # fied, otherwise | ||
# | # | ||
- | # | + | # |
- | # | + | # |
# | # | ||
# | # | ||
Zeile 2672: | Zeile 2705: | ||
# This feature is not supported with smtp header/body | # This feature is not supported with smtp header/body | ||
# | # | ||
+ | # | ||
+ | # STRIP optional text... | ||
+ | # Log a " | ||
+ | # log a generic text), delete the input line from the | ||
+ | # | ||
+ | # for a silent alternative. | ||
+ | # | ||
+ | # This feature is available in Postfix 3.2 and later. | ||
# | # | ||
# WARN optional text... | # WARN optional text... | ||
- | # Log a " | + | # |
# (or log a generic text), and inspect the next input | # (or log a generic text), and inspect the next input | ||
- | # line. This action is useful for debugging | + | # |
- | # | + | # |
# | # | ||
# | # | ||
# BUGS | # BUGS | ||
# Empty lines never match, because some map types mis-behave | # Empty lines never match, because some map types mis-behave | ||
- | # when given a zero-length search string. | + | # when given a zero-length search string. |
- | # may be removed for regular expression tables in a future | + | # may be removed for regular expression tables in a future |
# release. | # release. | ||
# | # | ||
- | # Many people | + | # Many people overlook the main limitations |
# body_checks rules. | # body_checks rules. | ||
# | # | ||
- | # o These rules operate on one logical | + | # o These rules operate on one logical message header |
# or one body line at a time. A decision made for one | # or one body line at a time. A decision made for one | ||
# line is not carried over to the next line. | # line is not carried over to the next line. | ||
# | # | ||
- | # o If text in the message body is encoded | + | # o If text in the message body is encoded (RFC 2045) |
# then the rules need to be specified for the encoded | # then the rules need to be specified for the encoded | ||
# form. | # form. | ||
# | # | ||
- | # o Likewise, when message | + | # o Likewise, |
- | # | + | # 2047) then the rules need to be specified |
# | # | ||
# | # | ||
- | # Message headers added by the cleanup(8) daemon itself | + | # Message |
# excluded from inspection. Examples of such message headers | # excluded from inspection. Examples of such message headers | ||
# are From:, To:, Message-ID:, | # are From:, To:, Message-ID:, | ||
# | # | ||
- | # Message headers deleted by the cleanup(8) daemon | + | # Message |
# examined before they are deleted. Examples are: Bcc:, Con- | # examined before they are deleted. Examples are: Bcc:, Con- | ||
# tent-Length:, | # tent-Length:, | ||
Zeile 2713: | Zeile 2754: | ||
# | # | ||
# body lines. | # body lines. | ||
- | # a time, in chunks | + | # |
# | # | ||
# | # | ||
# body_checks_size_limit | # body_checks_size_limit | ||
- | # | + | # The amount of content |
# | # | ||
# | # | ||
Zeile 2727: | Zeile 2768: | ||
# nested_header_checks (default: $header_checks) | # nested_header_checks (default: $header_checks) | ||
# | # | ||
- | # | + | # |
- | # | + | # the initial message |
- | # | + | # |
- | # | + | # sage, and to the initial headers of attached |
# | # | ||
# | # | ||
- | # Note: these filters see one logical message | + | # |
- | # | + | # at a time, even when a message header spans multi- |
- | # ple lines. Message headers | + | # |
# | # | ||
# | # | ||
# disable_mime_input_processing | # disable_mime_input_processing | ||
- | # | + | # While receiving mail, give no special treatment |
- | # MIME related message headers; all text after the | + | # |
# | # | ||
- | # the message body. This means that header_checks | + | # |
- | # | + | # |
# that body_checks is applied to the remainder of the | # that body_checks is applied to the remainder of the | ||
# | # | ||
# | # | ||
- | # | + | # Note: when used in this manner, |
- | # | + | # |
# time. | # time. | ||
# | # | ||
# EXAMPLES | # EXAMPLES | ||
- | # Header | + | # Header pattern to block attachments |
- | # extensions. | + | # extensions. |
- | # fied, so that there is no need to collapse the pattern | + | # fied, so that there is no need to collapse |
- | # into a single | + | # into |
# [[: | # [[: | ||
# strings. | # strings. | ||
Zeile 2763: | Zeile 2804: | ||
# | # | ||
# / | # / | ||
- | # / | + | # / |
# ade|adp|asp|bas|bat|chm|cmd|com|cpl|crt|dll|exe| | # ade|adp|asp|bas|bat|chm|cmd|com|cpl|crt|dll|exe| | ||
# hlp|ht[at]| | # hlp|ht[at]| | ||
Zeile 2794: | Zeile 2835: | ||
# | # | ||
# README FILES | # README FILES | ||
- | # Use " | + | # Use " |
# tory" to locate this information. | # tory" to locate this information. | ||
# DATABASE_README, | # DATABASE_README, | ||
Zeile 2802: | Zeile 2843: | ||
# | # | ||
# LICENSE | # LICENSE | ||
- | # The Secure Mailer license must be distributed | + | # The Secure |
# software. | # software. | ||
# | # | ||
Zeile 2811: | Zeile 2852: | ||
# Yorktown Heights, NY 10598, USA | # Yorktown Heights, NY 10598, USA | ||
# | # | ||
- | # | + | # |
- | </ | + | # Google, Inc. |
- | + | # 111 8th Avenue | |
- | Wie dies im Detail von Statten geht werden wir uns in einem separaten Schritt [[centos: | + | # New York, NY 10011, USA |
+ | # | ||
+ | # | ||
+ | Wie dies im Detail von Statten geht werden wir uns in einem separaten Schritt [[centos: | ||
===== Paketfilter / Firewall ===== | ===== Paketfilter / Firewall ===== | ||
Damit fremde **MTA**s((**M**ail **T**ransfer **A**gent)) auf **[[centos: | Damit fremde **MTA**s((**M**ail **T**ransfer **A**gent)) auf **[[centos: | ||
Zeile 2840: | Zeile 2884: | ||
0 0 ACCEPT | 0 0 ACCEPT | ||
</ | </ | ||
- | |||
- | |||
===== Systemstart ===== | ===== Systemstart ===== | ||
==== erster manueller Start ==== | ==== erster manueller Start ==== | ||
+ | |||
# systemctl start postfix.service | # systemctl start postfix.service | ||
Zeile 2855: | Zeile 2898: | ||
# systemctl status postfix.service | # systemctl status postfix.service | ||
- | < | + | |
- | | + | <html>< |
- | | + | <font style=" |
- | Process: | + | |
- | Process: 30517 ExecStart=/ | + | |
- | Process: | + | Process: |
- | Process: | + | Process: |
- | Main PID: 30590 (master) | + | Process: |
+ | Main PID: 14423 (master) | ||
| | ||
- | | + | |
- | | + | |
- | | + | |
+ | |||
+ | Jan 26 21:41:20 vml000080.dmz.nausch.org systemd[1]: Starting Postfix Mail Transport Agent... | ||
+ | Jan 26 21:41:21 vml000080.dmz.nausch.org postfix/ | ||
+ | Jan 26 21:41:21 vml000080.dmz.nausch.org postfix/ | ||
+ | Jan 26 21:41:21 vml000080.dmz.nausch.org systemd[1]: Started Postfix Mail Transport Agent.</ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | Fragen wir nun mit Hilfe des Befehls '' | ||
+ | # netstat -tulpen | ||
+ | |||
+ | < | ||
+ | Proto Recv-Q Send-Q Local Address | ||
+ | tcp 0 0 127.0.0.1: | ||
+ | tcp6 | ||
+ | |||
+ | Alternativ dazu können wr auch den Befehl '' | ||
+ | # lsof -i :25 | ||
+ | |||
+ | COMMAND | ||
+ | master | ||
+ | master | ||
- | Oct 10 22:41:25 vml000087.dmz.nausch.org systemd[1]: Starting Postfix Mail Transport Agent... | ||
- | Oct 10 22:41:26 vml000087.dmz.nausch.org postfix/ | ||
- | Oct 10 22:41:26 vml000087.dmz.nausch.org systemd[1]: Started Postfix Mail Transport Agent. | ||
- | </ | ||
==== automatischer Start beim Systemstart ==== | ==== automatischer Start beim Systemstart ==== | ||
Zeile 2885: | Zeile 2947: | ||
===== Systemtest ===== | ===== Systemtest ===== | ||
- | Mit der minimalen Konfiguration unseres Postfix haben wir bereits einen lauffähigen **MTA**. Zum Testen | + | |
+ | Mit der minimalen Konfiguration unseres Postfix haben wir bereits einen lauffähigen **MTA**. Zum Testen verwenden wir das Programm | ||
Die Eingaben am testenden Client sind in der Farbe < | Die Eingaben am testenden Client sind in der Farbe < | ||
Zeile 2898: | Zeile 2961: | ||
<font style=" | <font style=" | ||
<font style=" | <font style=" | ||
- | <font style=" | + | <font style=" |
<font style=" | <font style=" | ||
<font style=" | <font style=" | ||
Zeile 2909: | Zeile 2972: | ||
test | test | ||
.</ | .</ | ||
- | <font style=" | + | <font style=" |
<font style=" | <font style=" | ||
<font style=" | <font style=" | ||
Zeile 2915: | Zeile 2978: | ||
</ | </ | ||
- | Die Message-ID **5F251C00088** finden wir dann auch im Maillog wieder. | + | Die Message-ID **5FFA5600088** finden wir dann auch im Maillog wieder. |
# tail -n7 / | # tail -n7 / | ||
- | Oct 13 22:15:55 vml000087 | + | < |
- | Oct 13 22:16:34 vml000087 | + | Jan 26 22:03:46 vml000080.dmz.nausch.org |
- | Oct 13 22:17:13 vml000087 | + | Jan 26 22:04:20 vml000080.dmz.nausch.org |
- | Oct 13 22:17:13 vml000087 | + | Jan 26 22:04:20 vml000080.dmz.nausch.org |
- | Oct 13 22:17:13 vml000087 | + | Jan 26 22:04:20 vml000080.dmz.nausch.org |
- | Oct 13 22:17:13 vml000087 | + | Jan 26 22:04:20 vml000080.dmz.nausch.org |
- | Oct 13 22:17:16 vml000087 | + | Jan 26 22:04:23 vml000080.dmz.nausch.org |
Auf unserem Festplatten wurde die eMail auch entsprechend abgespeichert. | Auf unserem Festplatten wurde die eMail auch entsprechend abgespeichert. | ||
Zeile 2935: | Zeile 2998: | ||
# cat / | # cat / | ||
- | < | + | < |
Return-Path: | Return-Path: | ||
- | X-Original-To: | + | X-Original-To: |
- | Delivered-To: | + | Delivered-To: |
Received: from foo (localhost [IPv6:::1]) | Received: from foo (localhost [IPv6:::1]) | ||
- | | + | by vml000080.dmz.nausch.org (Postfix) with SMTP id 5FFA5600088 |
- | for <django@vml000087.dmz.nausch.org>; | + | for <django@vml000080.dmz.nausch.org>; |
From: michael@nausch.org | From: michael@nausch.org | ||
To: django@vml000087.dmz.nausch.org | To: django@vml000087.dmz.nausch.org | ||
Subject: erste testmail | Subject: erste testmail | ||
Date: heute | Date: heute | ||
- | Message-Id: <20141013201634.5F251C00088@vml000087.dmz.nausch.org> | + | Message-Id: <20190126210346.5FFA5600088@vml000080.dmz.nausch.org> |
test | test | ||
Zeile 2959: | Zeile 3022: | ||
* **[[http:// | * **[[http:// | ||
- | /* ~~AUTOTWEET: | ||