Technical article 107656

How do I hide the hostname in the origin line of my mail using sendmail?

OpenServer 5.0.0OpenServer 5.0.2

Written · Last revised

Problem

I would like to hide the hostname in the origin (From:) line of my mail address using sendmail.

Solution

As root, edit the file /usr/lib/sendmail.cf.  Search for an
entry that looks similar to the following:
Mlocal, P=/usr/bin/lmail, F=lsFDMPuhCE, S=10, R=20, A=lmail $u
Look for the symbol S= in this line.  The number to the
right of the "=" refers to the ruleset used to rewrite
the sender address.  Now search for the ruleset specified
to the right of the "=" sign (in this case 10).   Add the
following lines to the beginning of the specified ruleset
so that it looks similar to the following:
S10
R<$*@$*.$D>             $:<$1@$D>
R$*@$*.$D               $:$1@$D

Now, search for an entry that looks similar to the following:

Mtcp,   P=[IPC], F=msDFMuCXP, S=14, R=20, A=IPC $h, E=\r\n
Once again, look for the symbol S= in this line.  The S=
tells sendmail to rewrite the sender address with the ruleset
 specified on the right side.  Now search for that ruleset
 (in this case 14) and add the following line to the beginning
 of the ruleset so it looks similar to the following:
S14
R$*@$*.$D               $:$1@$D
Save and exit this file.  You must restart the sendmail
daemon for these changes to take effect.

See also

sendmail(ADMN), mail(C)

From the Xinuos technical article database, record 107656. Reproduced with permission. The original is at www.sco.com/ta/107656, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.