Files
smmapdfw/smmapdfw/doc
2004-10-12 14:51:51 +00:00
..
2004-10-11 14:50:41 +00:00
2004-10-12 14:51:51 +00:00
2004-09-23 21:23:34 +00:00
2004-09-26 19:21:42 +00:00
2004-10-11 15:01:11 +00:00

$Id$


    smmapd - A framework for workers for the sendmail socket map
    ------------------------------------------------------------


With release 8.13 sendmail introduces the socket map type. This is an
easy-to-use interface to other processes, performing tasks using data
provided by sendmail through the map and returning data to sendmail,
influencing the routing process.

smmapd is completely written in C, after a prototype written in Python
was used to prove the concept. (The prototype can be found here:
http://www.hottis.de/web/verifier/index.html)
 
An interface to plugin workers is provided. These workers perform the
"interesting" work.

The framework itself does actually nothing than communicating with
sendmail. It receives requests from sendmail, dispatches the requests
to the workers and sends back the data returned from the selected
worker to sendmail.

Thereby, the workers can completely concentrate on their particular
task and completely ignore the communication with sendmail, including
server-stuff, communication protocol and so on.

Currently two plugins are included in the tarball: an address verifier
(comparable to exim's or postfix's callback functionality) and a Cyrus
IMAP mailbox verifier. For both plugins m4 files to be used in the
sendmail configuration are included too.



Building smmapd
---------------

Currently only a Makefile is available, no autoconf and so on.
On Debian and FreeBSD it should build out-of-the-box, on Solaris it
builds also. Have a look into the Makefile and adapt it to your
environment.

The installation is currently not supported by the Makefile. Copy the
smmapd binary, the *.so files (plugins) and the smmapd.ini
configuration file into the desired directories.



Configuration
-------------

# every configuration not related to a particular
# plugin is in the global section
[global]

# shall we run in background
do_fork = 1

# where to place the pidfile
pid_file = smmapd.pid

# on which address shall we listen (currently 
# IN_ANYADDR can not be configured)
address = 127.0.0.1

# on which port shall we listen
port = 8887

# from shall we load plugins (currently only one 
# location)
plugin_dir = /home/who/Sources/private/smmapd

# which plugins should be loaded
plugins = test_worker1 test_worker2 verifier cyruscheck

# the section identifier of a plugin must match to the map
# name in the sendmail.cf
[verifier]

# the shared object file containing the plugin
obj = verify_worker.so

# verifier specific configuration begins here

# how long should we wait for an result before 
# answering to sendmail (time in seconds)
timeout_result = 5

# timeout for the smtp dialog when verifying an
# address
timeout_dialog = 20

# should results be cached
cache_enabled = 1

# how long should an result be kept in the cache
# (time in seconds)
cache_expiry = 86400

# sender address for the smtp dialog (angle brackets
# are required
sender_address = <>

# argument for the ehlo in the smtp dialog
ehlo_arg = local

# what is the smtp port?
smtp_port = 25

# for each best MX of a domain one checker thread
# will be started when verifying an address, how
# many should be started at maximum
max_checker_threads = 100

[cyruscheck]
obj = cyrus_worker.so

# how long should we wait for an answer of the depot
timeout = 10

# sender address for the lmtp dialog (angle brackets
# are required)
sender_address = <testsender>

# argument for the lhlo command
lhlo_arg = local

# what is your lmtp port?
lmtp_port = 24



Running smmapd
--------------

The following commandline options are supported:

-F  run in foreground, overwrites do_fork from configuration 
    file
-p  location of the pidfile, overwrites pidfile option from
    the configuration file
-f  location of the configuration file
-v  print version and release information
-h  print help screen
    


Programming interface
---------------------

will be documented later




Wolfgang Hottgenroth <woho@hottis.de>