about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--Documentation/public-inbox-mda.txt2
-rwxr-xr-xpublic-inbox-mda4
-rwxr-xr-xscripts/import_gmane_spool6
-rw-r--r--t/cgi.t4
-rw-r--r--t/mda.t8
-rw-r--r--t/precheck.t8
6 files changed, 16 insertions, 16 deletions
diff --git a/Documentation/public-inbox-mda.txt b/Documentation/public-inbox-mda.txt
index 29570939..8e33e02f 100644
--- a/Documentation/public-inbox-mda.txt
+++ b/Documentation/public-inbox-mda.txt
@@ -11,7 +11,7 @@ Each system user may have their own public-inbox instances
 
 # ENVIRONMENT
 
-* RECIPIENT - the recipient email address, from Postfix
+* ORIGINAL_RECIPIENT - the original recipient email address, from Postfix
 * PI_CONFIG - config file. default: ~/.public-inbox/config
 * PI_EMERGENCY - emergency destination.  default: ~/.public-inbox/emergency/
 
diff --git a/public-inbox-mda b/public-inbox-mda
index 504fefd7..6c446749 100755
--- a/public-inbox-mda
+++ b/public-inbox-mda
@@ -25,8 +25,8 @@ $emergency = expand_filename($emergency);
 my $filter = Email::Filter->new(emergency => $emergency);
 my $config = PublicInbox::Config->new;
 
-my $recipient = $ENV{RECIPIENT};
-defined $recipient or die "RECIPIENT not defined in ENV\n";
+my $recipient = $ENV{ORIGINAL_RECIPIENT};
+defined $recipient or die "ORIGINAL_RECIPIENT not defined in ENV\n";
 my $dst = $config->lookup($recipient);
 defined $dst or exit(1);
 my $main_repo = $dst->{mainrepo} or exit(1);
diff --git a/scripts/import_gmane_spool b/scripts/import_gmane_spool
index e072b810..3cda0bf6 100755
--- a/scripts/import_gmane_spool
+++ b/scripts/import_gmane_spool
@@ -6,10 +6,10 @@
 =begin usage
         mkdir -p $HOME/.public-inbox
         MAINREPO=/path/to/your/repo.git
-        export RECIPIENT='list@example.com'
+        export ORIGINAL_RECIPIENT='list@example.com'
         git init --bare $MAINREPO
         export GIT_CONFIG=$HOME/.public-inbox/config
-        git config publicinbox.$LISTNAME.address $RECIPIENT
+        git config publicinbox.$LISTNAME.address $ORIGINAL_RECIPIENT
         git config publicinbox.$LISTNAME.mainrepo $MAINREPO
         unset GIT_CONFIG
         ./import_gmane_spool SLRNPULL_ROOT/news/foo/bar
@@ -22,7 +22,7 @@ use PublicInbox::Config;
 use IPC::Run qw(run);
 sub usage { "Usage:\n".join("",grep(/\t/, `head -n 24 $0`)) }
 my $spool = shift @ARGV or die usage();
-defined $ENV{RECIPIENT} or die usage();
+defined $ENV{ORIGINAL_RECIPIENT} or die usage();
 my @args = ('public-inbox-mda');
 
 chdir $spool or die "chdir $spool failed: $!\n";
diff --git a/t/cgi.t b/t/cgi.t
index b992af31..f7035228 100644
--- a/t/cgi.t
+++ b/t/cgi.t
@@ -43,7 +43,7 @@ my $failbox = "$home/fail.mbox";
 local $ENV{PI_EMERGENCY} = $failbox;
 {
         local $ENV{HOME} = $home;
-        local $ENV{RECIPIENT} = $addr;
+        local $ENV{ORIGINAL_RECIPIENT} = $addr;
 
         # ensure successful message delivery
         {
@@ -145,7 +145,7 @@ EOF
 
         {
                 local $ENV{HOME} = $home;
-                local $ENV{RECIPIENT} = $addr;
+                local $ENV{ORIGINAL_RECIPIENT} = $addr;
                 run_with_env({PATH => $main_path}, [$mda], \$in);
         }
         local $ENV{GIT_DIR} = $maindir;
diff --git a/t/mda.t b/t/mda.t
index d70288bc..3357718c 100644
--- a/t/mda.t
+++ b/t/mda.t
@@ -47,7 +47,7 @@ my $failbox = "$home/fail.mbox";
         my $good_rev;
         local $ENV{PI_EMERGENCY} = $failbox;
         local $ENV{HOME} = $home;
-        local $ENV{RECIPIENT} = $addr;
+        local $ENV{ORIGINAL_RECIPIENT} = $addr;
         my $simple = Email::Simple->new(<<EOF);
 From: Me <me\@example.com>
 To: You <you\@example.com>
@@ -135,7 +135,7 @@ Date: deadbeef
 {
         local $ENV{PI_EMERGENCY} = $failbox;
         local $ENV{HOME} = $home;
-        local $ENV{RECIPIENT} = $addr;
+        local $ENV{ORIGINAL_RECIPIENT} = $addr;
         local $ENV{PATH} = $main_path;
         my $mid = 'spam-train@example.com';
         my $simple = Email::Simple->new(<<EOF);
@@ -169,7 +169,7 @@ EOF
 {
         local $ENV{PI_EMERGENCY} = $failbox;
         local $ENV{HOME} = $home;
-        local $ENV{RECIPIENT} = $addr;
+        local $ENV{ORIGINAL_RECIPIENT} = $addr;
         local $ENV{PATH} = $main_path;
         my $mid = 'ham-train@example.com';
         my $simple = Email::Simple->new(<<EOF);
@@ -199,7 +199,7 @@ EOF
         my $faildir= "$home/faildir/";
         local $ENV{PI_EMERGENCY} = $faildir;
         local $ENV{HOME} = $home;
-        local $ENV{RECIPIENT} = $addr;
+        local $ENV{ORIGINAL_RECIPIENT} = $addr;
         local $ENV{PATH} = $fail_path;
         my $in = <<EOF;
 From: Faildir <faildir\@example.com>
diff --git a/t/precheck.t b/t/precheck.t
index 42592bc2..974d6a38 100644
--- a/t/precheck.t
+++ b/t/precheck.t
@@ -13,19 +13,19 @@ sub do_checks {
         my $f = Email::Filter->new(data => $s->as_string);
 
         ok(PublicInbox::MDA->precheck($f, undef),
-                "RECIPIENT unset is OK");
+                "ORIGINAL_RECIPIENT unset is OK");
 
         my $recipient = 'foo@example.com';
         ok(!PublicInbox::MDA->precheck($f, $recipient),
-                "wrong RECIPIENT rejected");
+                "wrong ORIGINAL_RECIPIENT rejected");
 
         $recipient = 'b@example.com';
         ok(PublicInbox::MDA->precheck($f, $recipient),
-                "RECIPIENT in To: is OK");
+                "ORIGINAL_RECIPIENT in To: is OK");
 
         $recipient = 'c@example.com';
         ok(PublicInbox::MDA->precheck($f, $recipient),
-                "RECIPIENT in Cc: is OK");
+                "ORIGINAL_RECIPIENT in Cc: is OK");
 }
 
 {