1 |
#! /usr/local/bin/perl -w |
#! /xdata/ccflib/perl5/perlbrew/perls/perl-5.18.4/bin/perl -w |
2 |
# |
# |
3 |
# Giuseppe Vacanti (cosine science & computing) |
# After several changes in mail gtwy at ESAC, the different mail addresses |
4 |
# $Date: 2002/02/18 20:23:57 $ |
# have been changed. |
5 |
# |
# |
6 |
# It receives the mirror log for the current package on stdin. |
# Mailman mail distribution lists have to be of the form: list@xmm.esac.esa.int |
7 |
|
# |
8 |
|
# $replyto for xmm-it, sas-devel should now go to : eduardo.ojero@esa.it |
9 |
|
# |
10 |
|
# $Id: ccfnotify,v 1.10 2015/02/02 14:37:21 ccflib Exp $ |
11 |
# |
# |
12 |
require 5; |
require 5; |
13 |
use FileHandle; |
use FileHandle; |
15 |
use strict; |
use strict; |
16 |
|
|
17 |
my %opts; |
my %opts; |
18 |
getopts('t:', \%opts); # -t development|release|public |
getopts('t:d', \%opts); # -t development|release|public |
19 |
|
# -d => @names (see next line) were deleted |
20 |
my @names = @ARGV; # the rest of the command line contains the names of the |
my @names = @ARGV; # the rest of the command line contains the names of the |
21 |
# CCF constituents |
# CCF constituents |
22 |
|
|
26 |
my @to; |
my @to; |
27 |
my $replyto; |
my $replyto; |
28 |
my $subject; |
my $subject; |
29 |
|
my $delete = $opts{'d'}; |
30 |
|
|
31 |
foreach($update){ |
foreach($update){ |
32 |
|
|
33 |
/^development$/ && do { |
/^development$/ && do { |
34 |
@to = qw/xmm-it sas-devel/; |
@to = qw/xmm-it sas-devel/; |
35 |
$subject = "Update of the $update CCF area"; |
$subject = "Update of the $update CCF area"; |
36 |
$replyto = 'xmm-it@xmm.vilspa.esa.es'; |
$replyto = 'eduardo.ojero@esa.int'; |
37 |
next; |
next; |
38 |
}; |
}; |
39 |
|
|
40 |
/^release$/ && do { |
/^release$/ && do { |
41 |
@to = qw/xmm-it sas-devel/; |
@to = qw/xmm-it sas-devel/; |
42 |
$subject = "Update of the $update CCF area"; |
$subject = "Update of the $update CCF area"; |
43 |
$replyto = 'xmm-it@xmm.vilspa.esa.es'; |
$replyto = 'eduardo.ojero@esa.int'; |
44 |
next; |
next; |
45 |
}; |
}; |
46 |
|
|
47 |
/^public$/ && do { |
/^public$/ && do { |
48 |
@to = qw/ccf xmm-it sas-devel/; |
@to = qw/ccf xmm-it sas-devel/; |
49 |
$subject = "XMM-Newton calibration update"; |
$subject = "XMM-Newton calibration update"; |
50 |
$replyto = 'xmmhelp@xmm.vilspa.esa.es'; |
$replyto = 'eduardo.ojero@esa.int'; |
51 |
next; |
next; |
52 |
}; |
}; |
53 |
|
|
56 |
|
|
57 |
exit(0) if(not @names); |
exit(0) if(not @names); |
58 |
|
|
59 |
|
# |
60 |
|
# notice that sendmail is in /usr/lib not in /usr/bin or /usr/sbin |
61 |
|
|
62 |
foreach(@to){ |
foreach(@to){ |
63 |
my $fh = new FileHandle "|/usr/lib/sendmail -t" or die ("$!\n"); |
my $fh = new FileHandle "|/usr/lib/sendmail -t" or die ("$!\n"); |
64 |
|
|
65 |
$fh->print("From: ccflib\@xmm.vilspa.esa.es |
$fh->print("From: ccflib\@xmm.esac.esa.int |
66 |
Reply-To: $replyto |
Reply-To: $replyto |
67 |
To: $_\@xmm.vilspa.esa.es |
To: $_\@xmm.esac.esa.int |
68 |
Subject: $subject |
Subject: $subject |
69 |
"); |
"); |
70 |
|
|
71 |
|
if($delete){ |
72 |
|
$fh->print("\nThe following calibration constituents were deleted or moved to another directory:\n\n"); |
73 |
|
} else { |
74 |
|
$fh->print("\nThe following new calibration constituents are available:\n\n"); |
75 |
|
} |
76 |
|
|
|
$fh->print("\nThe following new calibration constituents are available:\n\n"); |
|
|
|
|
77 |
foreach(@names){ |
foreach(@names){ |
78 |
$fh->print("$_\n"); |
$fh->print("$_\n"); |
79 |
} |
} |
82 |
$fh->print(' |
$fh->print(' |
83 |
For details and download instructions please refer to: |
For details and download instructions please refer to: |
84 |
|
|
85 |
http://xmm.vilspa.esa.es/calibration/ |
https://www.cosmos.esa.int/web/xmm-newton/calibration |
86 |
http://xmm.vilspa.esa.es/ccf/releasenotes/ |
https://www.cosmos.esa.int/web/xmm-newton/ccf-release-notes |
87 |
|
|
88 |
Best regards, |
Best regards, |
89 |
|
|
90 |
The XMM-Newton Calibration Librarian |
The XMM-Newton Calibration Librarian |
91 |
xmmhelp@xmm.vilspa.esa.es |
--------------------------------------------------------------- |
92 |
|
Please reply to: '); |
93 |
'); |
$fh->print(" $replyto\n"); |
94 |
|
|
95 |
undef $fh; |
undef $fh; |
96 |
|
|
97 |
} |
} |
98 |
|
|
99 |
} |
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|