$OpenBSD: patch-cgi-bin_openwebmail_openwebmail-vdomain_pl,v 1.6 2005/02/17 01:46:33 kevlo Exp $
--- cgi-bin/openwebmail/openwebmail-vdomain.pl.orig	Wed Jan  5 18:26:24 2005
+++ cgi-bin/openwebmail/openwebmail-vdomain.pl	Thu Jan 27 10:53:55 2005
@@ -1,4 +1,4 @@
-#!/usr/bin/suidperl -T
+#!/usr/bin/perl
 #
 # openwebmail-vdomain.pl - virtual domain user management
 #
@@ -102,10 +102,10 @@
 
 use vars qw($SCRIPT_DIR);
 if ( $0 =~ m!^(\S*)/[\w\d\-\.]+\.pl! ) { local $1; $SCRIPT_DIR=$1 }
-if ($SCRIPT_DIR eq '' && open(F, '/etc/openwebmail_path.conf')) {
+if ($SCRIPT_DIR eq '' && open(F, '%%SYSCONFDIR%%/openwebmail/openwebmail_path.conf')) {
    $_=<F>; close(F); if ( $_=~/^(\S*)/) { local $1; $SCRIPT_DIR=$1 }
 }
-if ($SCRIPT_DIR eq '') { print "Content-type: text/html\n\nSCRIPT_DIR not set in /etc/openwebmail_path.conf !\n"; exit 0; }
+if ($SCRIPT_DIR eq '') { print "Content-type: text/html\n\nSCRIPT_DIR not set in %%SYSCONFDIR%%/openwebmail/openwebmail_path.conf !\n"; exit 0; }
 push (@INC, $SCRIPT_DIR);
 
 foreach (qw(ENV BASH_ENV CDPATH IFS TERM)) {delete $ENV{$_}}; $ENV{PATH}='/bin:/usr/bin'; # secure ENV
@@ -643,7 +643,7 @@ sub change_vuser {
       return;
    }
 
-   my $vgid=getgrnam('mail');	# for better compatibility with other mail progs
+   my $vgid=getgrnam('_mail');	# for better compatibility with other mail progs
 
    if ( $new ) { # CREATE NEW USER
       my $aliastxt='';
