Hosted by PSE.pl | Created: 2002-04-15 | Last update: 2004-09-06 13:55:17 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

Local Table (sendmail)

Abstract

The document describes how to make sendmail select non default local mailer (e.g. cyrus) for some local addresses.

It will make sendmail reject during SMTP session delivery attempt to addresses handled by no local mailer unlike typical similar solutions (including cyrusv2.mc from cyrus distribution).

Version 8.2 released 2003-11-24 can handle user+detail syntax. For "user+detail" address it will lookup for "user+detail", "user+*", user in localtable. %1 will contain "detail".


Copyright (c) 2002 Andrzej Filip

Usage

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

# local_address local_like_mailer:delivery_address
zyz        cyrus:zyz
j23        cyrus:%0
007        cyrus:m5
folder1    cyrusbb:folder1
bb+folder2 cyrusbb:folder2
bb+folder3 cyrusbb:%1

Messages to local addresses zyz and j23 will be delivered via cyrus mailer. Messages to 007 local address will be delivered to cyrus mailbox m5.

Install

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

  2. Copy provided localtable.m4 file into cf/feature directory (localtable.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(`localtable')dnl
    

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

  4. (Optional) Install makelocaltable script for synchronization of localtable with cyrus (makelocaltable signature).

    Modify configuration variables in the script to fit your cyrus and sendmail installations. First time run "makelocaltable -f".

Tests

You can use commands given below for testing the feature:

while read addr; do sendmail -C sendmail-test.cf -bv $addr ; done <<END
xyz
xyz@localhost.localdomain
007
root
nosuchuser
END

Additional

Thanks

Original Posting

googleThe posting
Subject: localtable - using map to send some local addresses to cyrus
Date: 2002-04-15
Newsgroups: comp.mail.sendmail
Message-ID: <3CBAE781.106@bigfoot.com>
Google shows only one of three text/plain mime parts