X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fexipick.src;h=bdeba95fc66488c66fe23f3c92741ebdd7ba965e;hb=f10e2052dc60814e241eda952149459674906cdf;hp=811092dc142bde6b904c00f8f8383ba60576e6ec;hpb=3634fc257bd0667daef14d72005cd87c735bbb24;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/exipick.src b/src/src/exipick.src index 811092dc1..bdeba95fc 100644 --- a/src/src/exipick.src +++ b/src/src/exipick.src @@ -1,7 +1,9 @@ #!PERL_COMMAND -# This variable should be set by the building process to Exim's spool directory. -my $spool = 'SPOOL_DIRECTORY'; +# This variables should be set by the building process +my $spool = 'SPOOL_DIRECTORY'; # may be overridden later +my $exim = 'BIN_DIRECTORY/exim'; + # Need to set this dynamically during build, but it's not used right now anyway. my $charset = 'ISO-8859-1'; @@ -111,7 +113,9 @@ $G::and = $G::and; # shut up -w $G::msg_ids = {}; # short circuit when crit is only MID $G::caseless = $G::caseful ? 0 : 1; # nocase by default, case if both @G::recipients_crit = (); # holds per-recip criteria -$spool = $G::spool if ($G::spool); +$spool = defined $G::spool ? $G::spool + : do { chomp($_ = `$exim -n -bP spool_directory`); + $_ // $spool }; my $input_dir = $G::input_dir || ($G::finput ? "Finput" : "input"); my $count_only = 1 if ($G::mailq_bpc || $G::qgrep_c); my $unsorted = 1 if ($G::mailq_bpr || $G::mailq_bpra || @@ -955,6 +959,8 @@ sub _parse_header { $self->{_vars}{tls_cipher} = $arg; } elsif ($tag eq '-tls_peerdn') { $self->{_vars}{tls_peerdn} = $arg; + } elsif ($tag eq '-tls_sni') { + $self->{_vars}{tls_sni} = $arg; } elsif ($tag eq '-host_address') { $self->{_vars}{sender_host_port} = $self->_get_host_and_port(\$arg); $self->{_vars}{sender_host_address} = $arg; @@ -1018,6 +1024,12 @@ sub _parse_header { return($self->_error("incorrect format: $_")) if (length($2) != $3); $self->{_recips}{$1} = { pno => $4, errors_to => $2 }; $addr = $1; + } elsif (/^(\S*)\s(\S*)\s(\d+),(\d+)\s(\S*)\s(\d+),(-?\d+)#3$/) { + #print STDERR "exim4 new type #3 DSN (untested): $_\n"; + return($self->_error("incorrect format: $_")) + if ((length($2) != $3) || (length($5) != $6)); + $self->{_recips}{$1} = { pno => $7, errors_to => $5 }; + $addr = $1; } elsif (/^.*#(\d+)$/) { #print STDERR "exim4 #$1 style (unimplemented): $_\n"; $self->_error("exim4 #$1 style (unimplemented): $_"); @@ -1419,7 +1431,8 @@ Same as '$shown_message_size eq ' (exiqgrep) =item --spool -Set the path to the exim spool to use. This value will have the argument to --input or 'input' appended, or be ignored if --input is a full path. +Set the path to the exim spool to use. This value will have the argument to --input or 'input' appended, or be ignored if --input is a full path. If not specified, exipick uses the value from C, and if this fails, the F +from build time (F) is used. =item --show-rules @@ -1793,6 +1806,10 @@ The cipher suite that was negotiated for encrypted SMTP connections. The value of the Distinguished Name of the certificate if Exim is configured to request one +=item S . $tls_sni + +The value of the Server Name Indication TLS extension sent by a client, if one was sent. + =item N + $warning_count The number of delay warnings which have been sent for this message.