mloeffle
Goto Top

Postfix schickt keine Mail an content filter nach header checks redirect

Postfix mit Content-filter: Nach einem REDIRECT durch eine header_checks Anweisung übergeht die Mail einen durch Content-Filter angeschlossenen MTA, in meinem Fall amavis. Wie kann ich das verhindern?

Ich verwende in Postfix die Header Checks und wenn bestimmte Dinge zutreffen, dann wird die Mail an einen anderen Empfänger umgeleitet:

(aus /etc/postfix/header_checks)

/^Subjectface-sad\s)*Spam:/ REDIRECT Spamverdacht@beispiel.de

Die Umleitung funktioniert, jedoch funktioniert für den Fall einer Umleitung das Abarbeiten einer Mail über Content-Filter nicht mehr, in meinem Fall an amavis.

(Auszug aus /etc/postfix/master.cf)

smtp inet n - n - - smtpd
-o cleanup_service_name=pre-cleanup
-o content_filter=smtp:[127.0.0.1]:10025
-o receive_override_options=no_address_mappings

Die Mail geht also nicht über 127.0.0.1:10025, sondern wird weiter an den nächsten MTA geleitet, und übergeht also den amavis.

Woran liegt das? Wie kann ich das ändern?
Liegt es vielleicht an dem -o cleanup_service_name=pre-cleanup, denn hier werden meines Wissens die header checks gemacht?

Vielen Danl für eine Hilfe!

Viele Grüße,
Micha

Content-Key: 77656

Url: https://administrator.de/contentid/77656

Printed on: April 23, 2024 at 18:04 o'clock

Mitglied: 57100
57100 Jan 15, 2008 at 10:46:22 (UTC)
Goto Top
Auszuck aus der manpage von header_checks:
[...]
REDIRECT user@domain
Write a message redirection request to the queue
file, and inspect the next input line. After the
message is queued, it will be sent to the specified
address instead of the intended recipient(s).

Note: this action overrides the FILTER action, and
affects all recipients of the message. If multiple
REDIRECT actions fire, only the last one is exe-
cuted.

This feature is available in Postfix 2.1 and later.
[...]

Benutze eine transport table (die du in der master.cf bestimmen kannst):
[...]
FILTER transport:destination
Write a content filter request to the queue file,
and inspect the next input line. After the com-
plete message is received it will be sent through
the specified external content filter. More infor-
mation about external content filters is in the
Postfix FILTER_README file.

Note: this action overrides the content_filter set-
ting, and affects all recipients of the message. In
the case that multiple FILTER actions fire, only
the last one is executed.

This feature is available in Postfix 2.0 and later.
[...]

Ansonsten versuche nach dem: "/^Subjectface-sad\s)*Spam:/ REDIRECT Spamverdacht@beispiel.de" in der transport table, die Email Adresse Spamverdacht@beispiel.de manuell nochmal durch den smtp zu jagen (KEINE Garantie):

transport-table:
Spamverdacht@beispiel.de transport:smtp