Received: from [192.168.xx.yy] (pcname.ifam-erfurt.de [192.168.xx.yy])
…
by ns8.ifam-erfurt.de (Postfix) with ESMTPSA id 25D5D181B4C2B;
Wed, 25 Mar 2026 12:41:47 +0000 (UTC)
Thank you so much for the instructions! It works—the last row is gone. I had already read about the basic approach in forums and blogs, but I lack the knowledge when it comes to working with containers.
One more question: the second-to-last line (with “Received: from ns8.ifam-erfurt.de“) isn’t filtered, even though it also contains the string “ESMTPSA.” Why is that? Is there a way to filter that one too?
No, I send emails to my external email provider using the “Mail Relay” feature in NS8. To test the sent header lines, I use a public echo mailer such as “echo@univie.ac.at”. This allows me to verify that sending and receiving are working correctly and see my exact mail header (which is sent back to me).
I tested using direct sending of a testmail to echo@univie.ac.at and the answer just had 3 received headers:
Received: from mail.domain.tld
by node1.domain.tld with LMTP
id sfN9ED8HxkpBwAAaGOrxQ
(envelope-from <>)
for <markus@mail.domain.tld.localhost>; Thu, 26 Mar 2026 10:15:27 +0000
Received: from grace.univie.ac.at (grace.univie.ac.at [131.130.3.115])
(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
(No client certificate requested)
by mail.domain.tld (Postfix) with ESMTPS id 9B86F120337DC
for <markus@domain.tld>; Thu, 26 Mar 2026 10:15:21 +0000 (UTC)
Received: from mail by grace.univie.ac.at with local (Exim 4.99.1)
id 1w5hkH-0000007KW-1gJh
for markus@domain.tld;
Thu, 26 Mar 2026 11:15:21 +0100
EDIT:
When using the simplified regex there’s just 1 received header in the answer mail:
Received: from mail.domain.tld
by ctb1.domain.tld with LMTP
id TsKcBmMWkCGgAAu9VA
(envelope-from <>)
for <markus@mail.domain.tld.localhost>; Thu, 26 Mar 2026 10:20:19 +0000
I’ve now done various tests. Here are the results:
You’re right, the mail relay/ smart host is causing the “Received: from ns8.ifam-erfurt.de” entry. If I send the email directly via the ALL-INKL webmail interface, this entry doesn’t appear. It doesn’t matter what the filter settings are.
So I will leave the settings as follows:
Send via mail relay/ smarthost
Filter setting: /^Received:/ IGNORE
It is important that local IPs and names do not appear.
When I compare this behaviour with my previous NS7 installation, it behaves exactly the same way.