Installing and Administering Internet Services

Chapter 4 133
Installing and Administering sendmail
Creating sendmail Aliases
Modifying Your NIS Aliases Database
For information about the NIS or NIS+ aliases database, see Installing
and Administering NFS Services.
Rewriting the “From” Line on Outgoing Mail
HP provides a method that allows the “From” line on mail to be
rewritten. This can be useful where a user’s login name does not clearly
identify the user to intended mail recipients. For example, mail sent by
“bkelley (mailname)” can be changed to read from “Bob_Kelley
(maildrop)”.
To rewrite “From” lines on outgoing mail:
1. Create the file /etc/mail/userdb that contains two entries for each
mail user who will have outgoing mail on the system. The entries
should be in the following format:
bkelley:mailname Bob_Kelley
Bob_Kelley:maildrop bkelley
2. Build the /etc/mail/userdb.db file with the makemap routine:
makemap btree /etc/mail/userdb.db < /etc/mail/userdb
3. Uncomment the following line in the /etc/mail/sendmail.cf file:
UserDatabaseSpec=/etc/mail/userdb.db
4. Add the i flag to all the mailer definitions, to enable UDB sender
rewriting. For example, change the mailer definition from
Mlocal, P=/usr/bin/rmail, F=lsDFMAw5:/|@m,
S=10/30, R=20/40, T=DNS/RFC822/X-Unix,
A=rmail -d $u
to
Mlocal, P=/usr/bin/rmail, F=lsDFMAw5:/|@mi,
S=10/30, R=20/40, T=DNS/RFC822/X-Unix,
A=rmail -d $u
5. Uncomment the first rule in ruleset 94.