1 |
#! /xdata/ccflib/perl5/perlbrew/perls/perl-5.18.4/bin/perl -w |
#! /xdata/ccflib/perl5/perlbrew/perls/perl-5.18.4/bin/perl |
2 |
# |
# |
3 |
# After several changes in mail gtwy at ESAC, the different mail addresses |
# After several changes in mail gtwy at ESAC, the different mail addresses |
4 |
# have been changed. |
# have been changed. |
5 |
# |
# |
6 |
# Mailman mail distribution lists have to be of the form: list@xmm.esac.esa.int |
# Mailman mail distribution lists have now the form: |
7 |
# |
# |
8 |
# $replyto for xmm-it, sas-devel should now go to : eduardo.ojero@esa.it |
# list@sciops.esa.int |
9 |
# |
# |
10 |
# $Id: ccfnotify,v 1.11 2017/02/21 10:58:55 ccflib Exp $ |
# e.g. sas-devel@sciops.esa.int, ccf@sciops.esa.int |
11 |
|
# |
12 |
|
# $replyto : eduardo.ojero@sciops.esa.int |
13 |
|
# |
14 |
|
# $Id: ccfnotify,v 1.12 2018/08/28 13:07:26 ccflib Exp $ |
15 |
# |
# |
16 |
require 5; |
require 5; |
17 |
use FileHandle; |
use FileHandle; |
18 |
use Getopt::Std; |
use Getopt::Std; |
19 |
use strict; |
use strict; |
20 |
|
use warnings; |
21 |
|
|
22 |
my %opts; |
my %opts; |
23 |
getopts('t:d', \%opts); # -t development|release|public |
getopts('t:d', \%opts); # -t development|release|public |
24 |
# -d => @names (see next line) were deleted |
# -d => @names (see next line) were deleted |
25 |
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 |
26 |
# CCF constituents |
# CCF constituents |
27 |
|
|
28 |
die("Usage: -t development|release|public\n") if(not exists $opts{'t'}); |
die("Usage: -t development|release|public\n") if(not exists $opts{'t'}); |
29 |
|
|
36 |
foreach($update){ |
foreach($update){ |
37 |
|
|
38 |
/^development$/ && do { |
/^development$/ && do { |
39 |
@to = qw/sas-devel\@xmm.esac.esa.int/; |
@to = qw/sas-devel\@sciops.esa.int/; |
40 |
$subject = "Update of the $update CCF area"; |
$subject = "Update of the $update CCF area"; |
41 |
$replyto = 'eduardo.ojero@esa.int'; |
$replyto = 'eduardo.ojero@esa.int'; |
42 |
next; |
next; |
43 |
}; |
}; |
44 |
|
|
45 |
/^release$/ && do { |
/^release$/ && do { |
46 |
@to = qw/ccf\@sciops.esa.int sas-devel\@xmm.esac.esa.int/; |
@to = qw/ccf\@sciops.esa.int sas-devel\@sciops.esa.int/; |
47 |
$subject = "Update of the $update CCF area"; |
$subject = "Update of the $update CCF area"; |
48 |
$replyto = 'eduardo.ojero@esa.int'; |
$replyto = 'eduardo.ojero@esa.int'; |
49 |
next; |
next; |
50 |
}; |
}; |
51 |
|
|
52 |
/^public$/ && do { |
/^public$/ && do { |
53 |
@to = qw/ccf\@sciops.esa.int sas-devel\@xmm.esac.esa.int/; |
@to = qw/ccf\@sciops.esa.int sas-devel\@sciops.esa.int/; |
54 |
$subject = "XMM-Newton calibration update"; |
$subject = "XMM-Newton calibration update"; |
55 |
$replyto = 'eduardo.ojero@esa.int'; |
$replyto = 'eduardo.ojero@esa.int'; |
56 |
next; |
next; |
67 |
foreach(@to){ |
foreach(@to){ |
68 |
my $fh = new FileHandle "|/usr/lib/sendmail -t" or die ("$!\n"); |
my $fh = new FileHandle "|/usr/lib/sendmail -t" or die ("$!\n"); |
69 |
|
|
70 |
$fh->print("From: ccflib\@xmm.esac.esa.int |
$fh->print("From: ccflib\@isciops.esa.int |
71 |
Reply-To: $replyto |
Reply-To: $replyto |
72 |
To: $_ |
To: $_ |
73 |
Subject: $subject |
Subject: $subject |