From: Jacob Bachmeyer Date: Wed, 16 Nov 2022 00:45:24 +0000 (-0600) Subject: Rename variables holding email addresses to better describe their uses X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=59e639f80155dcb1c114537c7e064c1cf31faa51;p=gatekeeper.git Rename variables holding email addresses to better describe their uses --- diff --git a/gatekeeper.pl b/gatekeeper.pl index 1f848a3..ffa5ece 100755 --- a/gatekeeper.pl +++ b/gatekeeper.pl @@ -307,12 +307,16 @@ my $email_blacklist = "/home/gatekpr/etc/email_blacklist"; # List of all package maintainers my $maintainers_bypkg = "/home/gatekpr/etc/maintainers.bypkg"; -# maintainer e-mail address -my $maintainer_email = "ftp-upload-report\@gnu.org"; +# E-mail addresses +{ + # - public archive of successful upload reports and some errors + our $Public_Upload_Archive_Inbox = "ftp-upload-report\@gnu.org"; + # - unmoderated collector of other errors and copies of some reports + our $Internal_Report_Inbox = 'ftp-upload-script@gnu.org'; +} my $serials_path = "/home/gatekpr/etc/upload-ftp-serials.txt"; -my $email_always = 'ftp-upload-script@gnu.org'; # e.g., ftp-upload@gnu.org # syslog destination use constant SYSLOG_APP_IDENT => 'gatekeeper'; @@ -1400,7 +1404,9 @@ sub mail { my $subject = shift; $subject ||= ''; - my @email_list = ($email_always); + our $Internal_Report_Inbox; + + my @email_list = ($Internal_Report_Inbox); # Some messages should be sent to the user, some should not push (@email_list, @{$info{email}}) if (defined $info{email} && $send_to_user); @@ -1418,7 +1424,7 @@ sub mail { # the script maintainer anyway. ftp_syslog('info', "No uploader e-mail address(es) to report this error to!"); - @email_list = ($email_always); + @email_list = ($Internal_Report_Inbox); } my $sender = 'ftp-upload-script@gnu.org'; @@ -1442,7 +1448,7 @@ sub mail { local $Text::Wrap::columns = 78; sendmail($sender, - [$email_always, @email_list], + [$Internal_Report_Inbox, @email_list], [[To => join ', ', @email_list], [From => $sender], [Date => strftime("%a, %e %b %Y %H:%M:%S %z", localtime)], @@ -1457,9 +1463,11 @@ sub debug { my $msg = shift; my $package_name = shift; + our $Public_Upload_Archive_Inbox; + sendmail('ftp-upload-script@gnu.org', - [$maintainer_email], - [[To => $maintainer_email], + [$Public_Upload_Archive_Inbox], + [[To => $Public_Upload_Archive_Inbox], [From => 'ftp-upload-script@gnu.org'], [Date => strftime("%a, %e %b %Y %H:%M:%S %z", localtime)], [Subject => ("[$zone_tag gnu-ftp-debug] "