equal
deleted
inserted
replaced
1 #! /usr/bin/perl |
1 #! /usr/bin/perl |
2 # © Heiko Schlittermann <hs@schlittermann.de> |
2 # © Heiko Schlittermann <hs@schlittermann.de> |
3 # Sources: https://keller.schlittermann.de/hg/exim-checks |
3 # global source: https://keller.schlittermann.de/hg/exim-checks |
|
4 # local source : |
|
5 |
4 use strict; |
6 use strict; |
5 use warnings; |
7 use warnings; |
6 |
8 |
7 use Perl6::Slurp; |
9 use Perl6::Slurp; |
8 use File::Temp; |
10 use File::Temp; |
13 |
15 |
14 my $ME = basename $0; |
16 my $ME = basename $0; |
15 |
17 |
16 my $opt_init = 0; |
18 my $opt_init = 0; |
17 my $opt_refresh = 0; |
19 my $opt_refresh = 0; |
18 my $opt_dir = \'dirname($opt_config) . "/lib"'; |
20 my $opt_dir = \'dirname($opt_config) . "/checks"'; |
19 |
21 |
20 my $opt_config = undef; |
22 my $opt_config = undef; |
21 my $opt_exim = undef; |
23 my $opt_exim = undef; |
22 |
24 |
23 MAIN: { |
25 MAIN: { |
123 |
125 |
124 check - checks exim routing agains pre-defined values |
126 check - checks exim routing agains pre-defined values |
125 |
127 |
126 =head1 SYNOPSIS |
128 =head1 SYNOPSIS |
127 |
129 |
|
130 check [options] [<address>...] |
|
131 |
128 check [options] -i|--init <address>... |
132 check [options] -i|--init <address>... |
129 check [options] [<address>...] |
|
130 check [options] -r|--refresh <address>... |
133 check [options] -r|--refresh <address>... |
|
134 |
131 check {-h|-m}|{--help|--man} |
135 check {-h|-m}|{--help|--man} |
132 |
136 |
133 =head1 DESCRIPTION |
137 =head1 DESCRIPTION |
134 |
138 |
135 This tools calls exim4 and checks the output of C<exim4 -v -bv <address>> |
139 This tools calls exim4 and checks the output of C<exim4 -v -bv <address>> |
144 The location of the exim config to use. (default: autodetected by C<exim |
148 The location of the exim config to use. (default: autodetected by C<exim |
145 -bV>) |
149 -bV>) |
146 |
150 |
147 =item B<-d>|B<--dir> I<directory> |
151 =item B<-d>|B<--dir> I<directory> |
148 |
152 |
149 The directory containing the checks (default: C<dirname($config)/lib>) |
153 The directory containing the checks (default: C<dirname($config)/checks>) |
150 |
154 |
151 =item B<-i>|B<--init> |
155 =item B<-i>|B<--init> I<address> |
152 |
156 |
153 Initialize the tests (run them for the first time and remember |
157 Initialize the tests (run them for the first time and remember |
154 the results. (default: not used) |
158 the results. (default: not used) |
155 |
159 |
156 =item B<-r>|B<--refresh> |
160 =item B<-r>|B<--refresh> I<address> |
157 |
161 |
158 Refresh the results (should be used after a verified change). |
162 Refresh the results (should be used after a verified change). |
159 (default: not used) |
163 (default: not used) |
160 |
164 |
161 =item B<--exim> I<binary_file> |
165 =item B<--exim> I<binary_file> |