Click to See Complete Forum and Search --> : Virtusertable


bpat1434
03-25-2006, 09:48 AM
Hi all.

Just wondering if anyone can explain to me (yes I've googled) how to create a virtusertable on Windows to be used on linux? I know it's just a list of aliases, but I've also seen a few different ways as to how it should be formatted, and how it should be saved. Any information would be helpful!!

dalecosp
03-25-2006, 01:59 PM
[510] Sat 25.Mar.2006 11:58:20
[kadmin@files][/etc/mail]
$ cat virtusertable.sample

# $FreeBSD: src/etc/mail/virtusertable.sample,v 1.3 2000/11/02 23:32:31 dirk Exp $
#
# Map one or all usernames at a source hostname to a specific (or the same)
# username at another target hostname. Remember to add the source hostname
# to /etc/mail/local-host-names so that sendmail will accept mail for the
# source hostname.
#
username@a.sample.hostname localuser
username@a.sample.hostname specificuser@a.possibly.different.hostname
@another.sample.hostname specificuser@a.possibly.different.hostname
@yet.another.sample.hostname %1@a.possibly.different.hostnameDunno if it matters whether it's tabs or spaces, for sure; I'm *pretty sure* spaces is fine.

You will probably want to convert the text to Unix format and get rid of the pesky Windows CRLF's though....

dalecosp
03-25-2006, 02:05 PM
FWIW, they're tabs in the example above. As for saving it, what do you mean, exactly?

bpat1434
03-25-2006, 02:14 PM
What would the extension be? .db none? what?

dalecosp
03-25-2006, 02:55 PM
No, it's a text file. In BSD, and I assume other wise (are we talking Sendmail, here?) you then create the *.db file:/usr/sbin/makemap hash virtusertable.db < virtusertable
chmod 0640 virtusertable.dbNow, if your system's arranged like mine, you can simply run "make" in /etc/mail and have it do this. However, "make" is a meta-command that will also build configuration files if the source files have been changed, run "newaliases", rebuild the access.db file, etc.

dalecosp
03-25-2006, 02:56 PM
So, to answer the first question, "none". ;)