Hmm, I just discovered this sitting in my drafts folder... On 2016/04/27 13:23, Giovanni Bechis wrote: > This is a perl DMARC implemetation rolled up into a milter or into an smtp > proxy.
Looking at the third hunk in patch-lib_Mail_Milter_Authentication_Client_pm | @@ -310,7 +314,9 @@ sub process { | while ( @process_header ) { | my $key = shift @process_header; | my $value = shift @process_header; | - $header_string .= "$key: $value\015\012"; | + if ( defined $value ) { | + $header_string .= "$key: $value\015\012"; | + } | } | my $header_obj = Email::Simple::Header->new( $header_string ); | $self->{'message_object'}->header_obj_set( $header_obj ); ... this is bad because $header_string won't get set if there's a key without a value, whereas we do want it set. I've changed it to this: | while ( @process_header ) { | my $key = shift @process_header; | my $value = shift @process_header; | + $value //= ''; | $header_string .= "$key: $value\015\012"; i.e. if $value is undefined just set it to ''. (I also tweaked the others to read more naturally, using "foo if $..." rather than a multiline "if"). New tgz attached. I think this one is OK to import, but I'd like to see the patches go upstream and see if they have comments or changes to them.
p5-Mail-Milter-Authentication.tgz
Description: application/tar-gz