I'm not sure why you need to alias that name but what I would do it just use virtual hosts. I run a Qmail-1.03 server with about 30 diff domains. Set your /var/qmail/control/virtualdomains file to look like this.
user@domain.com:unixname
jay.mandal@domain.com:jay
I wrote this scripts, very cheasy but it works for me. The server is Solaris 9 so it differs a bit.
echo "Please enter the new qmail username.";
read NAME;
useradd -m $NAME;
passwd $NAME;
echo "$NAME has been added as a UNIX user.";
sleep 1;
echo "Adding qmail Maildir to $NAME.";
/usr/local/src/qmail-1.03/maildirmake /export/home/$NAME/Maildir;
sleep 1;
cp /qmail/.qmail-default /export/home/$NAME
echo "Copied .qmail-default to $NAME's home directory.";
sleep 1;
echo "Changing ownership of $NAME's files to $NAME.";
chown $NAME /export/home/$NAME
chown $NAME /export/home/$NAME/*
chown $NAME /export/home/$NAME/Maildir/*
chown $NAME /export/home/$NAME/.qmail-default
sleep 1;
/qmail/qmailuseradd
echo "$NAME has been added to the qmail database.";
qmailctl reload


Reply With Quote
Bookmarks