$!----------------------------------------------------------------------------- $! YAHMAIL_STARTUP.COM $! $! For WASD P1 can supply the server username ("HTTP$SERVER" by default) $! For APACHE P1 can supply the server username ("APACHE" by default) $! For OSU P1 can supply the server username ("HTTP_SERVER" by default) $! The server, "WASD", "APACHE", "OSU", or "OTHER", may be specified using P2 $! $! Usage examples: $! $! $ @YAHMAIL_STARTUP $! $ @YAHMAIL_STARTUP "" OSU $! $ @YAHMAIL_STARTUP WEB_SERVER OSU $! $! 20-DEC-2002 MGD WASD 8.1 package (security settings implicit in package) $! 26-APR-2002 MGD allow P2 to explicitly specify the server family $! 16-JAN-2001 MGD APACHE_ROOT becomes APACHE$COMMON (CSWS V1.0-1) $! 06-APR-2000 MGD VMS Apache $! 15-JAN-2000 MGD make a single package work for all three environments $! 07-JUL-1999 MGD initial $!----------------------------------------------------------------------------- $! $ privs = "/priv=(sysprv)" $! $ WASD81 = 0 $! $ if p2 .eqs. "" $ then $ procedure = f$environment("procedure") $ prolength = f$length(procedure) $ if f$locate("HT_ROOT",procedure) .lt. prolength then p2 = "WASD" $ if f$locate("APACHE$COMMON",procedure) .lt. prolength then p2 = "APACHE" $ if f$locate("WWW_ROOT",procedure) .lt. prolength then p2 = "OSU" $ if p2 .eqs. "" then p2 = "OTHER" $ endif $! $ if p2 .eqs. "WASD" $ then $! (WASD environment) $ yahmail_exe = "cgi-bin:[000000]yahmail.exe" $ yahmail_com = "cgi-bin:[000000]yahmail.com" $ yahmail_config = "ht_root:[local]yahmail.conf" $ httpd_username = "HTTP$SERVER" $ if p1 .nes. "" then httpd_username = p1 $ if f$search("HT_EXE:SECHAN.EXE") .nes. "" then WASD81 = 1 $ endif $! $ if p2 .eqs. "APACHE" $ then $! (VMS Apache environment) $ arch_name = f$edit(f$getsyi("arch_name"),"upcase") $ if arch_name .eqs. "ALPHA" then arch_name = "AXP" $ yahmail_exe = "apache$common:[cgi-bin]yahmail_''arch_name'.exe" $ yahmail_com = "apache$common:[cgi-bin]yahmail.com" $ yahmail_config = "apache$common:[conf]yahmail.conf" $ httpd_username = "APACHE$WWW" $ if p1 .nes. "" then httpd_username = p1 $ endif $! $ if p2 .eqs. "OSU" $ then $! (OSU environment) $ arch_name = f$edit(f$getsyi("arch_name"),"upcase") $ if arch_name .eqs. "ALPHA" then arch_name = "AXP" $ yahmail_exe = "www_root:[bin]yahmail_''arch_name'.exe" $ yahmail_com = "www_root:[bin]yahmail.com" $ yahmail_config = "www_root:[system]yahmail.conf" $ httpd_username = "HTTP_SERVER" $ if p1 .nes. "" then httpd_username = p1 $ endif $! $ if p2 .eqs. "OTHER" $ then $! (vanilla CGI server environment) $ arch_name = f$edit(f$getsyi("arch_name"),"upcase") $ if arch_name .eqs. "ALPHA" then arch_name = "AXP" $ yahmail_exe = "location:yahmail_''arch_name'.exe" $ yahmail_com = "location:yahmail.com" $ yahmail_config = "location:yahmail.conf" $ httpd_username = "USERNAME?" $ endif $! $!(define a logical locating configuration file) $ define /nolog /system /exec yahmail$config 'yahmail_config' $! $ if .not. WASD81 $ then $! (remove all world access from the configuration file) $ set security 'yahmail_config' /protection=w - /acl=((ident='httpd_username',access=read),(ident=*,access=none)) $! (allow only the server account to execute the support procedure & image) $ set security 'yahmail_com' /protection=w - /acl=((ident='httpd_username',access=read+execute), - (ident=*,access=none)) $ set security 'yahmail_exe' /protection=w - /acl=((ident='httpd_username',access=read+execute), - (ident=*,access=none)) $ endif $! $!(install with required privileges) $ install = "install" $ if f$file("''yahmail_exe'","known") $ then install replace 'yahmail_exe' /open /header /share 'privs' $ else install add 'yahmail_exe' /open /header /share 'privs' $ endif $!-----------------------------------------------------------------------------