Score:0

Remove ServerSignature, Labels and Lines from Postfix/Linux Incoming and Outgoing Message Headers

us flag

My mail server is on Ubuntu and I use SSH, Plesk and Warden Anti-Spam wiith Amavis to Handle my settings and filters. I'm trying to hide some sensitive data unnecessary and labels from Incoming and Outgoing Email Messages headers.

  1. For example I want to hide/change ubuntu
  2. Tying to Ignore/disable X-Spam-Status, X-PPP-Message-ID, X-Virus-Scanned and possible "none-required versions".
  3. Need to prevent messages with spam score over 13 from reaching the Junk Mail folder

Incoming

Authentication-Results: ubuntu; dmarc=pass (p=NONE sp=QUARANTINE) smtp.from=gmail.com header.from=gmail.com; dkim=pass header.d=gmail.com; spf=pass (sender IP is 209.85.214.182) [email protected] smtp.helo=mail-pl1-f182.google.com Received-SPF: pass (ubuntu: domain of gmail.com designates 209.85.214.182 as permitted sender) client-ip=209.85.214.182; [email protected]; helo=mail-pl1-f182.google.com; X-Virus-Scanned: Debian amavisd-new at smtp.mydomain.com

Outgoing

Authentication-Results: ubuntu; spf=pass (sender IP is ::1) [email protected] smtp.helo=webmail.mydomain.com Received-SPF: pass (ubuntu: connection is authenticated) X-Virus-Scanned: Debian amavisd-new at MIME-Version: 1.0

myorigin = /etc/mailname // (first line includes server name and checked with cat /etc/mailname)
header_checks = regexp:/etc/postfix/header_checks
smtp_header_checks = pcre:/etc/postfix/smtp_header_checks
body_checks = pcre:/etc/postfix/body_checks
$myhostname = smtp.mydomain.com
smtpd_banner = $myhostname ESMTP $mail_name

smtp_header_checks

/^X-PPP-Message-ID: .*/ IGNORE
/^X-Spam-Status: Yes, score=(1[3-9]\.|[2-9][0-9][0-9.])/ REDIRECT
/^X-Spam-Status:/             IGNORE
/^X-Spam-Checker-Version:/    IGNORE

header_checks

/^X-Spam-Status: Yes, score=(1[3-9]\.|[2-9][0-9][0-9.])/ REDIRECT
/To:.*<>/           DISCARD
/From:.*<>/         DISCARD

I've also did the

ServerTokens Prod
ServerSignature off

After necessary postmap , postfix check, systemctl reload postfix I still have issues and didn't reach the goal(s).

Any Suggestions?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.