Showing results for 
Search instead for 
Did you mean: 

Sendmail and the Genericstable

Go to solution
David Crowe

Sendmail and the Genericstable

Does anyone know how to activate the genericstable feature in Sendmail? I uncommented the line "Kgenerics dbm -o /etc/mail/genericstable" in the file along with the section from "# handle generics database" to but not including "# special case the users". I'm not sure what the syntax for the genericstable should when you create it using vi. Again, I can find no documentation on this proceedure so I am basically guessing that this is how it is done. Can anybody help??
Douglas Cromby_1
Valued Contributor

Re: Sendmail and the Genericstable

I have found the following information on setting this up. I hope that it all works well.

I would backup up first. You can get a clean copy from /usr/newconfig/etc/mail/.
I am assuming that you are using sendmail on HPUX.

1. You will need patch PHNE_17135.

2. Modify the /etc/mail/ to uncomment this line:

Kgenerics dbm -o /etc/mail/genericstable

3. Uncomment the lines after S93 in, following #handle generics database.

4. vi /etc/mail/genericstable
Add entries in this format:


5. Then do this:

makemap hash genericstable.db
6. Stop and stop sendmail:


/sbin/init.d/sendmail start

Alex Glennie
Honored Contributor

Re: Sendmail and the Genericstable

better late than never Douglas ;)
David Crowe

Re: Sendmail and the Genericstable

Thanks for the reply.

Yes we are running sendmail on a HPUX server. What we are trying to do is change the actual TO field to change where the mail is being delivered. I'm not sure whether the genericstable allows us to change the TO field or just the FROM field.

Any idea where I might be able to get the patch PHNE_17135? It doesn't seem to be part of the install. There are a number of PHNE patches but none with that particular number. Also how do you apply this patch?

Douglas Cromby_1
Valued Contributor

Re: Sendmail and the Genericstable

In effect using the genericstable will change the To field you are sending to. The genericstablke allows recipient addresses to be changed, so they can be delivered to new hosts. For example can be transformed into The genericstable provides this type of translation.

[There is a very good book on sendmail with all this in it. See Sendmail by O'Reilly, ISBN 1-56592-222-0. It should be noted that different sendmail flavours are all slightly different].

A more common way of achieving this translation is to use a User Database. I will get the details together and post them here.

The patch I mentioned PHNE_17135 is a sendmail patch. You will need some sort of HP support contract to obtain it. It can be obtained from the web site It will ask for a password. It really means that you need to be on sendmail version 8.8.6 or above. To see the version, telnet to host 25 of the server:

telnet hostname 25

You will see something like:

220 ESMTP Sendmail 8.9.3 (PHNE_18979)/8.9.3; Tue, 6 Feb 2001 10:24:59 GMT

where the version in this case is 8.9.3.
Douglas Cromby_1
Valued Contributor

Re: Sendmail and the Genericstable

To set up the User Database, you need some understanding of it all, and I would suggest looking at O'Reilly. However, here are the steps necesaary:

1. Modify /etc/mail/ to uncomment this line:

O UserDatabaseSpec=/etc/mail/userdb

2. Create the user database.

%makemap btree /etc/userdb.db < /etc/userdb

here the /etc/userdb is a text file:


key value

The general format of the file is:

Bob.Roberts:maildrop bop

Here, outgoing mail from the user named bob will be addressed as though it is from

Note that there are pairs of mailname and maildrop.


The value is the official delivery address for this user.


The mailname keyword causes a reverse alias transformation, wherein the login name in the key is changed into the address in the value for outgoing mail.

3. Stop and restart sendmail.