\n"; &ui_print_footer("", $text{'index_return'}); exit; } if (!-r $gfile) { # Text file not found print "",&text('generics_efile', "$gfile", "$gdbm", "@{[&get_webprefix()]}/config.cgi?$module_name"),"
\n"; print "",&text('virtusers_createfile', 'create_file.cgi?mode=generics'),"
\n"; &ui_print_footer("", $text{'index_return'}); exit; } # Get list of outgoing mappings, limited to those the user can edit @gens = &list_generics($gfile); if ($access{'omode'} == 2) { @gens = grep { $_->{'from'} =~ /$access{'oaddrs'}/i || $_->{'to'} =~ /$access{'oaddrs'}/i } @gens; } &generic_form(); if ($in{'search'}) { # Restrict to search results @gens = grep { $_->{'from'} =~ /$in{'search'}/ } @gens; } elsif ($config{'max_records'} && @gens > $config{'max_records'}) { # Show search form print $text{'generics_toomany'},"\n"; print "
\n"; } print $text{'generics_desc1'},"
\n"; print &text('generics_desc2', "list_cgs.cgi"),"\n"; &ui_print_footer("", $text{'index_return'}); sub gens_table { local @tds = ( "width=5" ); print &ui_columns_start([ "", $text{'generics_from'}, $text{'generics_to'}, $config{'show_cmts'} ? ( $text{'virtusers_cmt'} ) : ( ) ], 100, 0, \@tds); foreach $g (@_) { local @cols; push(@cols, "{'num'}\">". "".&html_escape($g->{'from'}).""); push(@cols, &html_escape($g->{'to'})); push(@cols, &html_escape($g->{'cmt'})) if ($config{'show_cmts'}); print &ui_checked_columns_row(\@cols, \@tds, "d", $g->{'from'}); } print &ui_columns_end(); } # Notes - The G class lists domains for which outgoing-address translation # is done. If a mapping for an address like 'foo' exists, it applied for # from addresses like 'foo' or 'foo@anything'. However, a mapping for # 'foo@foo.com' applies only for that exact address # By default, the G class contains only the full local hostname # (like florissa.home). Sendmail automatically adds the full hostname # to unqualified addresses sent locally or through smtp (so becomes # # The G class can be defined by CG statements in sendmail.cf, or by a # FG/path line to use an external file.. # If there is a generics mapping from an unqualified name, then it will # apply for all domains in the G class.