October 17, 2018, 12:33:20 AM

News : LinuxSolved.com Linux Help Community Forum..

Author Topic: Sendmail - Masquerading multiple domains with different addresses  (Read 2901 times)

Offline rohit_4739

  • New Member
  • Posts: 2
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.

I was reading an post on it 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: [Select]
#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. I have installed the db4-utils as well as db4-devel package and other related packages. So my first question here is why makemap is not working with dbm but with hash ?
So can anyone please answer that.

Since "dbm" format is not working so i used "hash" and I am able to generate the genericstable.db file but the domain masquerading is still not working as desired.  What i am trying to achieve is that box.example.com should masquerade to 123.home.com and host1.example.com should masquerade to 456.home.com as under.
Code: [Select]
box.example.com > 123.home.com
host1.example.com > 456.home.com
Here are the various config files:

Code: [Select]


FEATURE(`genericstable', `hash /etc/mail/genericstable')dnl
FEATURE(`access_db', `hash -o -T<TMPF> /etc/mail/access')dnl

Code: [Select]
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.