Answer the question
In order to leave comments, you need to log in
Postfix relay - how to hide a chain of servers?
There is Postfix in the form of Relay, which accepts mail from trusted servers for forwarding to the open world (from a group of servers, for example, billing).
Is it possible in Postfix to hide the chain of servers through which the letter passed before reaching the Relay? For example, letters go like this:
Received: from mx.xxx.ru (mx.xxx.ru [xxx.xxx.xxx.xxx])
by mxfront5h.mail.yandex.net (nwsmtp/Yandex) with ESMTP id x;
Thu, 25 Sep 2014 23:17:23 +0400
Received: from xxx.ru (xxx.ru [xxx.xxx.xxx.xxx])
by mx.xxx.ru (Postfix) with ESMTP id 332467488DF
for <[email protected]>; Thu, 25 Sep 2014 23:17:23 +0400 (MSK)
Received: by xxx.ru (Postfix, from userid 48)
id 253767480028; Thu, 25 Sep 2014 23:17:23 +0400 (MSK)
Answer the question
In order to leave comments, you need to log in
I faced a similar problem, only I cut out the IP addresses of the clients. But I recommend you do it by analogy:
In main.cf:
smtp_header_checks = pcre:/etc/postfix/anon-headers.pcre
/etc/postfix/anon-headers.pcre (change or remove headers):
/^User-Agent:/ IGNORE
/^X-Mailer:/ IGNORE
/^X-Originating-IP:/ IGNORE
/^Received: from (.* \([-._[:alnum:]]+ \ {7,15}\]\))(.*)\(Authenticated sender: ([^)]+)\)(.*)(by mydomain\.com) \(([^)]+)\) with (E?SMTPS?A?) id ([AF[:digit:]]+)(.*)/ REPLACE Received: from smtp-auth.domain.com (smtp-auth.domain.com [127.0.0.1] )$2(Authenticated sender: hidden)$4$5 ($6) with $7 id $8 $9
/^Received: by xxx.ru/
IGNORE
Need PCRE support in postfix.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question