3 # Save sendmail.cg list
5 require './sendmail-lib.pl';
7 $access{'cgs'} || &error($text{'cgs_ecannot'});
8 &error_setup($text{'cgs_err'});
9 &lock_file($config{'sendmail_cf'});
10 $conf = &get_sendmailcf();
11 @dlist = split(/\s+/, $in{'dlist'});
13 $d =~ /^[A-z0-9\-\.]+$/ ||
14 &error(&text('cgs_ehost', $d));
15 &check_ipaddress($d) &&
16 &error(&text('cgs_eip', $d));
18 @dlist = &unique(@dlist);
20 # Update outgoing domains
21 &save_file_or_config($conf, "G", \@dlist);
24 &unlock_file($config{'sendmail_cf'});