LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-20-2005, 06:20 AM   #1
dineshbabub
LQ Newbie
 
Registered: Jun 2005
Posts: 3

Rep: Reputation: 0
Sendmail and Virtual Hosting


Hi All

Configuring Sendmail:

1. I have two domains on the same server namely xyz.com and abc.com now the issue is when I send mail to dinesh@xyz.com it should only go to xyz.com and not to dinesh@abc.com since I have configured two users with for the same domain name.

Please let me know how to do this in sendmail or to be clear how to configure it .

Thanks & Regards
Dinesh
 
Old 06-24-2005, 01:11 AM   #2
bretticus
Member
 
Registered: Nov 2003
Distribution: Debian 3.1
Posts: 36

Rep: Reputation: 15
Setup two user accounts:

1) dinesh-xyz
2) dinesh-abc

Make sure you have the virtusertable feature setup
(Look for or enter the following into sendmail.mc):

FEATURE(`virtusertable',`hash /etc/yourmailpath/virtusertable')dnl

Create or edit your /etc/yourmailpath/virtusertable file:

Setup the following entries:

dinesh@xyz.com dinesh-xyz
dinesh@abc.com dinesh-abc

Build the db file Sendmail uses for this feature:
makemap hash /etc/yourmailpath/virtusertable.db < /etc/yourmailpath/virtusertable

Reload Sendmail.
 
Old 06-24-2005, 01:19 AM   #3
dineshbabub
LQ Newbie
 
Registered: Jun 2005
Posts: 3

Original Poster
Rep: Reputation: 0
Hi Bret

Great!!! I understood that. But what if I want to have the username as 'dinesh' only because as you know

1. We have two domains and the users are sending mails to webmaster@domainname.com so there can be only one webmaster right? so how to set this one user and make that mail redirect to that respective domain name abc.com and xyz.com.

Thanks Bret
 
Old 06-24-2005, 01:36 AM   #4
bretticus
Member
 
Registered: Nov 2003
Distribution: Debian 3.1
Posts: 36

Rep: Reputation: 15
Currently with 2 or more domains, webmaster@eitherdomain.com goes to one user's mailbox. This is probably what you want anyway. Just look at the header to see which domain name they used. You can setup a filter rule to put them in different folders if you want.

You can use this method for 'dinesh' as well if you want only one username. How will you seperate mail accounts unless you have two user accounts?

I know some POP3 mail servers allow you to use user@domainname.com as a username when you download mail. I don't know how they do this except maybe they offer SMTP and POP3 rolled into one suite of integrated software.
 
Old 07-07-2005, 03:34 AM   #5
dineshbabub
LQ Newbie
 
Registered: Jun 2005
Posts: 3

Original Poster
Rep: Reputation: 0
Hi

I found that it is procmail in sendmail does this job. The exact file name is .procmailrc is the file that separates two domains with the same user.

Please let me know if anyone has anymore suggestions.

Regards
Dinesh
 
Old 07-07-2005, 12:44 PM   #6
danilo9999
LQ Newbie
 
Registered: Jul 2005
Posts: 2

Rep: Reputation: 0
Hi, i have some problem like dineshbabub, I have had all things mentioned here, but only my problem is, how to answer with second domain??

I have three accounts: sales@domain1.com, sales@domain2.com (its new) and personalaccount@domain1.com.

In both accounts (sales@domain1.com and domain2.com) I can receive e-mail to redirected personalaccount@domain1.com,, but when I have to answer emails with sales@domain2.com, there appear with sales@domain1.com.

I need to answer with same account (sales@domain2.com).

Thanks
Dan
 
Old 07-07-2005, 12:57 PM   #7
danilo9999
LQ Newbie
 
Registered: Jul 2005
Posts: 2

Rep: Reputation: 0
My virtuseratable have some things like:
sales@domain2.com personalaccount@domain1.com

In sendmail.mc has:
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl

In named.conf added domain2.com in two views (external and internal)

zone "domain2.com" IN {
type master;
file "internal-db.domain2.com";
};
view external
zone "domain2.com" IN {
type master;
file "external-db.domain2.com";
};

in local-host-names added new domain: domain2.com

Any ideas???

Thanks
 
  


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
Sendmail with virtual hosting toraghun Red Hat 6 12-02-2005 02:15 PM
Virtual hosting with sendmail gauge73 Linux - Networking 5 08-26-2005 01:40 PM
Sendmail Virtual Hosting vinhdt Linux - Software 1 05-02-2005 11:24 AM
about sendmail configuration with virtual hosting dingzihang Linux - Networking 0 03-09-2004 10:56 PM
about sendmail configuration with virtual hosting dingzihang Linux - Networking 2 03-08-2004 03:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:09 PM.

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