SUMMARY: sendmail and makemap for solaris 2.5

From: Dave McFerren (
Date: Sun Aug 25 1996 - 13:25:02 CDT

Sun Managers:

This is the solution I had of compiling sendmail and having it use a database in order to do virtual email hosting. I previously had downloaded it, but didn't have any luck trying to compile makemap. Fortunately, you don't have to use the makemap utility. You can just as easily use the dbm from makedbm executable here it is. This is the way to get the external database tables available for your mailer. I will give this solution as steps and explain what they do at each step....

1. download or ftp the sendmail.8.7.5.tar.gz file from somewhere on the internet. Tim knows where it is, but is is probably on the ftp.berkeley server somewhere.

2. Ungzip and untar the file. It will create a directory called sendmail-8.7.5.

3. go to the sendmail/src directory and edit the pathnames.h file. Where you see a /etc/ put /etc/mail/ Also where you see a /etc/ put /etc/mail/

4. go to the sendmail/src/Makefiles directory and edit the Makefile for SunOS.5.5. Search for the -lbsd stuff and take it out. There is a comment about it in the file. Then look for nroff and groff. remark out the groff and remark in the nroff. Also take out the mandocs line.

5. go to the sendmail/src directory and type makessendmail. This should make the sendmail executable for you.

6. copy the sendmail/src/obj.SunOS.5.5.sun4/sendmail executable to /usr/lib/sendmail.localcompile.

7. Now that you have the executable, you need the file that will go with it. I have not learned the intracacies of using the m4 make stuff, so the easiest way to get this file is use you web browser to go to He has a generator that will manufacture the file for you. Put in all the necessary information (make sure you use dbm and not hash). The file will be generated, simply save it from netscape and name it say,, and mv it to the /etc/mail directory.

8. Edit your file and make sure all the top and bottom comments are deleted. If you don't do this, when sendmail is started, you will get the error messages up on your screen.

9. Ok, you are still missing a piece of the puzzle. We need a mailertable file, so go to the /etc/mail directory and type "touch mailertable". Then type "makedbm mailertable mailertable". This creates an empty database for the mailertable to work from. We can fill it in as needed later.

10. Now kill your present sendmail daemon. Do this by typing " /etc/init.d/sendmail stop".

11. save the old sendmail daemon and files (just in case we messed something up. Do this...

cp /etc/mail/ /etc/mail/
cp /usr/lib/sendmail /usr/lib/sendmail.orig

12. Now lets install our own.
cp /etc/ /etc/
cp /usr/lib/sendmail.localcompile /usr/lib/sendmail

13. Make sure it has these files have the correct username and preferences. They should have these parameters...
-r-sr-x--x 1 root bin 307560 Aug 24 18:26 /usr/lib/sendmail*
-rw-r--r-- 1 root other 23343 Aug 24 18:32 /etc/mail/

This can be accomplished by typing "chmod 4554 /usr/lib/sendmail" and "chmod 644 /etc/mail/".

14. This should work at this point, but just to make sure, edit the file. Since you probably do not have a file, it would be best to put a Cw line in you file. Edit the file and look for a line that starts with a Cw. Make sure it is not commented out, and make it look like this....


Also make sure that the line about is commented out.

Now your mailer will collect mail for your, too.

15. One more thing..
You need these lines directly after the S98 line in file.

 # Use mailboxtable-database:
R$+ < @ $+ . > $: $1 < @ $2
R$+ < @ $+ > $* $: $(mailertable $1@$2 $: $1 < @ $2 > $3 $)
R$+ < @ $+ > $* $: $(mailertable $2 $: $1 < @ $2 > $3 $)
RERROR $* $#error $: $1
R$+ < @ $+ > . $: $1 < @ $2 . >

Make sure the first and second parts of each line are seperated by tabs...
like this
R$stuff tab $: morestuff

Save your file and we are ready to start.

15. Now start you sendmail back up, like this...
type "/etc/init.d/sendmail start". You should be at the console to do this to make sure you do not get any strange error messages.

Now test what you got. Make sure that you have an MX record in your dns for the address.

Hope this helps someone...

Dave McFerren
Tybrin Commercial Systems Administrator
(904)664 6144 fax (909)664 6377
"It never hurts to help!" - Eek the Cat.

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:11:08 CDT