LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-10-2012, 02:29 PM   #1
Rohit_4739
Member
 
Registered: Oct 2010
Distribution: Red Hat
Posts: 228

Rep: Reputation: 9
Sendmail - Masquerading multiple domains with different addresses


Hello Friends,

I am running Sendmail 8.14 on rhel6. I have one simple question regarding domain masquerading, i would want to masquerade different domains with different addresses. By that what i mean is that lets say i have 3 domains as home.com, example.com, test.com and i would want to masquerade these as under

home.com > (123.com - just fictitious)
example.com > (456.com)
test.com > (789.com)

So how can i achieve this functionality, because by default MASQUERADE_AS(`key_value') directive will masquerade all the domains with the value specified.
 
Old 07-10-2012, 02:58 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,661

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by Rohit_4739 View Post
Hello Friends,
I am running Sendmail 8.14 on rhel6. I have one simple question regarding domain masquerading, i would want to masquerade different domains with different addresses. By that what i mean is that lets say i have 3 domains as home.com, example.com, test.com and i would want to masquerade these as under

home.com > (123.com - just fictitious)
example.com > (456.com)
test.com > (789.com)

So how can i achieve this functionality, because by default MASQUERADE_AS(`key_value') directive will masquerade all the domains with the value specified.
From a VERY quick Google search:
http://www.techrepublic.com/article/...omains/5033970

Tells you how to set up sendmail to handle multiple domains.
 
Old 07-10-2012, 05:56 PM   #3
Rohit_4739
Member
 
Registered: Oct 2010
Distribution: Red Hat
Posts: 228

Original Poster
Rep: Reputation: 9
Quote:
Originally Posted by TB0ne View Post
From a VERY quick Google search:
http://www.techrepublic.com/article/...omains/5033970

Tells you how to set up sendmail to handle multiple domains.
Hi TB0ne,

I read that article and was working my way through it, however i am facing a small issue in generating the genericstable.db file using makemap. This is the error i get

Code:
#makemap dbm genericstable < genericstable 
makemap: Need to recompile with -DNDBM for dbm support
How ever it is working fine when i use hash db with makemap while generating the access.db. I have installed the db4-utils as well as db4-devel package and other related packages.

So could you please guide a bit.

Secondly with hash db i am able to generate the genericstable.db file but the domain masquerading is not working as desired. Here are the various config files:

Code:
sendmail.mc

DOMAIN(generic)dnl
define(`confLOG_LEVEL',`10')dnl
define(`confMAX_MESSAGE_SIZE',`4096')dnl
define(`confMAX_RCPTS_PER_MESSAGE',`2')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`masquerade_entire_domain')dnl
MASQUERADE_AS(`home.com')dnl
MASQUERADE_DOMAIN(`box.example.com')dnl
FEATURE(`genericstable', `hash /etc/mail/genericstable')dnl
GENERICS_DOMAIN_FILE(`/etc/mail/genericstable')dnl
FEATURE(`access_db', `hash -o -T<TMPF> /etc/mail/access')dnl
MAILER(local)dnl
MAILER(smtp)dnl
Code:
genericstable file

box.example.com		123.home.com
host1.example.com	456.home.com
So could you please let me know what i need to do here to make things work.I am a newbie to sendmail, so please do not mind if i miss some basic thing.

Last edited by Rohit_4739; 07-10-2012 at 06:26 PM.
 
Old 07-10-2012, 06:38 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,661

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by Rohit_4739 View Post
Hi TB0ne,
I read that article and was working my way through it, however i am facing a small issue in generating the genericstable.db file using makemap. This is the error i get

Code:
#makemap dbm genericstable < genericstable 
makemap: Need to recompile with -DNDBM for dbm support
How ever it is working fine when i use hash db with makemap while generating the access.db. I have installed the db4-utils as well as db4-devel package and other related packages. So could you please guide a bit.

Secondly with hash db i am able to generate the genericstable.db file but the domain masquerading is not working as desired. Here are the various config files:
'Guide' with what? If you've generated it with hash, and it's working, what's left?
Quote:
So could you please let me know what i need to do here to make things work.I am a newbie to sendmail, so please do not mind if i miss some basic thing.
Could try to, but since you don't say what's not working as desired, or give any clues from your logs, how can we?
 
Old 07-10-2012, 06:47 PM   #5
Rohit_4739
Member
 
Registered: Oct 2010
Distribution: Red Hat
Posts: 228

Original Poster
Rep: Reputation: 9
Quote:
'Guide' with what? If you've generated it with hash, and it's working, what's left?

Not sure if you understood the question clearly, my doubt here is why makemap is not working with dbm but with hash ?

Quote:
Could try to, but since you don't say what's not working as desired, or give any clues from your logs, how can we?
I guess i explained this i my initial post that what i am trying to achieve, when you gave me that link.


box.example.com > 123.home.com
host1.example.com > 456.home.com

This is what i am trying to achieve that is box.example.com should masquerade to 123.home.com and host1.example.com should masquerade to 456.home.com and this is what is not working.

Last edited by Rohit_4739; 07-10-2012 at 06:49 PM.
 
Old 07-10-2012, 08:39 PM   #6
Rohit_4739
Member
 
Registered: Oct 2010
Distribution: Red Hat
Posts: 228

Original Poster
Rep: Reputation: 9
Can somebody please reply
 
Old 07-11-2012, 01:23 PM   #7
Rohit_4739
Member
 
Registered: Oct 2010
Distribution: Red Hat
Posts: 228

Original Poster
Rep: Reputation: 9
Can anyone please respond,
 
  


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 multiple domains sachin1361 Linux - Enterprise 1 10-27-2007 08:39 PM
Sendmail not Masquerading Domains mpgram Linux - Networking 0 06-06-2005 09:20 PM
multiple domains, one sendmail sqn Linux - Networking 0 12-23-2003 04:46 PM
Multiple email addresses with qmail (same prefix, different domains) Shaolyen Linux - General 1 11-16-2003 11:50 PM
Sendmail with multiple domains.....where do I start? tisource Linux - Networking 7 05-20-2003 07:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:19 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