29
30
ext_usage(); # before we do anything else, check for --help
32
$| = 1; # unbuffer STDOUT
31
34
Getopt::Long::Configure("bundling_override");
33
'spool:s' => \$G::spool, # exim spool dir
34
'bp' => \$G::mailq_bp, # List the queue (noop - default)
35
'bpa' => \$G::mailq_bpa, # ... with generated address as well
36
'bpc' => \$G::mailq_bpc, # ... but just show a count of messages
37
'bpr' => \$G::mailq_bpr, # ... do not sort
38
'bpra' => \$G::mailq_bpra, # ... with generated addresses, unsorted
39
'bpru' => \$G::mailq_bpru, # ... only undelivered addresses, unsorted
40
'bpu' => \$G::mailq_bpu, # ... only undelivered addresses
41
'and' => \$G::and, # 'and' the criteria (default)
42
'or' => \$G::or, # 'or' the criteria
43
'f:s' => \$G::qgrep_f, # from regexp
44
'r:s' => \$G::qgrep_r, # recipient regexp
45
#'s:s' => \$G::qgrep_s, # match against size field
46
'y:s' => \$G::qgrep_y, # message younger than (secs)
47
'o:s' => \$G::qgrep_o, # message older than (secs)
48
'z' => \$G::qgrep_z, # frozen only
49
'x' => \$G::qgrep_x, # non-frozen only
50
'c' => \$G::qgrep_c, # display match count
51
'l' => \$G::qgrep_l, # long format (default)
52
'i' => \$G::qgrep_i, # message ids only
53
'b' => \$G::qgrep_b, # brief format
54
'flatq' => \$G::flatq, # brief format
55
'show-vars:s' => \$G::show # display the contents of these vars
36
'spool:s' => \$G::spool, # exim spool dir
37
'bp' => \$G::mailq_bp, # List the queue (noop - default)
38
'bpa' => \$G::mailq_bpa, # ... with generated address as well
39
'bpc' => \$G::mailq_bpc, # ... but just show a count of messages
40
'bpr' => \$G::mailq_bpr, # ... do not sort
41
'bpra' => \$G::mailq_bpra, # ... with generated addresses, unsorted
42
'bpru' => \$G::mailq_bpru, # ... only undelivered addresses, unsorted
43
'bpu' => \$G::mailq_bpu, # ... only undelivered addresses
44
'and' => \$G::and, # 'and' the criteria (default)
45
'or' => \$G::or, # 'or' the criteria
46
'f:s' => \$G::qgrep_f, # from regexp
47
'r:s' => \$G::qgrep_r, # recipient regexp
48
's:s' => \$G::qgrep_s, # match against size field
49
'y:s' => \$G::qgrep_y, # message younger than (secs)
50
'o:s' => \$G::qgrep_o, # message older than (secs)
51
'z' => \$G::qgrep_z, # frozen only
52
'x' => \$G::qgrep_x, # non-frozen only
53
'c' => \$G::qgrep_c, # display match count
54
'l' => \$G::qgrep_l, # long format (default)
55
'i' => \$G::qgrep_i, # message ids only
56
'b' => \$G::qgrep_b, # brief format
57
'flatq' => \$G::flatq, # brief format
58
'caseful' => \$G::caseful, # in '=' criteria, respect case
59
'caseless' => \$G::caseless, # ...ignore case (default)
60
'show-vars:s' => \$G::show_vars, # display the contents of these vars
61
'show-rules' => \$G::show_rules, # display compiled match rules
62
'show-tests' => \$G::show_tests # display tests as applied to each message
58
push(@ARGV, "\$sender_address =~ /$G::qgrep_f/") if ($G::qgrep_f);
59
push(@ARGV, "\$recipients =~ /$G::qgrep_r/") if ($G::qgrep_r);
60
push(@ARGV, "\$message_age < $G::qgrep_y") if ($G::qgrep_y);
61
push(@ARGV, "\$message_age > $G::qgrep_o") if ($G::qgrep_o);
62
push(@ARGV, "\$deliver_freeze") if ($G::qgrep_z);
63
push(@ARGV, "!\$deliver_freeze") if ($G::qgrep_x);
64
$G::mailq_bp = $G::mailq_bp; # shut up -w
65
$G::and = $G::and; # shut up -w
66
$spool = $G::spool if ($G::spool);
67
my $count_only = 1 if ($G::mailq_bpc || $G::qgrep_c);
68
my $unsorted = 1 if ($G::mailq_bpr || $G::mailq_bpra || $G::mailq_bpru);
69
my $msg = get_all_msgs($spool, $unsorted);
70
my $crit = process_criteria(\@ARGV);
71
my $e = Exim::SpoolFile->new();
72
my $tcount = 0 if ($count_only);
73
my $mcount = 0 if ($count_only);
65
push(@ARGV, "\$sender_address =~ /$G::qgrep_f/") if ($G::qgrep_f);
66
push(@ARGV, "\$recipients =~ /$G::qgrep_r/") if ($G::qgrep_r);
67
push(@ARGV, "\$shown_message_size eq $G::qgrep_s") if ($G::qgrep_s);
68
push(@ARGV, "\$message_age < $G::qgrep_y") if ($G::qgrep_y);
69
push(@ARGV, "\$message_age > $G::qgrep_o") if ($G::qgrep_o);
70
push(@ARGV, "\$deliver_freeze") if ($G::qgrep_z);
71
push(@ARGV, "!\$deliver_freeze") if ($G::qgrep_x);
72
$G::mailq_bp = $G::mailq_bp; # shut up -w
73
$G::and = $G::and; # shut up -w
75
$G::caseless = $G::caseful ? 0 : 1; # nocase by default, case if both
76
@G::recipients_crit = ();
77
$spool = $G::spool if ($G::spool);
78
my $count_only = 1 if ($G::mailq_bpc || $G::qgrep_c);
79
my $unsorted = 1 if ($G::mailq_bpr || $G::mailq_bpra || $G::mailq_bpru);
80
my $msg = get_all_msgs($spool, $unsorted);
81
my $crit = process_criteria(\@ARGV);
82
my $e = Exim::SpoolFile->new();
83
my $tcount = 0 if ($count_only);
84
my $mcount = 0 if ($count_only);
85
$e->set_undelivered_only(1) if ($G::mailq_bpru || $G::mailq_bpu);
86
$e->set_show_generated(1) if ($G::mailq_bpra || $G::mailq_bpa);
87
$e->output_long() if ($G::qgrep_l);
88
$e->output_idonly() if ($G::qgrep_i);
89
$e->output_brief() if ($G::qgrep_b);
90
$e->output_flatq() if ($G::flatq);
91
$e->set_show_vars($G::show_vars) if ($G::show_vars);
74
92
$e->set_spool($spool);
75
$e->set_undelivered_only(1) if ($G::mailq_bpru || $G::mailq_bpu);
76
$e->set_show_generated(1) if ($G::mailq_bpa || $G::mailq_bpra);
77
$e->output_long() if ($G::qgrep_l);
78
$e->output_idonly() if ($G::qgrep_i);
79
$e->output_brief() if ($G::qgrep_b);
80
$e->output_flatq() if ($G::flatq);
81
$e->set_show_vars($G::show) if ($G::show);
84
95
foreach my $m (@$msg) {
96
next if (scalar(keys(%$G::msg_ids)) && !$G::or
97
&& !$G::msg_ids->{$m->{message}});
85
98
if (!$e->parse_message($m->{message})) {
86
99
warn "Couldn't parse $m->{message}: ".$e->error()."\n";
105
foreach my $c (@G::recipients_crit) { # handle each_recip* vars
106
foreach my $addr (split(/, /, $e->get_var($c->{var}))) {
107
my %t = ( 'cmp' => $c->{cmp}, 'var' => $c->{var} );
108
$t{cmp} =~ s/"?\$var"?/'$addr'/;
109
push(@local_crit, \%t);
112
if ($G::show_tests) { print $e->get_var('message_id'), "\n"; }
92
foreach my $c (@$crit) {
114
foreach my $c (@$crit, @local_crit) {
93
115
my $var = $e->get_var($c->{var});
94
116
my $ret = eval($c->{cmp});
117
if ($G::show_tests) {
118
printf " %25s = '%s'\n %25s => $ret\n",$c->{var},$var,$c->{cmp},$ret;
96
121
print STDERR "Error in eval '$c->{cmp}': $@\n";
147
172
push(@c, { var => lc($v), cmp => "(\$var $o $n) ? 1 : 0" });
148
} elsif (/^(.*?)\s*(=~|!~)\s*(.*)$/) {
173
} elsif (/^(.*?)\s+(=~|!~)\s+(.*)$/) {
149
174
#print STDERR "found as string regexp\n";
150
175
push(@c, { var => lc($1), cmp => "(\"\$var\" $2 $3) ? 1 : 0" });
151
} elsif (/^(.*?)\s*(eq|ne)\s*(.*)$/) {
176
} elsif (/^(.*?)\s+=\s+(.*)$/) {
177
#print STDERR "found as bare string regexp\n";
178
my $case = $G::caseful ? '' : 'i';
179
push(@c, { var => lc($1), cmp => "(\"\$var\" =~ /$2/$case) ? 1 : 0" });
180
} elsif (/^(.*?)\s+(eq|ne)\s+(.*)$/) {
152
181
#print STDERR "found as string cmp\n";
153
push(@c, { var => lc($1), cmp => "(\"\$var\" $2 \"$3\") ? 1 : 0" });
154
} elsif (/^(.*?)\s*=\s*(.*)$/) {
155
#print STDERR "found as bare string regexp\n";
156
push(@c, { var => lc($1), cmp => "(\"\$var\" =~ /$2/) ? 1 : 0" });
182
my $var = lc($1); my $op = $2; my $val = $3;
183
$val =~ s|^(['"])(.*)\1$|$2|;
184
push(@c, { var => $var, cmp => "(\"\$var\" $op \"$val\") ? 1 : 0" });
185
if ($var eq 'message_id' && $op eq "eq") {
186
#print STDERR "short circuit @c[-1]->{cmp} $val\n";
187
$G::msg_ids->{$val} = 1;
157
189
} elsif (/^(!)?(\S+)$/) {
158
190
#print STDERR "found as boolean\n";
159
191
push(@c, { var => lc($2), cmp => "($1\$var) ? 1 : 0" });
712
797
=head1 DESCRIPTION
714
exipick is designed to display the contents of a Exim mail spool based on user-specified criteria. It is designed to mimic the output of 'exim -bp' (or any of the other -bp* options) and Exim's spec.txt should be used to learn more about the exact format of the output. The criteria are formed by creating comparisons against characteristics of the messages, for instance message_size, sender_helo_name, or message_headers.
799
exipick is designed to display the contents of a Exim mail spool based on user-specified criteria. It is designed to mimic the output of 'exim -bp' (or any of the other -bp* options) and Exim's spec.txt should be used to learn more about the exact format of the output. The criteria are formed by creating comparisons against characteristics of the messages, for instance $message_size, $sender_helo_name, or $message_headers.
722
The path to exim's spool directory. In general usage the $spool variable in the script should automatically be set to your site's main spool directory, but this option is useful for alternate installs, or installs on NFS servers, etc.
807
The path to Exim's spool directory. In general usage you should set the $spool variable in the script to your site's main spool directory (and if exipick was installed from the Exim distribution, this is done by default), but this option is useful for alternate installs, or installs on NFS servers, etc.
726
811
A message will be displayed only if it matches all of the specified criteria. This is the default.
730
815
A message will be displayed if it matches any of the specified criteria.
819
By default criteria using the '=' operator are caseless. Specifying this option make them respect case.
821
=item --show-vars <variable>[,<variable>...]
823
Cause the value of each specified variable to be displayed for every message dispayed. For instance, the command "exipick --show-vars '$sender_ident' 'sender_host_address eq 127.0.01'" will show the ident string for every message submitted via localhost. How exactly the variable value is diplayed changes according to what output format you specify.
827
If specified the internal representation of each message criteria is shown. This is primarily used for debugging purposes.
831
If specified, for every message (regardless of matching criteria) the criteria's actual value is shown and the compiled internal eval is shown. This is used primarily for debugging purposes.
835
Change format of output so that every message is on a single line. Useful for parsing with tools such as sed, awk, cut, etc.
732
837
=item The -bp* options all control how much information is displayed and in what manner. They all match the functionality of the options of the same name in Exim. Briefly:
734
839
=item -bp display the matching messages in 'mailq' format.
800
907
Variable of the numeric type can be of integer or float. Valid comparisons are <, <=, >, >=, ==, and !=.
802
The numbers specified in the criteria can have a suffix of d, h, m, s, M, K, or B, in which case the number will be mulitplied by 86400, 3600, 60, 1, 1048576, 1024, or 1 respectively. These suffixes are case sensitive. While these are obviously designed to aid in date and size calculations, they are not restricted to variables of their respective types.
909
The numbers specified in the criteria can have a suffix of d, h, m, s, M, K, or B, in which case the number will be mulitplied by 86400, 3600, 60, 1, 1048576, 1024, or 1 respectively. These suffixes are case sensitive. While these are obviously designed to aid in date and size calculations, they are not restricted to variables of their respective types. That is, though it's odd it's legal to create a criterion of a message being around for 3 kiloseconds: '$message_age >= 3K'.
806
Variables of the boolean type are very easy to use in criteria. The format is either the variable by itself or the variable negated with a ! sign. For instance, 'deliver_freeze' matches if the message in question is frozen, '!deliver_freeze' matches if message is not frozen.
913
Variables of the boolean type are very easy to use in criteria. The format is either the variable by itself or the variable negated with a ! sign. For instance, '$deliver_freeze' matches if the message in question is frozen, '!$deliver_freeze' matches if message is not frozen.
810
String variables are basically defined as those that are neither numeric nor boolean and can contain any data. There are several types of comparisons that can be made against string variables. With the exception of '=', the operators all match the functionality of the like-named perl operators.
812
The simplest form is a bare string regular expression, represented by the operator '='. The value used for the comparison will be evaluated as a regular expression and can be as simple or as complex as desired. For instance 'sender_helo_name = example' on the simple end or 'sender_helo_name = ^aol\.com$ on the more complex end.
814
Slightly more complex is the string comparison with the operators 'eq' and 'ne' for equal and not equal, respectively. 'sender_helo_name eq hotmail.com' is true for messages with the exact helo string "hotmail.com", while 'sender_helo_name ne hotmail.com' is true for any message any helo string other than hotmail.com.
816
The most complex and the most flexible format are straight regular expressions with the operators =~ and !~. The value in the criteria is expected to be a correctly formatted perl regular expression B<including the regexp delimiters (usually //)>. The criterion 'sender_helo_name !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/' matches for any message which does not have an IP address for its helo string.
917
String variables are basically defined as those that are neither numeric nor boolean and can contain any data. The string operators are =, eq, ne, =~, and !~. With the exception of '=', the operators all match the functionality of the like-named perl operators.
919
The simplest form is a bare string regular expression, represented by the operator '='. The value used for the comparison will be evaluated as a regular expression and can be as simple or as complex as desired. For instance '$sender_helo_name = example' on the simple end or '$sender_helo_name = ^aol\.com$' on the more complex end. This comparison is caseless by default, but see the --caseful option to change this.
921
Slightly more complex is the string comparison with the operators 'eq' and 'ne' for equal and not equal, respectively. '$sender_helo_name eq hotmail.com' is true for messages with the exact helo string "hotmail.com", while '$sender_helo_name ne hotmail.com' is true for any message with a helo string other than "hotmail.com".
923
The most complex and the most flexible format are straight regular expressions with the operators '=~' and '!~'. The value in the criteria is expected to be a correctly formatted perl regular expression B<including the regexp delimiters (usually //)>. The criterion '$sender_helo_name !~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/' matches for any message which does not have an IP address for its helo string.
822
With a few exceptions the available variables match Exim's internal expansion variables in both name and exact contents. There are a few notable additions and format deviations which are noted below. Although a brief explanation is offered below, Exim's spec.txt should be consulted for full details. It is important to remember that not every variable will be defined for every message. For example, sender_host_port is not defined for messages not received from a remote host.
929
With a few exceptions the available variables match Exim's internal expansion variables in both name and exact contents. There are a few notable additions and format deviations which are noted below. Although a brief explanation is offered below, Exim's spec.txt should be consulted for full details. It is important to remember that not every variable will be defined for every message. For example, $sender_host_port is not defined for messages not received from a remote host.
824
In the list below, '.' denotes standard messages with contentes matching Exim's variable, '#' denotes standard variables with non-standard contents, and '+' denotes a non-standard variable.
931
In the list below, '.' denotes standard messages with contents matching Exim's variable, '#' denotes standard variables with non-standard contents, and '+' denotes a non-standard variable.
826
933
=head2 Boolean variables
830
=item + deliver_freeze
832
TRUE if the message is frozen.
834
=item . first_delivery
836
TRUE if the message has not been deferred.
838
=item . manually_thawed
937
=item + $allow_unqualified_recipient
939
TRUE if unqualified recipient addresses are permitted in header lines.
941
=item + $allow_unqualified_sender
943
TRUE if unqualified sender addresses are permitted in header lines.
945
=item + $deliver_freeze
947
TRUE if the message is currently frozen.
949
=item . $first_delivery
951
TRUE if the message has never been deferred.
953
=item . $manually_thawed
840
955
TRUE when the message has been manually thawed.
957
=item + $dont_deliver
844
959
TRUE if, under normal circumstances, Exim will not try to deliver the message.
846
=item . host_lookup_failed
848
TRUE if there was an attempt to look up the host's name from its IP address, but the attempt failed.
850
=item + local_error_message
961
=item . $host_lookup_deferred
963
TRUE if there was an attempt to look up the host's name from its IP address, but an error occurred that during the attempt.
965
=item . $host_lookup_failed
967
TRUE if there was an attempt to look up the host's name from its IP address, but the attempt returned a negative result.
969
=item + $local_error_message
852
971
TRUE if the message is a locally-generated error message.
973
=item + $sender_local
856
975
TRUE if the message was locally generated.
858
=item + sender_set_untrusted
977
=item + $sender_set_untrusted
860
979
TRUE if the envelope sender of this message was set by an untrusted local caller.
862
=item . tls_certificate_verified
981
=item . $tls_certificate_verified
864
983
TRUE if a TLS certificate was verified when the message was received.
872
=item . body_linecount
991
=item . $body_linecount
874
993
The number of lines in the message's body.
876
=item + deliver_frozen_at
995
=item . $body_zerocount
997
The number of binary zero bytes in the message's body.
999
=item + $deliver_frozen_at
878
1001
The epoch time at which message was frozen.
880
=item . interface_port
1003
=item . $interface_port
882
1005
The local port number if network-originated messages.
1007
=item . $message_age
886
1009
The number of seconds since the message was received.
888
=item . message_body_size
1011
=item . $message_body_size
890
1013
The size of the body in bytes.
1015
=item . $message_linecount
1017
The number of lines in the entire message (body and headers).
1019
=item . $message_size
894
1021
The size of the message in bytes.
896
=item . originator_gid
1023
=item . $originator_gid
898
1025
The group id under which the process that called Exim was running as when the message was received.
900
=item . originator_uid
1027
=item . $originator_uid
902
1029
The user id under which the process that called Exim was running as when the message was received.
904
=item . received_count
1031
=item . $received_count
906
1033
The number of Received: header lines in the message.
908
=item + received_time
1035
=item . $received_time
910
1037
The epoch time at which the message was received.
912
=item . recipients_count
914
The number of envelope recipients that came with the message.
916
=item . sender_host_port
1039
=item . $recipients_count
1041
The number of envelope recipients for the message.
1043
=item + $recipients_del_count
1045
The number of envelope recipients for the message which have already been delivered. Note that this is the count of original recipients to which the message has been delivered. It does not include generated addresses so it is possible that this number will be less than the number of addresses in the recipients_del string.
1047
=item + $recipients_undel_count
1049
The number of envelope recipients for the message which have not yet been delivered.
1051
=item . $sender_host_port
918
1053
The port number that was used on the remote host for network-originated messages.
920
=item + warning_count
1055
=item + $warning_count
922
1057
The number of delay warnings which have been sent for this message.
930
=item . acl_c0-acl_c9, acl_m0-acl_m9
1065
=item . $acl_c0-$acl_c9, $acl_m0-$acl_m9
932
1067
User definable variables.
934
=item . authenticated_id
1069
=item . $authenticated_id
936
1071
Optional saved information from authenticators, or the login name of the calling process for locally submitted messages.
938
=item . authenticated_sender
1073
=item . $authenticated_sender
940
1075
The value of AUTH= param for smtp messages, or a generated value from the calling processes login and qualify domain for locally submitted messages.
1077
=item + $bmi_verdicts
1079
I honestly don't know what the format of this variable is. It only exists if you have Exim compiled with WITH_CONTENT_SCAN and EXPERIMENTAL_BRIGHTMAIL (and, you know, pay Symantec/Brightmail a bunch of money for the client libs and a server to use them with).
1081
=item + $each_recipients
1083
This is a psuedo variable which allows you to apply a criterion against each address in $recipients individually. This allows you to create criteria against which every individual recipient is tested. For instance, '$recipients =~ /aol.com/' will match if any of the recipient addresses contain the string "aol.com". However, with the criterion '$each_recipients =~ /@aol.com$/', a message will only match if B<every> recipient matches that pattern. Note that this obeys --and or --or being set. Using it with --or is very similar to just matching against $recipients, but with the added benefit of being able to use anchors at the beginning and end of each recipient address.
1085
=item + $each_recipients_del
1087
Like $each_recipients, but for the $recipients_del variable.
1089
=item + $each_recipients_undel
1091
Like $each_recipients, but for the $recipients_undel variable.
944
1095
The value of the same named message header, for example header_to or header_reply-to. These variables are really closer to Exim's rheader_* variables, with the exception that leading and trailing space is removed.
946
=item . interface_address
1097
=item . $interface_address
948
1099
The address of the local IP interface for network-originated messages.
950
=item . local_scan_data
1101
=item . $local_scan_data
952
1103
The text returned by the local_scan() function when a message is received.
1105
=item # $message_body
956
1107
The message's body. Unlike Exim's variable of the same name, this variable contains the entire message body. The logic behind this is that the message body is not read unless it is specifically referenced, so under normal circumstances it is not a penalty, but when you need the entire body you need the entire body. Like Exim's copy, newlines and nulls are replaced by spaces.
958
=item . message_headers
1109
=item . $message_headers
960
1111
A concatenation of all the header lines except for lines added by routers or transports.
964
1115
The unique message id that is used by Exim to identify the message.
966
=item + originator_login
1117
=item + $originator_login
968
1119
The login of the process which called Exim.
970
=item . received_protocol
1121
=item . $received_protocol
972
1123
The name of the protocol by which the message was received.
976
1127
The list of envelope recipients for a message. Unlike Exim's version, this variable always contains every envelope recipient of the message. The recipients are separated by a comma and a space.
978
=item + recipients_del
980
The list of delivered envelope recipients for a message. This non-standard variable is in the same format as recipients and contains the list of already-delivered recipients.
982
=item + recipients_undel
1129
=item + $recipients_del
1131
The list of delivered envelope recipients for a message. This non-standard variable is in the same format as recipients and contains the list of already-delivered recipients including any generated addresses.
1133
=item + $recipients_undel
984
1135
The list of undelivered envelope recipients for a message. This non-standard variable is in the same format as recipients and contains the list of undelivered recipients.
986
=item . reply_address
1137
=item . $reply_address
988
1139
The contents of the Reply-To: header line if one exists and it is not empty, or otherwise the contents of the From: header line.
990
=item . sender_address
1141
=item . $sender_address
992
1143
The sender's address that was received in the message's envelope. For bounce messages, the value of this variable is the empty string.
994
=item . sender_address_domain
996
The domain part of sender_address.
998
=item . sender_address_local_part
1000
The local part of sender_address.
1002
=item . sender_helo_name
1145
=item . $sender_address_domain
1147
The domain part of $sender_address.
1149
=item . $sender_address_local_part
1151
The local part of $sender_address.
1153
=item . $sender_helo_name
1004
1155
The HELO or EHLO value supplied for smtp or bsmtp messages.
1006
=item . sender_host_address
1157
=item . $sender_host_address
1008
1159
The remote host's IP address.
1010
=item . sender_host_authenticated
1161
=item . $sender_host_authenticated
1012
1163
The name of the authenticator driver which successfully authenticated the client from which the message was received.
1014
=item . sender_host_name
1165
=item . $sender_host_name
1016
1167
The remote host's name as obtained by looking up its IP address.
1018
=item . sender_ident
1169
=item . $sender_ident
1020
1171
The identification received in response to an RFC 1413 request for remote messages, the login name of the user that called Exim for locally generated messages.
1173
=item + $shown_message_size
1175
This non-standard variable contains the formatted size string. That is, for a message whose $message_size is 66566 bytes, $shown_message_size is 65K.
1177
=item . $smtp_active_hostname
1179
The value of the active host name when the message was received, as specified by the "smtp_active_hostname" option.
1183
The spam score of the message, for example '3.4' or '30.5'. (Requires exiscan or WITH_CONTENT_SCAN)
1185
=item . $spam_score_int
1187
The spam score of the message, multiplied by ten, as an integer value. For instance '34' or '305'. (Requires exiscan or WITH_CONTENT_SCAN)
1024
1191
The cipher suite that was negotiated for encrypted SMTP connections.
1028
1195
The value of the Distinguished Name of the certificate if Exim is configured to request one.