1

I need to remove the software name in the email header. Every time when I send the emails, the postfix server sent emails at the destination the emails headers include the following:

by mail.example.dev (Postfix) with ESMTPSA id 79D412E1A3A

How can I remove the (Postfix) information?

My idea is to send the emails without telling the SMTP server of what software I used to send the email. I tried to set a header check to REPLACE this but it doesn't seem to work.

Here is what I have used in the mime_header_checks when I used each of them:

/^.*\(Postfix\).*/ REPLACE
/^(.*)(Postfix)(.*)/ REPLACE ${1} ${2}
/^.*Postfix.*/ REPLACE ${1}${2}
/^(.*)(Postfix)(.*)/ REPLACE ${1}test${2}
/^\s*(Postfix)[^\n]*(.*)/ REPLACE $1
/^.*Postfix.* IGNORE
/\(Postfix\)(.*) IGNORE
/\(Postfix\)(.*)/ IGNORE
/^*.Postfix .*/ IGNORE

I've change my main.cf to include:

header_checks = regexp:/etc/postfix/mime_header_checks

Do you know how I could remove the (Postfix) information?

If you know how I can remove it, do you know what I need to input and what file in order to get the `(Postfix) information to be removed in the header?

1

From man 5 postconf

 mail_name (default: Postfix)
     The mail system name that is displayed in  Received:  headers,  in  the
     SMTP greeting banner, and in bounced mail.
  • Thank you for post the information. Do you know in which file I can find it? like I mean in /etc/postfix/whateveritis? – Robert Jones Dec 1 '18 at 20:16
  • The file to edit on CentOs 7 is /etc/postfix/main.cf. This line won't be there, by default, so you'll need to add it. Then run postfix reload to tell postfix to pick up the changes. – Stephen Harris Dec 1 '18 at 20:25
0

You can check config file /etc/postfix/main.cf and search for line like:

header_checks = pcre:/etc/postfix/header_checks.pcre

Where you can enter command like REGEX to search for particular string and replace it, ignore it, etc.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.