Hosted by PSE.pl | Created: 1999-10-23 | Last update: 2004-04-19 08:42:53 UTC | GnuPG signature of this page
anfiTop | anfiUp | Andrzej Filip | Mirror Sites | GnuPG Keys | New!google
googleMy Postings | slashdotJournal | Showing Gratitude
Personal | Sendmail | Exim | General MTA | Cyrus IMAP | UUCP

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).


Copyright (c) 1999,2002 Andrzej Filip

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.

The lastest smarttable version is 8.5 released 2002-07-28. I detected problems in versions 8.1-8.4

Install

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

  2. Copy provided smarttable.m4 file into cf/feature directory (smarttable.m4 signature).
    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

googleThe posting
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>