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( |
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'}) { |
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"; |