WARNING:
It is archival version of discontinued web site anfi.homeunix.net.
It is not actively maintained.

Smart Table (sendmail)

Abstract

The document describes how to make sendmail select smart host (e-mail relay host) based on envelope sender address (full address or domain part only).


Usage

In smarttable file you can put entries like the ones given below:

test@mike.com.hk lesspopular.mailhub.com
@mike.com.hk     popular.mailhub.com
test@domain.pl   uucp:nodex
test@domain.us   esmtp:[smtp.domain.us]:my.isp
# relay for <> sender [version 8.2+ of smarttable]
@                relay:smtp.myisp.com

lesspopular.mailhub.com will be used to relay messages send from test@mike.com.hk. Messages from remaining addresses in mike.com.hk will be relayed via popular.mailhub.com. You can also specify mailer used as shown in the remaning lines.

smarttable development and maintanance has been moved to open-sendmail at sourceforge.net.

Install

  1. Create /etc/mail/smarttable file and compile it using makemap.

  2. Copy provided smarttable.m4 file into cf/feature directory.
    Use "Save as" command in your browser. In some cases "copy and paste" looses required info (e.g. tabs - \t)

  3. In *.mc file you use to generate sendmail.cf add:

      FEATURE(`smarttable')dnl
    

    and generate new sendmail.cf or sendmail-test.cf.

Tests

You can use commands given below for testing the feature:

sendmail -C sendmail-test.cf -bt <<END
3,0 recipient@test.com
.Dfsender@sender.domain
3,0 recipient@test.com 
END

Additional

Original Posting

google First smart table post
Subject: Re: How to relay the mail according to the sender domain
Date: 1999-02-05
Newsgroups: comp.mail.sendmail
Message-ID: <36BB38E3.A2F8C332@polbox.com>


Last Update: 2008-09-18