1830169 Members
5910 Online
109999 Solutions
New Discussion

Configure sendmail.cf

 
Alianto
Advisor

Configure sendmail.cf

Hi,

Does anyone know how to configure sendmail.cf as such the sender and recipient address will be changed, like follow,

Initially userA@myserver.com with new configuration will be changed to be
userA.myserver@mydomain.com

Thanks

7 REPLIES 7
Fabio Ettore
Honored Contributor

Re: Configure sendmail.cf

Hi Alianto,

if I understand good then try this link:

http://www.sendmail.org/virtual-hosting.html

Note arguments about genericstable and masquerading.

Does it answer to your request?

HTH.

Best regards,
Ettore
WISH? IMPROVEMENT!
Jose Mosquera
Honored Contributor

Re: Configure sendmail.cf

Hi,

# my official domain name
# ... define this only if sendmail cannot automatically determine your domain
#Dj$w.Foo.COM
Dj mydomain.com

Then
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

Rgds.
Geoff Wild
Honored Contributor

Re: Configure sendmail.cf

Set the DM Macro:

DMmydomain.com

then restart sendmail

# Masquerade as (DM): #
# #
# If you wish to have mail appear to be from some host or location #
# other than the local host, set macro M to the name you wish to #
# masquerade as. This is also know as site hiding and was set using #
# the DY macro in previous releases of hp-ux. This might be used to #
# make mail appear as from a site rather than an individual host or #
# from a central mail hub. Note, however, that just making mail #
# appear to be from a different location does not mean that the #
# receipient will be able to reply to the email. If you use this feature #
# you will also need to be sure that you can reply to the email. #
# #
Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Bruno Ganino
Honored Contributor

Re: Configure sendmail.cf

Hi Alianto, see here
http://people.freenet.de/slgig/op_en/sendmail_cf.html
Bruno
Torino (Turin) +2H
Sanjay_6
Honored Contributor

Re: Configure sendmail.cf

Hi,

Try this doc from itrc,

http://www1.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000068402500

The itrc doc id is KBRC00010421.

Hope this helps.

Regds
Alianto
Advisor

Re: Configure sendmail.cf

Hi All,

Please take note "myserver" name must follow the user name. So from

userA@myserver.com

will be changed become

userA.myserver@mydomain.com

It is not like
userA@mydomain.com ( this is easier to set )

Thanks,

John
Fred Martin_1
Valued Contributor

Re: Configure sendmail.cf

You could use userdb, but you'd have to maintain it.

In the sendmail.cf file, use this line:
O UserDatabaseSpec=/etc/mail/userdb.db

Then, you build a file /etc/mail/userdb with two lines for each person:

userA:mailname userA.myserver@myserver.com
userA.myserver:maildrop userA

Each time you modify the above file, run the following to re-create the file /etc/mail/userdb.db ...

# makemap btree /etc/mail/userdb.db < /etc/mail/userdb

The maildrop line tells sendmail to receive email for userA.myserver, but deliver it to userA. The mailname line changes the "from" of outgoing mail, so that it says it's from userA.myserver@myserver.com.

Having said that, the real username isn't secret, it's visible in the mail header if one cares to look.

One problem with this setup, is that userA could create an outbound email like this:

To: tom@someweb.com
Cc: userB

The mail to userB works because userB is a valid local user; but if tom does a "reply to all" the userB delivery will fail, as it's not fully qualified for the return (and, not the maildrop name, either).

Fred
fmartin@applicatorssales.com