chiark / gitweb /
numbered-alias-sheet: fix -T
[d.git] / evade-mail-admin
index 5b997bd1bf15fcf280ffd39fbe31d2a132824fe3..fb22d3943a8e7e91e66c5e922b572927881673c2 100755 (executable)
@@ -25,6 +25,7 @@ actions
   list
   list-actions
 empty string for redirect means reject
+remember to quote comments (to protect # from your shell)
 END
 our $usage3 = <<'END';
 privileged actions
@@ -85,7 +86,7 @@ our $maxdomainlen = 40;
 sub nextarg () {
     die "too few arguments\n" unless @ARGV;
     my $v = shift @ARGV;
-    die "option too late on command line\n" if $v =~ m/^-/;
+    die "option in wrong place on command line\n" if $v =~ m/^-/;
     return $v;
 }
 
@@ -294,7 +295,7 @@ sub gendefaults_wordlist {
        + (length $worddelim) * ($numwords-1); # delimiters
     die "assuming lowest reasonable mean word length $minmaxmeanwordlen".
        " addrs would be $expectedmindomlen long but".
-       " your maximum length specified $maxdomainlen\n"
+       " maximum length is set to $maxdomainlen (use different -m?)\n"
        if $expectedmindomlen > $maxdomainlen;
 }
 
@@ -320,6 +321,7 @@ sub action_create {
 
 sub action_choose {
     genopts;
+    $|=1;
     my $template = rhsargs({'redirect'=>$user, 'comment'=>''});
     $template->{'user'} = $user;
     prepare_create();
@@ -350,6 +352,7 @@ sub action_choose {
            1;
        }) {
            my $newrow = { %$template, 'localpart' => $s };
+           insertrow($newrow);
            $dbh->commit();
            prow($newrow);
        } else {