Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Virtual domains and POP

Posted on 1998-06-10
6
Medium Priority
?
280 Views
Last Modified: 2013-11-18
Hello,
I am trying to set up virtual domains on my linux box. So far, everything was ok (IP Aliasing, etc) but i have some troubles with POP/SMTP.
What i want :
Imagine 2 virtual domains : vh1.org and vh2.org
The directories are /home/vh1org for vh1.org and /home/vh2.org and of course they are in the /etc/passwd.
Each user of the domain ONLY use POP service (they cannot connect). I don't want them in the main /etc/passwd.
The same POP account must exist ex: jo@vh1.org and jo@vh2.org
The directory and POP accounts are located in the /home/virtual_domain/pop
ex: jo@vh1.org receives his mail in /home/vh1org/pop/jo ...
The POP server must be able to read in this directory by looking at the domain or IP requested ...
The virtusertable by sendmail needs an entry (like jo-vh1org) in the /etc/passwd for each user of each virtual domain. I would prefer another solution.
How can i do that ?
Can someone help me to give me some solutions ?
Thank you very much
Vikie
0
Comment
Question by:viki
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 

Expert Comment

by:kwiky
ID: 1584479
Let me try to sum it up:
You need entries in /etc/passwd but you don't want to allow the users to get a shell.

Possible solution: create the necessary entries in /etc/passwd but change their shell to /bin/false (instead of the usual /bin/bash) so they can't login. Alternatively, just lock those accounts by putting an "*" (w/o the quotes) as the first password character.
 
0
 

Author Comment

by:viki
ID: 1584480
Not exactly.
The users of a virtual domain must not appear in the /etc/passwd. They are somewhere else in another config file with the home directory of the domain it has to put in.
I made this with QMAIL by modifying the source code of vcheckpassord (it gets the IP of the requested domain, read the config POP file for this IP) but i would like to do it with sendmail+another POP server.
The reason is that the webmaster of the virtual domain can add or remove POP accounts with a HTML page, and i'd like to avoid my /etc/passwd modified by CGI scripts...
Only an domain has an entry in the /etc/passwd.
Am i clear ?
Vikie
0
 

Author Comment

by:viki
ID: 1584481
Adjusted points to 150
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 

Accepted Solution

by:
danielfonseca earned 300 total points
ID: 1584482
Ok.. what you want is domainaliases within sendmail I think.

Try this:

Edit /etc/sendmail.cf and add this directive

# Domain table (adding domains)
Kdomainalias btree /etc/domainalias.db

Add the virtual domains to your Cw record... probably already there, like:
Cwvh1.org
Cwvh2.org

Then, add/change this ruleset

###################################################################
###  Ruleset 98 -- local part of ruleset zero (can be null)     ###
###################################################################

S98

R$+ < $+ . >            $1 < $2 >
R$+ < $+ >              $: < > $(domainalias $1$2 $)
R< > $+ @ $*            $: < $1 > $(domainalias * @ $2 $)
R< $+ > * $*            $: < > $1 $2
R < $+ > $+             $: < > $2
R< > $*                 $: $>3 $1

Then all you have is make a domainalias file in /etc with each account and resective forwarding like:
joe@vh1.org      thismail@here
joe@vh2.org      thisother@there

IT's the only way to have the same login in a same machine with virtual domains account for different mailboxes.

Then you have to update the DB every time the /etc/domainaliases file changes with this:

makemap btree /etc/domainalias.db < /etc/domainalias

Whenever you want to add a virtual pop just append the record to the /etc/domainalias file and re-run the makemap command.

You can always check where the mail is going to be delivered by:
sendmail -v -bv user@host

You have all this and more in the Virtual Web HOWTO
probably /usr/doc/faq/howto/mini/Virtual-Web.gz for you, no?

Hope this works for you, and the points for me :-)

Daniel Fonseca
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1584483
keep in mind that some sendmail implementation accept domainaliases only at one Cw in sendmail.cf, like:

Cwvh1.org vh2.org


danielfonseca, you remember the swearing ... ;-)
0
 

Author Comment

by:viki
ID: 1584484
Hello,
Thank for your answers, i have no time to test it for the moment.(a ton of work ;-)) but, can you teel me what the syntax is to activate ruleset 98 with M4
Thank you
Viki

0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question