Sponsored Content
Operating Systems Linux Red Hat Sendmail - Masquerading multiple domains with different addresses Post 302669295 by Rohit Bhanot on Tuesday 10th of July 2012 09:53:41 PM
Old 07-10-2012
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.

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:
#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:
box.example.com	> 123.home.com
host1.example.com > 456.home.com

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.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

multiple domains

Hello, I have 3 domains virtually hosted "name based" the first one "domain1.com" has its ServerName entered as domain1.com. this domain will load in a browser by www.domain1.com or simply domain1.com. the next two domains "domain2.com" and "domain3.com" ServerNames are listed as domain2.com and... (2 Replies)
Discussion started by: ericg
2 Replies

2. UNIX for Dummies Questions & Answers

Multiple Domains with BIND

I need help creating multiple domains with one single DNS server.ex: domain1.com and domain2.com on a sigle machine 1.2.3.4 Thx (1 Reply)
Discussion started by: lekan
1 Replies

3. UNIX for Dummies Questions & Answers

Sendmail Masquerading

Hi, I'm trying to get my mails sent from the address user@domain instead of user@hostname.domain. Should be simple masquerading configuration in sendmail config files, but this is where I fall (newbie). The sendmail.cf is not recommended for editing. There should be some kind of .mc file that... (0 Replies)
Discussion started by: shimpanzo
0 Replies

4. Solaris

sendmail and unqualified addresses

I have a solaris 10 server running sendmail 8.13.8, configuration file V10. On another server I am able to send local emails without appending a domain name but on this server I cannot. The mail does not bounce, the log file says they are sent, but they are not delivered. There isn't a problem... (10 Replies)
Discussion started by: csgonan
10 Replies

5. SCO

Sendmail masquerading

I am having a problem with my sendmail configuration I have masquerading on but when I send a mail to multiple people it masquerades my email but not the others? see the sample below: From: name@vegena.net Sent: Friday, July 24, 2009 9:42 AM To: name2@atksco1.vegena.net;... (0 Replies)
Discussion started by: garycrow
0 Replies

6. Solaris

Kerberos setup for multiple AD domains

Hi there: I am currently using Kerberos on Solaris 9 to autenticate using windows active directory. It is working fine, however, we just were made aware that instead of one domain, we have multiple. We configured one real with only one domain, however, I need the autentication process to also... (3 Replies)
Discussion started by: ramosl05
3 Replies

7. AIX

Mutt/Sendmail Masquerading Problem on AIX 5.3

We are running Unix AIX 5.3 and I have been asked to masquerade the sender name on our email processing. We have one domain name and many users: user1@domainname user2@domainname user3@domainname We use mutt/sendmail to do our email processing. I discovered that using genericstable within... (1 Reply)
Discussion started by: FHMARTINS
1 Replies

8. UNIX for Advanced & Expert Users

Samba in multiple domains problem

Hello all. I'm hoping you can help with a problem I'm having with Samba. I have Samba running on a Solaris host. All of my users authenticate against the same domain, but some of my users are using PCs on a different domain. When the users whose PCs are on a different domain try to connect to... (0 Replies)
Discussion started by: trouphaz
0 Replies

9. AIX

sendmail masquerading on AIX.

Hello all, I have a requirement wherein I need to change the "received from" address parameter for outgoing mails from an AIX server. I tried using the option to specify the "reply-to" address, still my relay server rejects the mails as the "received from" address still contains . I know,... (1 Reply)
Discussion started by: thisissouvik
1 Replies

10. UNIX for Advanced & Expert Users

Sendmail adding .org after some addresses

Hello, We run a mailing list and on our server sendmail is adding .org after some addresses, e.g. the first and third entries below in the process listingroot 1528 0.0 0.1 11764 6524 ? Ss Sep21 0:01 sendmail: ./p8NMgM0X031218 dimaventures.com.org.: user open root ... (1 Reply)
Discussion started by: prautt
1 Replies
MAKEMAP(8)						      System Manager's Manual							MAKEMAP(8)

NAME
makemap - create database maps for sendmail SYNOPSIS
makemap [-C file] [-N] [-c cachesize] [-d] [-D commentchar] [-e] [-f] [-l] [-o] [-r] [-s] [-t delim] [-u] [-v] maptype mapnam DESCRIPTION
Makemap creates the database maps used by the keyed map lookups in sendmail(8). It reads input from the standard input and outputs them to the indicated mapname. Depending on how it is compiled, makemap handles up to three different database formats, selected using the maptype parameter. They may be dbm DBM format maps. This requires the ndbm(3) library. btree B-Tree format maps. This requires the new Berkeley DB library. hash Hash format maps. This also requires the Berkeley DB library. In all cases, makemap reads lines from the standard input consisting of two words separated by white space. The first is the database key, the second is the value. The value may contain ``%n'' strings to indicate parameter substitution. Literal percents should be doubled (``%%''). Blank lines and lines beginning with ``#'' are ignored. Notice: do not use makemap to create the aliases data base, but newaliases which puts a special token into the data base that is required by sendmail. If the TrustedUser option is set in the sendmail configuration file and makemap is invoked as root, the generated files will be owned by the specified TrustedUser. Flags -C Use the specified sendmail configuration file for looking up the TrustedUser option. -N Include the null byte that terminates strings in the map. This must match the -N flag in the sendmail.cf ``K'' line. -c Use the specified hash and B-Tree cache size. -D Use to specify the character to use to indicate a comment (which is ignored) instead of the default of '#'. -d Allow duplicate keys in the map. This is only allowed on B-Tree format maps. If two identical keys are read, they will both be inserted into the map. -e Allow empty value (right hand side). -f Normally all upper case letters in the key are folded to lower case. This flag disables that behaviour. This is intended to mesh with the -f flag in the K line in sendmail.cf. The value is never case folded. -l List supported map types. -o Append to an old file. This allows you to augment an existing file. -r Allow replacement of existing keys. Normally makemap complains if you repeat a key, and does not do the insert. -s Ignore safety checks on maps being created. This includes checking for hard or symbolic links in world writable directories. -t Use the specified delimiter instead of white space (also for dumping a map). -u dump (unmap) the content of the database to standard output. -v Verbosely print what it is doing. SEE ALSO
sendmail(8), newaliases(1) HISTORY
The makemap command appeared in 4.4BSD. $Date: 2008/05/02 23:07:48 $ MAKEMAP(8)
All times are GMT -4. The time now is 07:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy