Operating System - HP-UX
1849806 Members
2536 Online
104044 Solutions
New Discussion

sendmail masquerade outbound help

 
SOLVED
Go to solution
Denver Osborn
Honored Contributor

sendmail masquerade outbound help

Howdy, I've got a small problem that I can't figure out.

Here's my problem. I accept mail for local user "user1@domain1.com" and remote user "user2@domain2.com". My sendmail.cw has both domain1.com and domain2.com listed so I can accept mail for both, and DM is set to domain1.com in sendmail.cf.

I need to send an outbound message and change the From: address to user2@domain2.com, but my current config changes user2@domain2.com to user2@domain1.com. Unless I remove domain2.com from sendmail.cw, or st DM to null.

Any thoughts on how to get this to work?

Thanks
-denver
4 REPLIES 4
Steven E. Protter
Exalted Contributor
Solution

Re: sendmail masquerade outbound help

Yes.

create the users in /etc/mail/virtusertable and /etc/mail/genericstable

Then use sendmail macros.

http://www.hpux.ws/buildmail.hpux.text

This file will tell you where the macro file is in the that script.

Here is what you need in there:
Cwdomain1.com
Cwdomain2.com
MASQUERADE_DOMAIN(domain1.com)dnl
MASQUERADE_DOMAIN(domain2.com)dnl

run the script, building the databases and generating a new sendmail.cf file.

I love this stuff. Let me know if you have troubles.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Sanjay_6
Honored Contributor

Re: sendmail masquerade outbound help

Hi Denver,

use the -r reply_to_address option with the mailx command,

cat some_file |mailx -s "Some subject" -r user2@domain2.com some_address.com

Hope this helps.

Regds
Sanjay_6
Honored Contributor

Re: sendmail masquerade outbound help

Hi Denver,

You can also try the userdb database to make this change permanent,

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

The itrc doc id is KBRC00010421.

Hope this helps.

Regds
Denver Osborn
Honored Contributor

Re: sendmail masquerade outbound help

Thanks for the info SEP! Your info got me looking in the right direction. I appreciate it.

Ended up adding "CNdomain2.com" to the sendmail.cf just above "DMdomain1.com". This took care of it an allowed me to use From: domain2.com w/out it getting changed to domain1.com.

Thanks!
-denver