To change the person that the message appears to come from--that is, all the stuff
on the left side of the @ --use the generics rules. Specifically, on ednhp7, I had
to uncomment the Kgenerics setting in the section labeled 'Generics table (mapping
outgoing addresses)'. I chose the hash version instead ot the dbm version, like so:
I also had to go to section S93 and uncomment all the rules for handling the
Then, go to the /etc/mail directory, or wherever you find the aliases and sendmail.cf files,
and create a text file containing the IDs and the addresses you want
to map them to. The local ID to be mapped goes on the left and the to-be-mapped-to address
goes on the right, like so:
Next, convert the genericstable file into a db file that sendmail can use:
This will create a file called genericstable.db that sendmail will now look to. You could just leave off the '< genericstable' part and enter the mappings right there by hand; makemap defaults to getting input from STDIN. I just think that creating a text file and using that for the input makes it more akin to the aliases process and makes it easier to see what generics have previously been created. In the example above, I created a hash file. The man page on makemap lists two other formats, dbm and btree. Looking around the internet, using dbm seems popular and may be preferred. Using dbm produces two files, a .pag and a .dir. I didn't see any mention of using the btree format. The syntax for dbm is the same except you use the flag 'dbm' instead of 'hash' (and make sure 'dbm' is the specified database type on the Kgenerics line in sendmail.cf).
Because of the changes made to the sendmail.cf file, you have to restart sendmail. Later, if you just make changes to the genericstable text file and regen the db file, it is not necessary to restart sendmail. Note that depending on what you put in the generics table, you may not need to modify the DM masquerade setting in sendmail.cf. For example, the applmgr setting in the example above will automatically change the domain from ednhp7.nextelpartners.com fo nextelpartners.com for applmgr's outbound messages. If this is the only ID that needs such a change, then masquerading can be ignored.