/[notice-sender]/trunk/sender.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/sender.pl

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 61 by dpavlin, Wed Jun 22 12:26:54 2005 UTC revision 69 by dpavlin, Tue Aug 2 18:28:57 2005 UTC
# Line 45  my $result = GetOptions( Line 45  my $result = GetOptions(
45          "from=s" => \$opt->{'from'},          "from=s" => \$opt->{'from'},
46          "driver=s" => \$opt->{'email_send_driver'},          "driver=s" => \$opt->{'email_send_driver'},
47          "sleep=i" => \$opt->{'sleep'},          "sleep=i" => \$opt->{'sleep'},
48            "aliases=s" => \$opt->{'aliases'},
49  );  );
50    
51  my $nos = new Nos(  my $nos = new Nos(
# Line 81  Adds new list. You can also feed list na Line 82  Adds new list. You can also feed list na
82  You can also add C<--from='Full name of list'> to specify full name (comment)  You can also add C<--from='Full name of list'> to specify full name (comment)
83  in outgoing e-mail.  in outgoing e-mail.
84    
85    Optional parametar C<--aliases='/full/path/to/aliases'> can be used to
86    specify aliases file other than C</etc/aliases>.
87    
88  =cut  =cut
89    
90  if ($list_name = $opt->{'new'}) {  if ($list_name = $opt->{'new'}) {
# Line 90  if ($list_name = $opt->{'new'}) { Line 94  if ($list_name = $opt->{'new'}) {
94    
95          die "need e-mail address for list (as argument or on STDIN)\n" unless ($email);          die "need e-mail address for list (as argument or on STDIN)\n" unless ($email);
96    
97            my $aliases = $opt->{'aliases'} || '/etc/aliases';
98    
99          my $id = $nos->new_list(          my $id = $nos->new_list(
100                  list => $list_name,                  list => $list_name,
101                  from => ($opt->{'from'} || ''),                  from => ($opt->{'from'} || ''),
102                  email => $email,                  email => $email,
103                    aliases => $aliases,
104          ) || die "can't add list $list_name\n";          ) || die "can't add list $list_name\n";
105    
106          print "added list $list_name with ID $id\n";          print "added list $list_name with ID $id\n";

Legend:
Removed from v.61  
changed lines
  Added in v.69

  ViewVC Help
Powered by ViewVC 1.1.26