[98127] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: Virtual User Table

daemon@ATHENA.MIT.EDU (Kevin Smith)
Fri Nov 6 19:21:03 1998

Date: Fri, 6 Nov 1998 18:20:14 -0600 (EST)
From: Kevin Smith <kevin@mtsu.edu>
To: RedHat List <redhat-list@redhat.com>
cc: Shafer Stockton <shifter@zvisions.com>
In-Reply-To: <Pine.LNX.3.96.981106121756.406F-100000@kachinahost>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

On Fri, 6 Nov 1998, Shafer Stockton wrote:

> I've asked this question before and haven't gotten a reply. I'm hoping
> this time might be different. :)
> 
> Has anyone got virtual user tables working in the version of sendmail that
> ships with RedHat 5.1??

Yes, try the following:

In your sendmail configuration file (/etc/sendmail.cf), uncomment the Kvirtuser
entry listed as follows

-- CUT HERE --
# Virtual user table (maps incoming users)
#Kvirtuser dbm /etc/virtusertable
----

In addition to uncommenting the above, change the "dbm" to "hash"

Also, uncomment all the following lines (except the starting comment)

-- CUT HERE --
# handle virtual users
#R$+ < @ $=w . >    $: < $(virtuser $1 @ $2 $@ $1 $: @ $) > $1 < @ $2 . >
#R<@> $+ + $* < @ $* . >
            $: < $(virtuser $1 + * @ $3 $@ $1 $: @ $) > $1 + $2 < @ $3 . >
#R<@> $+ + $* < @ $* . >
            $: < $(virtuser $1 @ $3 $@ $1 $: @ $) > $1 + $2 < @ $3 . >
#R<@> $+ < @ $+ . > $: < $(virtuser @ $2 $@ $1 $: @ $) > $1 < @ $2 . >
#R<@> $+            $: $1
#R< error : $- $+ > $*  $#error $@ $( dequote $1 $) $: $2
#R< $+ > $+ < @ $+ >    $: $>97 $1
----

The only thing left, is the actual virtuser table...
Just make entries for all the virtual domains, using the
following as an example:

-- CUT HERE - /etc/virtusertable - CUT HERE --
# vdomain.com email addresses
bob@vdomain.com                                 vdomain1
cindy@vdomain.com                               vdomain2
webmaster@vdomain.com                   vdomain3
@vdomain.com                                    error:nouser unknown user %1

# mydomain.net email addresses
bob@mydomain.net                                mydomain1
sales@mydomain.net                              mydomain2
webmaster@mydomain.net                  mydomain3
@mydomain.net                                   error:nouser unknown user %1
-- END OF FILE --

As you can probably tell, the clients will login as a numbered
account, but they will get the email addresses they desire.  Just
add the accounts as email only accounts, and set the appropriate
password.

Then, just have the clients use the following configuration:
[ Most POP3 clients have similar configuration ]
Email Address: username@domain.com
POP3 Login: domain1 (or domain2, or domain3, etc)
Mail server (SMTP and POP3): mail.domain.com

(just make mail.domain.com a CNAME for your mail server)

Using the prefix with a numbered account is just one possible system
of organizing domain email addresses, but from past experience on
our systems, it has proven to be very reliable, and easily managed.

After making any changes to the /etc/virtusertable file, you will need
update the hash table by running: 

/usr/bin/makemap hash /etc/virtusertable < /etc/virtusertable

That should take care of everything for you... if it doesn't, just let the
list know what is going on the best of your ability, and hopefully someone
will be able to help

-----
Kevin Smith
kevin@mtsu.edu

If a person (a) is poorly, (b) receives treatment intended to make him better,
and (c) gets better, then no power of reasoning known to medical science can
convince him that it may not have been the treatment that restored his health.
		-- Sir Peter Medawar, "The Art of the Soluble"



-- 
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
		http://www.redhat.com http://archive.redhat.com
         To unsubscribe: mail redhat-list-request@redhat.com with 
                       "unsubscribe" as the Subject.


home help back first fref pref prev next nref lref last post