3 # Save sendmail.cw list
5 require './sendmail-lib.pl';
7 $access{'cws'} || &error($text{'cws_ecannot'});
8 &error_setup($text{'cws_err'});
10 &lock_file($config{'sendmail_cf'});
11 $conf = &get_sendmailcf();
12 &get_file_or_config($conf, "w", undef, \$cwfile);
13 &lock_file($cwfile) if ($cwfile);
14 @dlist = split(/\s+/, $in{'dlist'});
16 $d =~ /^[A-z0-9\-\.]+$/ ||
17 &error(&text('cws_ehost', $d));
19 @dlist = &unique(@dlist);
21 &save_file_or_config($conf, "w", \@dlist);
23 &unlock_file($cwfile) if ($cwfile);
24 &unlock_file($config{'sendmail_cf'});