LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Sendmail - Masquerading multiple domains with different addresses (https://www.linuxquestions.org/questions/linux-server-73/sendmail-masquerading-multiple-domains-with-different-addresses-4175415961/)

Rohit_4739 07-10-2012 02:29 PM

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.

TB0ne 07-10-2012 02:58 PM

Quote:

Originally Posted by Rohit_4739 (Post 4724231)
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.

Rohit_4739 07-10-2012 05:56 PM

Quote:

Originally Posted by TB0ne (Post 4724257)
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.

TB0ne 07-10-2012 06:38 PM

Quote:

Originally Posted by Rohit_4739 (Post 4724386)
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?

Rohit_4739 07-10-2012 06:47 PM

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.

Rohit_4739 07-10-2012 08:39 PM

Can somebody please reply

Rohit_4739 07-11-2012 01:23 PM

Can anyone please respond,


All times are GMT -5. The time now is 02:59 PM.