Sendmail/HESIOD configuration


To compile with the HESIOD option turned on, you currently need to modify the Makefile for your particular platform. In my case I modified the file src/Makefiles/Makefile.Linux. You should then be able to follow the regular instructions for making and installing Sendmail.


Compiling with HESIOD gives you a new map type. To enable this for usage you only need to define a map and add in a few lines into your sendmail configuration to use that new map.

This functionality is shown with this example M4 Makefile exerpt. Just add this to your already running M4 configuration file to get the HESIOD enhanced capability.

File: sparks.mc (m4 makefile)

LOCAL_CONFIG

# Declare mbt as a hash-lookup database:
Kmbt hash /etc/mbt.db

# Hesiod Database - look it up in the 'maildrop' hesiod type
Khesmail hesiod maildrop

LOCAL_RULE_0

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

In the above M4 configuration file you will notice a map called 'mbt'. This map is used to set up defaults and additional mapping that you may not wish to put into the HESIOD map file. I myself use it to bounce messages that are destined to users who do not exist in a given virtual domain.

File: /etc/mbt

#  /usr/sbin/makemap hash mbt.db <mbt
#       Format is <user@site> <replacement user@site>
#
#            joe@somedom.com     joe
#            jim@somedom.com     jim@othersite
#            somedom.com         ERROR "No such user"
#
flora.ottawa.on.ca      ERROR "User not found in Virtual Domain"
flora.org               ERROR "User not found in Virtual Domain"

[FLORA HOME]