Simpler Navigation coming for Servers and Operating Systems
Coming soon: a much simpler Servers and Operating Systems section of the Community. We will combine many of the older boards, and you won't have to click through so many levels to get at the information you need. If you are looking for an older board and do not find it, check the consolidated boards, as the posts are still there.
Showing results for 
Search instead for 
Did you mean: 

removing hostname from sendmail

Timothy P. Jackson
Valued Contributor

removing hostname from sendmail

Hello Everyone,


my emails show up as being sent from   I need them to be


Does anyone know how to remove the hostname "iusghp5" from the address.


I have read through a ton of forum threads and I still cannot figure it out. I tried to set the "DM" paramater in and that doesn't seem to help.



Any help would be greatly appreciated!!





 P.S.This thread has been moved from HP-UX>System Administration to HP-UX > messaging- HP Forums Moderator

Bill Hassell
Honored Contributor

Re: removing hostname from sendmail

This is called masquerading and DM (plus C{M}) can accomplish this. Also, mailx can be used by setting the -r option.


For DM and C{M} in, it would look like this:



Note that there are no spaces.

Using mailx, you can test masquerading like this:


mailx -r -s testing123 < /etc/issue


But with mailx, you can specify any email address.


mailx -r -s testing123 < /etc/issue

Bill Hassell, sysadmin
Dennis Handly
Acclaimed Contributor

Re: removing hostname from sendmail

>mailx can be used by setting the -r option.


Unfortunately when you use -r, you can't use any of the useful tilde commands.