removing hostname from sendmail (520 Views)
Valued Contributor
Timothy P. Jackson
Posts: 342
Registered: ‎12-06-2002
Message 1 of 3 (520 Views)

removing hostname from sendmail

[ Edited ]

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

Honored Contributor
Bill Hassell
Posts: 14,226
Registered: ‎05-29-2000
Message 2 of 3 (515 Views)

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

Acclaimed Contributor
Dennis Handly
Posts: 25,298
Registered: ‎03-06-2006
Message 3 of 3 (509 Views)

Re: removing hostname from sendmail

[ Edited ]

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


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

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.