Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344
Rep:
From the cf/README file:
> virtusertable
>
> A domain-specific form of aliasing, allowing multiple
> virtual domains to be hosted on one machine. For example,
> if the virtuser table contained:
>
> info@foo.com foo-info
> info@bar.com bar-info
> @baz.org jane@elsewhere.net
>
> then mail addressed to info@foo.com will be sent to the
> address foo-info, mail addressed to info@bar.com will be
> delivered to bar-info, and mail addressed to anyone at
> baz.org will be sent to jane@elsewhere.net. The username
> from the original address is passed as %1 allowing:
>
> @foo.org %1@elsewhere.com
>
> meaning someone@foo.org will be sent to someone@elsewhere.com.
>
> All the host names on the left hand side (foo.com, bar.com,
> and baz.org) must be in $=w. The default map definition is:
>
> hash -o /etc/virtusertable
>
> A new definition can be specified as the second argument of
> the FEATURE macro, such as
>
> FEATURE(`virtusertable', `dbm -o /etc/mail/virtusers')
The aliases database must be used to map the email addresses to the Linux users on that machine. Follow the examples in the file. Then you rebuild the database using the command "newaliases" at the command prompt. If everything went well, you will see that it replies stating new databse built with X number of aliases. If there are problems, it will tell you then also.
'The aliases database must be used to map the email addresses to the Linux users on that machine'
your post of the readme file of virtusertable with the examples basically does the same thing
'info@foo.com foo-info'
I understand that with the aliases database i can setup simple mailing lists etc but i just don't see why i need both an aliases and virtusertable as they both do basically the same thing
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344
Rep:
The aliases database provides the place for you to provide the info to sendmail for all of the aliases of users on your server. Let's assume that you have a website, and you are the webmaster of that site. Without using the aliases file, whenever mail reaches the server addressed to webamaster@yoursite.com, it won't know how to get it to you. But, if you enter in the data in the aliases database: "webmaster@yoursite.com: yourlinuxusername", then it will know how to get it to you. It is also the place that sendmail uses to get the info to send it's daily log messages, any alerts, etc. There is a spot in the file that you would designate where all the mail addressed to root (typically to whom it would be addressed) would go. The virusertable provides a place to designate that you are in fact hosting virtual domains and that the server should accept it.
Another point about the aliases file. On your linux box all of your users are entered in as "firstnamelastname" (for example). Thats how I have mine entered. But, you may set up there email address as firstname.lastname@yourdomain.com. The aliases file is where you would put that kind of info. Same goes for "firstinitiallastname@yourdomain.com". And so on. It gives you the place to manage all of that kind of data. Unless the email user name and the linux log on user name are EXACTLY the same, the email user name will have to be identified in the aliases file.
I hope that makes it more clear. if you have any more questions, don't hesitate to repost.
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344
Rep:
I would think it would as long as the declarations are made in your sendmail.cf file. But, to explain myself better. Lets say that you are hosting a website and mail for someone else. You would declare their domain as a virtual domain. The MX records and DNS records are the gotcha here. Your server will probably only have one live IP address. Lets say that it is 123.456.789.321. You would set up the MX records for your own domain to point to that IP. Now you host this other domain with your server. Those MX records would have to also be pointed to your server. One of the checks that sendmail does by default is to verify domains. If you have that other domain declared as a virtual domain on your server then you are good to go. So, now you need to declare that you have those other users. That's what would be taking place in the virusertable. Let's say that it is a small commercial site. And they have info@otherdomain.com and sales@otherdomain.com and the like. Of course there aren't any users by that domain so it would freak out. But if you have the users listed in your virusertable it would recognize them and send them on.
Now, can you use the virusertable like aliases? I suppose you could. The other question is whether you should. I speak here form a point of administration. If you are the only person who would ever touch this machine then it would proabaly be okay. But, if you have other people helping or someone else would need to take over managing, then you would want to follow the normal conjecture. So, in order to make it easier to manage, put all of your local users (your domain) in the aliases file and all of the virtual users (the other domain) in the virusertable. That way if there are issues, it will be easier to look up and make changes. Now if you have just a few users and wish to put them in the virusertable, it will probably work as long as you make all the right declarations in the sendmail.cf file. I hope that makes it more clear. It's a matter of house keeping I suppose more than whether it will work or not. It will probably work just fine, it's just a matter of consistency with the norm (I guess anyway).
Thanks for that Scooter, so it's more of an standard way of doing things. It is difficult sometimes as i read info on how to set things up but not many sites give you 'best practice' methods of doing things. This server will only be used by me but I would like to do things the correct way as I may roll out linux servers eventually to replace our windows servers for some tasks when I am confident enough in configuring and troubleshooting them.
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344
Rep:
All of my servers are Linux. I won't give the money to Gates. I would have Linux workstations but most of our folks wouldn't know where to begin, so I got Xp Pro for them. They are more comfortable with that, but I set back here in my dungeon with my nix boxes. They seem to work. Don't get me wrong, I do have a doze box because much of the software I run for my work is doze based so it works better on those. I wish more vendors would start writing the stuff for us, but not yet. That may actually come one day. Anyway, good luck with your server. I hope that I didn't give you any bum dope on the virusertable. If I did, maybe someone can straighten us both out!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.