LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 02-17-2005, 06:20 AM   #1
HeadNoodle
LQ Newbie
 
Registered: Feb 2005
Location: Grimsby/UK
Distribution: Fedora 3
Posts: 6

Rep: Reputation: 0
Question sendmail virtusertable or aliases?


Hi All,

I'm trying to setup an email server but am confused whether to use virtusertable or aliases file to map email addresses to users.

Also does one of the files override the other to decide where the email is stored, and if so which one overrides which?

thanks in advance for your hep


One very confused Linux Newbie
 
Old 02-18-2005, 07:14 AM   #2
ScooterB
Member
 
Registered: Sep 2003
Location: NW Arkansas
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344

Rep: Reputation: 31
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.
 
Old 02-18-2005, 08:58 AM   #3
HeadNoodle
LQ Newbie
 
Registered: Feb 2005
Location: Grimsby/UK
Distribution: Fedora 3
Posts: 6

Original Poster
Rep: Reputation: 0
Question

Hi, even though you say

'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

Am I missing the whole point here?


 
Old 02-18-2005, 09:46 AM   #4
ScooterB
Member
 
Registered: Sep 2003
Location: NW Arkansas
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344

Rep: Reputation: 31
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.
 
Old 02-18-2005, 09:53 AM   #5
HeadNoodle
LQ Newbie
 
Registered: Feb 2005
Location: Grimsby/UK
Distribution: Fedora 3
Posts: 6

Original Poster
Rep: Reputation: 0
put isn't it true that I can enter the following in the virtusertable

webmaster@yoursite.com<tab> yourlinuxusername

won't this achieve exactly the same result, as it seems to work in my current configuration?
 
Old 02-18-2005, 10:25 AM   #6
ScooterB
Member
 
Registered: Sep 2003
Location: NW Arkansas
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344

Rep: Reputation: 31
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).
 
Old 02-18-2005, 11:21 AM   #7
HeadNoodle
LQ Newbie
 
Registered: Feb 2005
Location: Grimsby/UK
Distribution: Fedora 3
Posts: 6

Original Poster
Rep: Reputation: 0
Wink

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.
 
Old 02-18-2005, 11:38 AM   #8
ScooterB
Member
 
Registered: Sep 2003
Location: NW Arkansas
Distribution: Linux Redhat 9.0, Fedora Core 2,Debian 3.0, Win 2K, Win95, Win98, WinXp Pro
Posts: 344

Rep: Reputation: 31
Thumbs up

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!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
setting virtusertable in sendmail creates problems with aliases set jomy Linux - Networking 1 11-03-2011 06:32 PM
sendmail virtusertable niranjan_mr Linux - Software 0 11-07-2005 03:41 AM
Sendmail & Virtusertable akilles Linux - Newbie 0 01-14-2005 03:19 AM
Sendmail /etc/mail/virtusertable not created katana Linux - General 4 03-01-2004 12:19 PM
Sendmail /etc/mail/virtusertable headache! katana Solaris / OpenSolaris 4 12-29-2002 12:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration