Sanitize authenticated client info Postfix mail header

I need to sanitize (replace) the IP address and host name from authenticated clients in the email header generated by Postfix. Gmail is able to do it with their mail servers, so certainly know it is possible. I consider myself a moderate expert on Postfix, and have been administering it for several years now on a production server.

Postfix faq states to use the header_checks(5) REPLACE action to sanitize information.

However, I am concerned that this will replace all the client IP addresses and hostname. I want to only replace (rewrite) the headers for SASL authenticated clients.

I saw this on a post somewhere:

/^Received: from \S+ \(\S+ \[[.\d]+\]\)(.*)/ REPLACE

Received: from localhost (localhost [])${1}

"This picks up the rest of the header after hiding the HELO name and IP address with localhost and "

Again, I am not convinced that this does not rewrite the header for all email clients. I also do not want this to break the DKIM milter that is in place.

So, am looking for a Postfix guru that has actually done this in a similar manner that Gmail does, and is confident that this won't break a production mail server.

All I need are a few lines in the Postfix config. Please be prepared to send me an email or example of an email from a Postfix or Sendmail server you have configured, showing that the *authenticated* connecting client IP and hostname info has been sanitized.

Thank you for your interest.

Habilidades: Segurança de computadores, Linux, Perl, Administrador do Sistema, Segurança na rede

Veja mais: postfix sanitize headers, postfix replace localhost hostname header, thank you mail, mail guru, information guru, client expert, postfix sanitize localhost headers, postfix rewrite header authenticated client, sanitize replace, hiding address sasl authenticated postfix, postfix, picks, moderate, mail client, info, gmail client, email client, connecting server, gmail host, mail send client, perl rest, send info, system production, post header, generated mail

Acerca do Empregador:
( 1 comentário ) Honolulu, United States

ID do Projeto: #555212

3 freelancers estão ofertando em média $92 para esse trabalho


Hi. See PM

$95 USD in 7 dias
(6 Comentários)

Can be done. In case that just tunning the postfix conf file can't solve the problem, we can program a kind of custom postfix filter.

$120 USD in 5 dias
(0 Comentários)

i have exactly this already working on my own mail-server, would be happy to set it up on yours aswell.

$60 USD em 1 dia
(0 Comentários)