[Mimedefang] received headers ofuscation

ulver@localdomain.cl ulver.woeman at gmail.com
Wed Nov 25 12:01:06 EST 2009

many thanks Steffen,  with these really short piece of code the job
it's almost complete  (on sub filter_end)

if(open(H, '<', 'HEADERS')) {
      while(<H>) {
      next unless s/\Areceived:\s//i;
      ~ s/(\([0-9]{1,}\.[0-9]{2,}\.[0-9]{1,}\/[0-9]{1,}\.[0-9]{2,}\.[0-9]{1,}\/.*\)|\(Postfix\))//ig;
      ~ s/\s{2,}/ /ig;
      action_add_header('Received', $_);
      unless(close H) {
      send_short_message_to_admin("Hey admin, something is wrong here: $!");
      return action_tempfail('internal server error');

but the lastone received header still remains the sendmail version,
(yeah it's local i know it) and if don't misunderstood how milter
works the only way to hide the last received is in sendmail.cf in the
section related how the header it's wrote or am i wrong?

i mean ,something like that

$.by $?r with $r$. id $i$?{tls_version} #
$.by $j ($v/$Z)$?r with $r$. id $i$?{tls_version} # original piece config line

More information about the MIMEDefang mailing list