Antwort: Help: Frage zur Postfix Konfiguration für Routing / Relay

Stephan.Glatthaar at dachser.com Stephan.Glatthaar at dachser.com
Do Jul 5 11:34:18 CEST 2018


* Liebeskind Uri (luri) <luri at zhaw.ch>:

> WHAT I WANT TO ACHIEVE:
> Mails with certain header criteria have to be relayed to an 
> appliance in our network enc.zhaw.ch:25. The appliance then has to 
> pass the mail back to mx1 and postfix shall deliver the mail.
> 
you could solve this with a puremessage policy.siv snipplet like this:
if allof(pmx_attachment_type :memberof ["encrypted-mailparts"],
             not pmx_relay :re ["enc.zhaw.ch"])
 
    {
        pmx_mark1 "enrypted outbound";
        pmx_route ["enc.zhaw.ch"];
        stop;
    }



or with postfix, first the way to totemo:

add in main.cf:
mime_header_checks = pcre:/etc/postfix/mime_header_checks

mime_header_checks:
## # Filter, if a mail was S/MIME or OpenPGP encypted/signed

/^Content-Type:\s* (
        multipart\/signed|
        multipart\/encrypted|
        application\/pkcs7-mime|
        application\/x-pkcs7-mime
        )/x                             FILTER smtp:[enc.zhaw.ch]


and then the way back from totemo to postfix port 10026:

add to master.cf:
10026   inet    n       -       n       -       20      smtpd
        -o content_filter=
        -o smtpd_helo_restrictions=
        -o smtpd_client_restrictions=
        -o smtpd_sender_restrictions=
        -o smtpd_recipient_restrictions=permit_mynetworks,reject
        -o allow_untrusted_routing=yes
        -o receive_override_options=no_header_body_checks


--

Cheers
Stephan


Mehr Informationen über die Mailingliste Postfixbuch-users