Update to mirmon 2.3
authorNigel Metheringham <nigel@exim.org>
Tue, 22 Jun 2010 20:01:03 +0000 (21:01 +0100)
committerNigel Metheringham <nigel@exim.org>
Tue, 22 Jun 2010 20:01:03 +0000 (21:01 +0100)
45 files changed:
icons/mmsb01.gif
icons/mmsb02.gif
icons/mmsb03.gif
icons/mmsb04.gif
icons/mmsb05.gif
icons/mmsb06.gif
icons/mmsb07.gif
icons/mmsb08.gif
icons/mmsb09.gif
icons/mmsb10.gif
icons/mmsb11.gif
icons/mmsb12.gif
icons/mmsb13.gif
icons/mmsb14.gif
icons/mmsbf01.gif
icons/mmsbf02.gif
icons/mmsbf03.gif
icons/mmsbf04.gif
icons/mmsbf05.gif
icons/mmsbf06.gif
icons/mmsbf07.gif
icons/mmsbf08.gif
icons/mmsbf09.gif
icons/mmsbf10.gif
icons/mmsbf11.gif
icons/mmsbf12.gif
icons/mmsbf13.gif
icons/mmsf01.gif
icons/mmsf02.gif
icons/mmsf03.gif
icons/mmsf04.gif
icons/mmsf05.gif
icons/mmsf06.gif
icons/mmsf07.gif
icons/mmsf08.gif
icons/mmsf09.gif
icons/mmsf10.gif
icons/mmsf11.gif
icons/mmsf12.gif
icons/mmsf13.gif
icons/mmsf14.gif
icons/vbrb.gif [new file with mode: 0644]
icons/vbrw.gif [new file with mode: 0644]
mirmon/countries.list
mirmon/probe [new file with mode: 0755]

index a07d76fda165ca729291061bb42257f1634384b7..369227236129214b9544d177757bcd15ee6261c3 100644 (file)
Binary files a/icons/mmsb01.gif and b/icons/mmsb01.gif differ
index e13dbe0a62c8e528ff0ee49be1dd432af0ad3ce0..f9e03270c2314873e30a585adae185f99fa369d7 100644 (file)
Binary files a/icons/mmsb02.gif and b/icons/mmsb02.gif differ
index 372bdccb444fa9079ac13ec41bb6c63c036c2b8e..0926abf917ee95391ccd88ba09fd9d801a91790b 100644 (file)
Binary files a/icons/mmsb03.gif and b/icons/mmsb03.gif differ
index 09ebdafac34737dc99b7f71c70a9d7d5c608b470..ba60d351494eda8532f66ab7598419fa80579300 100644 (file)
Binary files a/icons/mmsb04.gif and b/icons/mmsb04.gif differ
index d764236ef9fe952db13034dff91a4f551f6f258e..f52e2170eabf67fccf640aeb7c939f56ef0ceed1 100644 (file)
Binary files a/icons/mmsb05.gif and b/icons/mmsb05.gif differ
index 575b39093081db608a4d9773a55ceaf629142ef2..b7f99bf666296466d357be5691916687790f8724 100644 (file)
Binary files a/icons/mmsb06.gif and b/icons/mmsb06.gif differ
index bb8f06956495ce2f7ee181be3d7b07c786bb75b5..e2154ca629583ddb1ebe6ca99808ed4acd94e5a1 100644 (file)
Binary files a/icons/mmsb07.gif and b/icons/mmsb07.gif differ
index e3daf4aae3b62bc9ac93822ee975b07424c13d28..9fe28f9529ecea6797e1d68ff24e25dc47dda637 100644 (file)
Binary files a/icons/mmsb08.gif and b/icons/mmsb08.gif differ
index e436e3ec7766d1513e3f538533ae40566add5c9c..19c57bd98849418d855dccabcf096877198ef6fc 100644 (file)
Binary files a/icons/mmsb09.gif and b/icons/mmsb09.gif differ
index 1c018f61162fe0252ece138f7706eecd0ceaf54d..4576fc11dbbcb7957e09b551267fe30127952ef6 100644 (file)
Binary files a/icons/mmsb10.gif and b/icons/mmsb10.gif differ
index 26857fe761153184d2f21a5a6aafe804a989e8cf..4f4557078a73e422ffeb1e4cdfb9c6dda84ccf9d 100644 (file)
Binary files a/icons/mmsb11.gif and b/icons/mmsb11.gif differ
index 451b38280002422850751b8552ac8ea5996b8c7a..d6e50ae2b0e937c4db8076cb113da5229a6abf0c 100644 (file)
Binary files a/icons/mmsb12.gif and b/icons/mmsb12.gif differ
index 2631d8c17c1b3b66ba4a68f1f1accc9130c9c9a4..476f259897d7bfcdaa77c1de344c76bef2c4999e 100644 (file)
Binary files a/icons/mmsb13.gif and b/icons/mmsb13.gif differ
index a6549e6a43a48e1f183b155e5f0452a62cce3ba8..87078a6dc9b4214ea62e9fe13e9ac974c2f77db8 100644 (file)
Binary files a/icons/mmsb14.gif and b/icons/mmsb14.gif differ
index b98b0d4d639962ae04f6aa8efa2bc8a0d38764b5..b462110de67b28172762c66009fb97fcbc784fc1 100644 (file)
Binary files a/icons/mmsbf01.gif and b/icons/mmsbf01.gif differ
index 4fbffe26cb132f84b0b48596dc13ff50ecdc9370..dec068a3976d2f3b672691bf759f3b29b3824334 100644 (file)
Binary files a/icons/mmsbf02.gif and b/icons/mmsbf02.gif differ
index bca751adffa8f5b1c28ba30fc5567e1246fd343b..9bf0817c55d261f4a4d31cca0ca948bb917be9c4 100644 (file)
Binary files a/icons/mmsbf03.gif and b/icons/mmsbf03.gif differ
index 6a8b62e8298141d8c53d1f6c83efb47e5d6be8c9..e048707a4830b9f2a8333a111fa4aa549b534084 100644 (file)
Binary files a/icons/mmsbf04.gif and b/icons/mmsbf04.gif differ
index 0b2cf1f07498336f6d2648846e323cf689cfbd16..2b7720117d40e23f32a52d6e6e6889cecb3af9af 100644 (file)
Binary files a/icons/mmsbf05.gif and b/icons/mmsbf05.gif differ
index 86f957577e67c4af01af2bf6064f4556cdc1ddae..c569c25b0a8139d17d0406bfc9255f3f82816edd 100644 (file)
Binary files a/icons/mmsbf06.gif and b/icons/mmsbf06.gif differ
index 4bb061d6aa73fe49cabb1044ef6f325bda8b854b..6ee5a5ab777a7f9446b18ffbe1b62d01bab150f9 100644 (file)
Binary files a/icons/mmsbf07.gif and b/icons/mmsbf07.gif differ
index 9c70b49ff8f6c334d9cbc7f0807b559dedc759e2..63054718e2274a6ca6188bc1a79b05051a38ed96 100644 (file)
Binary files a/icons/mmsbf08.gif and b/icons/mmsbf08.gif differ
index 67234e3a50ff898b8e1a7052b9b9cdbcbcbd70fa..eafd0bb5c29bf3b28796b2bdd7a14398fc46552f 100644 (file)
Binary files a/icons/mmsbf09.gif and b/icons/mmsbf09.gif differ
index cab66ebefe817e398895a8f95ffe04028953095f..c010ef9a197a08cbd238b0eebbaa27be76cd818a 100644 (file)
Binary files a/icons/mmsbf10.gif and b/icons/mmsbf10.gif differ
index 151c44b5a7d01b68eebd6688347f3bc09044e65f..de55904c6645fa64a7463376c404c566afe54b4c 100644 (file)
Binary files a/icons/mmsbf11.gif and b/icons/mmsbf11.gif differ
index 713c3ce17b628da2b8cfd2705d485d5bdd446161..232741fec694b089a4ebc3d6ee7b06bfb6e3ee3c 100644 (file)
Binary files a/icons/mmsbf12.gif and b/icons/mmsbf12.gif differ
index 563866ebd5b8e63733f2cab6b85452b64bcba758..9067106d114a24508d32e10ce4f6c9af59c0e634 100644 (file)
Binary files a/icons/mmsbf13.gif and b/icons/mmsbf13.gif differ
index 3f96f91e8eba690bbf618bd0b280e7d182d51f40..d57ae04b1aeaaf610cce79ba5826e6393676b030 100644 (file)
Binary files a/icons/mmsf01.gif and b/icons/mmsf01.gif differ
index b62e6e06538aa2e0de1f2d71eb84e8e350140a1f..0891de0faf0eeb913bc8345e8bee71194ddd006f 100644 (file)
Binary files a/icons/mmsf02.gif and b/icons/mmsf02.gif differ
index 3ebf5c36b14fc8de1074776b45c5684147c81422..f5abb21935ae57f11bd1471e5fe82a6c21750573 100644 (file)
Binary files a/icons/mmsf03.gif and b/icons/mmsf03.gif differ
index 94cf762d404e2366f130da047ad7875954aa28a1..b3f8c7da63bda24137149e2f724409122f21f6ec 100644 (file)
Binary files a/icons/mmsf04.gif and b/icons/mmsf04.gif differ
index a558eb9eac3490885a0f5e9ca5d58f364ba0c389..4ea5d62340987205a5ba4ca12fd0acbe72a07b44 100644 (file)
Binary files a/icons/mmsf05.gif and b/icons/mmsf05.gif differ
index a1cd47c5c3c57be057cbf4181ae7c829c2f6952c..ff828dddaa7e1373fda17100a60112c38bbda968 100644 (file)
Binary files a/icons/mmsf06.gif and b/icons/mmsf06.gif differ
index ddf4a43f9bfe0e64adcce0d8a3d975b793832046..f48dd1bffe519f7de46c2783879a16add7dc83e3 100644 (file)
Binary files a/icons/mmsf07.gif and b/icons/mmsf07.gif differ
index 4976f10f11d12ab38f0cef18d8661de50a0bc711..833c371e49529be0f94000e55bcb3c16873777ab 100644 (file)
Binary files a/icons/mmsf08.gif and b/icons/mmsf08.gif differ
index fb8560f82a84afe934e9fd30c2488a3fe3dd7dd0..cf9971fbaf241e7f8122162850e6abd7918597aa 100644 (file)
Binary files a/icons/mmsf09.gif and b/icons/mmsf09.gif differ
index 362424fb1177ad6ed66e1922fe0c402331b80442..eeeb1e4249d1d881b862d05d4f66a8b3bd9a12ec 100644 (file)
Binary files a/icons/mmsf10.gif and b/icons/mmsf10.gif differ
index 4e1b8c022c70837c1754c3ca57c71cb75b79e0ac..a614bc64004d6e7999a1a48495736d54e986b28b 100644 (file)
Binary files a/icons/mmsf11.gif and b/icons/mmsf11.gif differ
index 0335cff4428b48021c52380f46610ed9b5e2c23e..ef741a1dbf4f846c646a480657be9719549abeaa 100644 (file)
Binary files a/icons/mmsf12.gif and b/icons/mmsf12.gif differ
index b81b556cd0660f3318006bbff5e4296d83f68ea8..f28956259d7018c9f22c76a861f334d5af780592 100644 (file)
Binary files a/icons/mmsf13.gif and b/icons/mmsf13.gif differ
index fbe50521e2383b6250350fcd4cbf868642d56553..cf4346b4e871991b82c94b7f3d944650661e7a86 100644 (file)
Binary files a/icons/mmsf14.gif and b/icons/mmsf14.gif differ
diff --git a/icons/vbrb.gif b/icons/vbrb.gif
new file mode 100644 (file)
index 0000000..2aa7073
Binary files /dev/null and b/icons/vbrb.gif differ
diff --git a/icons/vbrw.gif b/icons/vbrw.gif
new file mode 100644 (file)
index 0000000..ecc6917
Binary files /dev/null and b/icons/vbrw.gif differ
index 9eef8fc3ba9c5ff8863a4ad544f61299fe1e2ae0..988bea9547b6996571b75c7db70c1543137431f1 100644 (file)
@@ -1,4 +1,4 @@
-# List of countries
+# based on : http://www.iso.org/iso/list-en1-semic-3.txt
 ad - andorra
 ae - united arab emirates
 af - afghanistan
 ad - andorra
 ae - united arab emirates
 af - afghanistan
@@ -26,7 +26,7 @@ bi - burundi
 bj - benin
 bm - bermuda
 bn - brunei darussalam
 bj - benin
 bm - bermuda
 bn - brunei darussalam
-bo - bolivia
+bo - bolivia, plurinational state of
 br - brazil
 bs - bahamas
 bt - bhutan
 br - brazil
 bs - bahamas
 bt - bhutan
@@ -40,7 +40,6 @@ cd - congo, the democratic republic of the
 cf - central african republic
 cg - congo
 ch - switzerland
 cf - central african republic
 cg - congo
 ch - switzerland
-ci - cote d'ivoire
 ck - cook islands
 cl - chile
 cm - cameroon
 ck - cook islands
 cl - chile
 cm - cameroon
@@ -136,6 +135,7 @@ ma - morocco
 mc - monaco
 md - moldova, republic of
 me - montenegro
 mc - monaco
 md - moldova, republic of
 me - montenegro
+mf - saint martin
 mg - madagascar
 mh - marshall islands
 mk - macedonia, the former yugoslav republic of
 mg - madagascar
 mh - marshall islands
 mk - macedonia, the former yugoslav republic of
@@ -182,7 +182,6 @@ pt - portugal
 pw - palau
 py - paraguay
 qa - qatar
 pw - palau
 py - paraguay
 qa - qatar
-re - reunion
 ro - romania
 rs - serbia
 ru - russian federation
 ro - romania
 rs - serbia
 ru - russian federation
@@ -193,7 +192,7 @@ sc - seychelles
 sd - sudan
 se - sweden
 sg - singapore
 sd - sudan
 se - sweden
 sg - singapore
-sh - saint helena
+sh - saint helena, ascension and tristan da cunha
 si - slovenia
 sj - svalbard and jan mayen
 sk - slovakia
 si - slovenia
 sj - svalbard and jan mayen
 sk - slovakia
@@ -231,7 +230,7 @@ uy - uruguay
 uz - uzbekistan
 va - holy see (vatican city state)
 vc - saint vincent and the grenadines
 uz - uzbekistan
 va - holy see (vatican city state)
 vc - saint vincent and the grenadines
-ve - venezuela
+ve - venezuela, bolivarian republic of
 vg - virgin islands, british
 vi - virgin islands, u.s.
 vn - viet nam
 vg - virgin islands, british
 vi - virgin islands, u.s.
 vn - viet nam
diff --git a/mirmon/probe b/mirmon/probe
new file mode 100755 (executable)
index 0000000..717cb16
--- /dev/null
@@ -0,0 +1,76 @@
+#! /usr/bin/perl -w
+
+use strict ;
+
+my $WGET  = '/usr/bin/wget' ;
+my $RSYNC = '/usr/bin/rsync' ;
+
+my $timeout = 300 ;
+my $tmp_dir = '/tmp/mirmon' ;
+
+my $prog = substr($0,rindex($0,'/')+1) ;
+my $Usage = <<USAGE ;
+Usage: $prog [-v] [-q] [-d] [-t timeout] url
+option v : be verbose
+option q : be quiet
+option d : show debug info
+option t : timeout in seconds (default $timeout)
+argument url :
+  rysnc://host.dom.com/module/file
+   http://host.dom.com/some/file
+    ftp://host.dom.com/some/file
+USAGE
+sub Usage { die "$_[0]$Usage" ; }
+sub Error { die "$prog: $_[0]\n" ; }
+sub Warn  { warn "$prog: $_[0]\n" ; }
+
+# usage: &GetOptions(ARG,ARG,..) defines $opt_ID as 1 or user spec'ed value
+# usage: &GetOptions(\%opt,ARG,ARG,..) defines $opt{ID} as 1 or user value
+# ARG = 'ID' | 'ID=SPC' | 'ID:SPC' for no-arg, required-arg or optional-arg
+# ID  = perl identifier
+# SPC = i|f|s for integer, fixedpoint real or string argument
+
+use Getopt::Long ;
+Getopt::Long::config('no_ignore_case') ;
+my %opt = () ; Usage('') unless GetOptions
+  ( \%opt, qw(v q d t=i) ) ;
+Usage("Arg count\n") unless @ARGV == 1 ;
+
+my $url = shift ;
+$timeout = $opt{t} if exists $opt{t} ;
+$opt{v} ||= $opt{d} ;
+
+my $opt_v = '' ; $opt_v = '-v' if $opt{v} ;
+my $opt_q = '' ; $opt_q = '-q' if $opt{q} ;
+
+# make a tmp dir for rsync
+
+-d $tmp_dir or mkdir $tmp_dir or Error "can't mkdir $tmp_dir ($!)" ;
+
+# handle rsync urls with rsync
+#  rewrite rysnc://host.dom.com/module/file -> host.dom.com::module/file
+# handle ftp/http urls with wget
+
+if ( $url =~ m!^rsync://(.*)$! )
+  { my $src = $1 ;
+    my $dst = $src ;
+    $dst =~ s![/\s]!_!g ;
+    my $TMP = "$tmp_dir/$dst" ;
+    $src =~ s!/!::! ;
+    unlink $TMP ; # ignore status
+    my $cmd = "$RSYNC $opt_v $opt_q --no-motd --timeout $timeout $src $TMP" ;
+    Warn sprintf "'%s'\n", $cmd if $opt{d} ;
+    system $cmd ;
+    if ( open TMP, $TMP )
+      { print <TMP> ; close TMP ; }
+    else
+      { Warn "can't open $TMP" ; }
+  }
+else
+  { my $cmd = "$WGET -O - $opt_v $opt_q -t 1 -T $timeout $url |" ;
+    Warn sprintf "'%s'\n", $cmd if $opt{d} ;
+    if ( open CMD, $cmd )
+      { print <CMD> ; close CMD ; }
+    else
+      { Warn "can't popen $cmd ($!)" ; }
+  }