[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tmda-cvs
Subject:    CVS: tmda/contrib vmailmgr-vdir.sh,NONE,1.1 vpopmail-vdir.sh,NONE,1.1 ChangeLog,1.87,1.88
From:       Timothy Legant <tlegant () users ! sourceforge ! net>
Date:       2003-01-21 5:31:37
[Download RAW message or body]

Update of /cvsroot/tmda/tmda/contrib
In directory sc8-pr-cvs1:/tmp/cvs-serv6458

Modified Files:
	ChangeLog 
Added Files:
	vmailmgr-vdir.sh vpopmail-vdir.sh 
Log Message:
Added two sample scripts to find virtual users' home directories.


--- NEW FILE ---
#!/bin/sh

# Prints the virtual email user's home directory.
#

# Expects a virtual username and the virtual domain as parameters.
# The username should be just the username portion and not the entire
# email address, e.g., if the user usually logs in as
# 'joe@example.com' or 'joe%example.com', this script should be run as
# the system user in charge of 'example.com' (see the 'prepend' in
# /var/qmail/control/virtualdomains) and given the parameters 'joe'
# and 'example.com'.
#
# $ vmailmgr-vdir.sh joe example.com
#
# NOTE: At this point, the domain parameter ($2) is not used.

# Change the following paths if the sed program or VMailMgr's listvdomain
# program are in different locations than given here.
LISTVDOMAIN=/usr/local/bin/listvdomain
SED=/usr/bin/sed

# Set IFS to a newline (no space, no tab)
IFS='
'
set `${LISTVDOMAIN} $1`
# Reset IFS to a space, tab, newline.
IFS=' 	
'
set $2

# $2, now the user's home directory, is relative to $HOME and looks like this:
#
# ./users/<username>
#
# Strip off the leading dot, but leave the (now leading) '/'.
homedir=`echo $2 | ${SED} 's/^\.//'`

# No separating '/' necessary because 'homedir' begins with '/'.
echo ${HOME}${homedir}

--- NEW FILE ---
#!/bin/sh

# Prints the virtual email user's home directory.
#

# Expects a virtual username and the virtual domain as parameters.
# The username should be just the username portion and not the entire
# email address, e.g., if the user usually logs in as
# 'joe@example.com' or 'joe%example.com', this script should be run as
# the vpopmail user and given the parameters 'joe' and 'example.com'.
#
# $ vpopmail-vdir.sh joe example.com

# Change the following paths if VPopMail's vuserinfo program is in a
# different location than given here.
VUSERINFO=/home/vpopmail/bin/vuserinfo

if [ -z "$2" ]
then
    vuser="$1"
else
    vuser="$1@$2"
fi

${VUSERINFO} -d $vuser

Index: ChangeLog
===================================================================
RCS file: /cvsroot/tmda/tmda/contrib/ChangeLog,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- ChangeLog	14 Nov 2002 04:35:14 -0000	1.87
+++ ChangeLog	21 Jan 2003 05:31:35 -0000	1.88
@@ -1,3 +1,11 @@
+2003-01-20  Tim Legant  <tim@catseye.net>
+
+	* vmailmgr-vdir.sh: Script to print virtual email user's homedir.
+	Works with the VMailMgr virtual domain add-on to qmail.
+
+	* vpopmail-vdir.sh: Script to print virtual email user's homedir.
+	Works with the VPopMail virtual domain add-on to qmail.
+
 2002-11-13  Josh  <huber@alum.wpi.edu>
 
 	* tmda.el: Made the changelist processing faster.

_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic