3 # Save relay domains list
5 require './sendmail-lib.pl';
7 $access{'relay'} || &error($text{'relay_ecannot'});
8 &error_setup($text{'relay_err'});
9 &lock_file($config{'sendmail_cf'});
11 $conf = &get_sendmailcf();
12 &get_file_or_config($conf, "r", undef, \$rfile);
13 &lock_file($rfile) if ($rfile);
14 @dlist = split(/\s+/, $in{'dlist'});
16 $d =~ /^[A-z0-9\-\.]+$/ ||
17 &error(&text('relay_edomain', $d));
19 @dlist = &unique(@dlist);
22 &save_file_or_config($conf, "R", \@dlist);
25 &unlock_file($config{'sendmail_cf'});
26 &unlock_file($rfile) if ($rfile);