[Mimedefang] received headers ofuscation
ulver
ulver.woeman at gmail.com
Tue Nov 24 16:35:50 EST 2009
thanks guys!!, following your advices (and googling a lot) i achieve these piece of code (on filter_end)
$header_object = $entity->head;
$received_1st = $header_object->get('Received',0);
md_syslog('info', "Received headers: $received_1st"); #4-debug
$received_1st =~ s/(\(8\.13\.8\/8\.13\.8\/.*\)|\(Postfix\))//g;#yeah the regexp could be more general
$received_1st =~ s/\s{2,}/ /g;
$received_1st =~ s/\n$//g;
action_change_header('Received', "$received_1st",0);
with this i'm able to change the very first received header ..but not the rest of the received lines... :S
if i try with something such as (after the first piece of code)
$received_2nd = $header_object->get('Received',1);
md_syslog('info', "Received headers: $received_2nd");
$received_2nd =~ s/(\(8\.13\.8\/8\.13\.8\/.*\)|\(Postfix\))//g;
$received_2nd =~ s/\s{2,}/ /g;
$received_2nd =~ s/\n$//g;
action_change_header('Received', "$received_2nd",1);
i got an ...nice Slave 0 stderr: Can't use an undefined value as a SCALAR reference at.....
could someone help me ? or could someone tell me where would i read in order to understand how $entity->head works?
More information about the MIMEDefang
mailing list